Skip to content

Add CI_JOB_IMAGE to predefined environment variables

Description

Problem Statement: Current build-time image: is not programmatically available to the CI Job itself.

In our organization there are many different image: used across thousands of projects. They could be explicit defined like node:v1.3.4 or dynamically node:$NODE_VERSION. In order for us to collect an aggregate view of all images being used, we'd like to have the expanded variable at build-time. This will also help jobs which will do something different based on the actual image being pulled.

Proposal

Add CI_JOB_IMAGE to predefined variables https://docs.gitlab.com/ee/ci/variables/predefined_variables.html#variables-reference

Links to related issues and merge requests / references

Edited by Chris Hill