Dynamically Define Container Images for Pipeline Jobs
- Step 1: Describe what this request is about by answering the following questions
- Step 2: Assign to Fulfillment Leads
- Step 3: Fulfillment begins review of intake request.
- Step 4: Fulfillment approves, defers, or cancels the request
Step 1: Describe what this request is about by answering the following questions
What is the problem/opportunity?
Today, the image
tag in a GitLab CI yml needs to be defined, either hardcoded or as a variable. However, this still requires manual intervention from Project teams when these images are updated. This can be cumbersome at scale, when hundreds or thousands of teams use the same images.
Example
- Central Image team maintains a set of "golden images" in some container registry.
- Images follow a versioning practice and the organization disallows the use of
:latest
images. - When the latest stable Job image is released, all Project pipelines need to update their respective pipeline definition and/or CI template.
- Additionally, if these project teams are dispersed across multiple groups, group-level CI variables is still almost as cumbersome.
Customer's Current Implementation
The customer who has raised this concern is currently a Jenkins user. They maintain a central database that holds the image name/URL of each latest, stable image. A Jenkins groovy script begins by accessing the latest "golden image" data, and injects it into subsequent jobs. Is there a way to dynamically define GitLab CI jobs in a similar workflow?
Who is it for?
Internal: DevOps teams who own pipeline templates Internal: Development teams who define pipeline variables
Why is this important?
This is a feature that is possible (and currently implemented at Customer environment) with Jenkins. This is a competitive feature parity that is asked for GitLab CI.
How do you propose we solve for it?
Allow dynamic injection of variables into later jobs, based on prior jobs within a pipeline. At the very least, the ability to do so to define the image
tag in the gitlab-ci.yml
What does success look like, and how can we measure that?
-
Ability to dynamically inject variables in the same pipeline, based on job outputs. -
Documentation and example of usage.