Support historical value of schedule pipeline variables
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
Proposal
When setting up scheduled pipelines, users can set CI/CD variables to be used when the pipeline runs. As of writing, the scheduled pipeline will always use the current value of the variables at the time the pipeline is executed. In cases where you have older pipelines that had manual jobs that had not yet run, the current value will always be used.
We should provide some level of control for the users to either use the current value or retain the old value when the pipeline was created.
Example project: gl-demo-ultimate-mgrabowski/scheduled-pipeline-manual-job-variables
Steps to recreate:
- Create a pipeline with one normal job and one manual jobs that both prints the variable global TEST_VAR.
- Create a scheduled pipeline and set the
TEST_VARvalue to1. - Manually trigger the scheduled pipeline via the UI and observe the normal job print the value of
TEST_VAR=1. Note that the second manual job will not run yet. - Now go back to the existing pipeline schedule and just update the
TEST_VARvalue to2.
Expected behavior:
- Ideally the old pipeline should still have the context of
TEST_VAR=1
Actual behavior:
- If you play the second manual job, it will already pick up the new value
TEST_VAR=2.
Edited by 🤖 GitLab Bot 🤖