Expose "this code previously succeeded" CI environment variables
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
We (Wireshark) recently migrated to GitLab. We're using a fast-forward merge workflow and have run into the same issue that other ff-only projects have encountered, namely that any time a change is merged, any outstanding merge requests need to be rebased, which triggers another CI run, which consumes both human and computer time:
- #17046, Skip job if already run on same code
- #118825 (closed), UI for merge request widget to rebase without triggering CI
- #219005, Cleverer "Merge when pipeline succeeds" (productivity and security)
While each of those propose useful changes, it might also be worthwhile to make it possible to skip runs based on CI rules, e.g. something like this:
rules:
- if: '$CI_PIPELINE_SOURCE == "merge_request_rebase" && $CI_PREVIOUS_PIPELINE_STATUS == "success"'
when: never
...or if we take inspiration from @0x53A's unique tree suggestion, something like this:
rules:
- if: '$CI_PREVIOUS_UNIQUE_TREE_STATUS == "success"'
when: never
Edited by 🤖 GitLab Bot 🤖