Add job status environment variables
What does this MR do?
- Introduces
CI_JOB_STATUSenvironment variable available to jobs. - Removes
BuildRunRuntimeFinishedand splits it up intoBuildRunRuntimeSuccessandBuildRunRuntimeFailed
Why was this MR needed?
- A dependency for a proposal in gitlab#15603 (closed) (run
after_scriptalways... it's good to know what the state of the build was). - Was requested here: gitlab#16579 (closed)
What's the best way to test this MR?
TestBuildJobStatusEnvVars tests that the environment variables for stage and status are updated as a build progresses from running to failed.
go test -run TestBuildJobStatusEnvVars ./executors/shell
What are the relevant issue numbers?
Will be handy when after_script is always executed: gitlab#15603 (closed)