Add missing `CI_COMMIT_BEFORE_SHA` predefined variable
What does this MR do?
This merge request adds a missing CI_COMMIT_BEFORE_SHA
predefined variable.
This predefined variable has a very interesting story:
- It holds a previous commit that was present on a branch before a push request.
- This was broken for a some time, see https://gitlab.com/gitlab-org/gitlab-ce/issues/3210
- We fixed that in https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/15805
- Someone removed this variable because it was broken (couldn't find a merge request)
- Contributor removed it from documentation because it was broken in https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/2118
- We never removed
CI_BUILD_BEFORE_SHA
butCI_COMMIT_BEFORE_SHA
was either removed, or we forgot to add it when we were renaming variables in 9.0 - Someone noticed that
CI_COMMIT_BEFORE_SHA
is missing - I created this merge request to resolve this technical debt once and for all.
Does this MR meet the acceptance criteria?
-
Changelog entry added, if necessary -
Documentation created/updated -
Tests added for this feature -
Has been reviewed by a Backend maintainer
What are the relevant issue numbers?
Closes gitlab-org/gitlab-ce#43365
Edited by Grzegorz Bizon