-
Steve Xuereb authored
The `BuildStagePrepare` is used to echo the hostname of the machine that is running the job. 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](https://gitlab.com/gitlab-org/gitlab-runner/-/blob/73ac97aa/common/build.go#L317) 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 since the user would not see the "No such directory" error from the `cd` we try to execute on `BuildStageUploadOnFailureArtifacts`. Add a link to the documentation to make it more simple for them to understand what might be going on. reference https://gitlab.com/gitlab-org/gitlab-runner/-/issues/1379