Backend: Remove deprecated predefined CI_BUILD_* variables
Proposal
The CI_BUILD_*
variables were deprecated in GitLab 9.0, which is so long ago they've actually been completely removed from the docs a lot time ago, as being considered long out of the service. Unfortunately, we never actually removed the code, so they are still being added to every job. As these still technically exist, there could conceivably be people using them still, so we should make a full deprecation notice, and then remove them in 16.0. We will also provide the failed pipeline the notification in case any of them are using the removed variables.
Breaking Change
This will be a breaking change, but the only thing users need to do is update their variables to the current equivalents:
8.x name | 9.0+ name |
---|---|
CI_BUILD_BEFORE_SHA |
CI_COMMIT_BEFORE_SHA |
CI_BUILD_ID |
CI_JOB_ID |
CI_BUILD_MANUAL |
CI_JOB_MANUAL |
CI_BUILD_NAME |
CI_JOB_NAME |
CI_BUILD_REF |
CI_COMMIT_SHA |
CI_BUILD_REF_NAME |
CI_COMMIT_REF_NAME |
CI_BUILD_REF_SLUG |
CI_COMMIT_REF_SLUG |
CI_BUILD_REPO |
CI_REPOSITORY_URL |
CI_BUILD_STAGE |
CI_JOB_STAGE |
CI_BUILD_TAG |
CI_COMMIT_TAG |
CI_BUILD_TOKEN |
CI_JOB_TOKEN |
CI_BUILD_TRIGGERED |
CI_PIPELINE_TRIGGERED |
NOTE: CI_BUILDS_DIR
should not change, it is used to configure the runner's build directory when executing.
In addition in case the user are using one of the removed variables, we are going to add a detailed error message which explains why this pipeline is failing.
Removal will be done behind a Feature Flag, which will be enabled in %16.0.
Implementation
Description | MR / Issue | |
---|---|---|
documentation | Add deprecation notice for CI_BUILD_* variables | !80813 (merged) |
backend | Prepare removal of legacy predefined CI_BUILD_* variables | !116606 (merged) |
backend | [Feature flag] Roll out ci_remove_legacy_predefined_variables
|
Issue #404533 (closed) |
backend | Set FF ci_remove_legacy_predefined_variables to default ON |
!120050 (merged) |
documentation | Add variable removal notice | !120073 (merged) |