so i have a pipeline that checks 2 repos every 24 hours and pushes changes to a 3rd repo. the pipeline looks like this:
- git fetch $CHEATSHEETS
- git fetch $BASH_ONELINER
- git add -A
- git commit -m "Update has been successful" || echo "error"
- git push $TOKEN_AND_REPO HEAD:master
my problem with that is i'm never going to see any error in the pipeline if there's an error like a merge conflict, for example. so i was thinking to use a case for comitting, something like this:
TEST=2; case "${TEST}" in "1") echo "one";; "2") echo "The commit has failed";; *) echo "Error";; esac
my question is would something like this work in gitlab ci/cd pipeline and if so - how should it be implemented?
thanks in advance.