exiting in appropriate manner if the command failed/passed in pipeline
Mar 30, 2023
nice way of doing this is like this:
<command here>
exit_code="$?"
exit $exit_code
courtesy: https://gitlab.com/gitlab-org/charts/gitlab-runner/-/blob/main/scripts/integration.sh