What does this MR do?
Mark Prepare environment stage as system failure
Why was this MR needed?
The Prepare environment stage is used to echo on which hostname it the job running. If this fails we mark it as a BuildFailure which is not the case, it should be a system failure. If we fail to prepare the environment it's the Runner fault and not the users fault.
Since the failure is marked as system failure we no longer try to run the artifact upload on failure since the job didn't run and there is nothing to upload.
Having this marked as a system failure would make it more clear to the user that the problem is with the Runner environment, we add a link to the documentation to make it more simple for them to understand what might be going on.
The easiest way to test this is to use the shell executor.
- Update your bash profile to exit with error
echo "exit 1" > ~/.bash_logout
gitlab-runneras the user that has the
- If you want to see the error in the master branch make sure you have an empty
/buildsdirectory so that you can see the error
cd No such file or directoryerror on master
Does this MR meet the acceptance criteria?
Added tests for this feature/bug
In case of conflicts with
master- branch was rebased