Skip to content

Add job status environment variables

Arran Walker requested to merge ajwalker/build-status-env into master

What does this MR do?

  • Introduces CI_JOB_STATUS environment variable available to jobs.
  • Removes BuildRunRuntimeFinished and splits it up into BuildRunRuntimeSuccess and BuildRunRuntimeFailed

Why was this MR needed?

  • A dependency for a proposal in gitlab#15603 (run after_script always... 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?

gitlab#16579 (closed)

Will be handy when after_script is always executed: gitlab#15603

Edited by Steve Xuereb

Merge request reports