-
Notifications
You must be signed in to change notification settings - Fork 587
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GitLab CI: No such variable CI_BUILD_ID #2290
Comments
Hm, I always thought I just copied from the docs. Did this stuff change? Do we need to check the old one for backwards compat or old on-premise instances? |
Well, we started to use GitLab only few months ago, but I did some search on the Internet, and it seems they renamed CI_BUILD_ID into CI_PIPELINE_ID about a year ago. So I think it's better to keep it backwards compatible. |
This issue ranks pretty high in Google when searching for GitLab CI_BUILD_ID. I ended up skimming the archived docs and |
CI_BUILD_ID is no longer set by Gitlab CI, per fsprojects/FAKE#2290
Description
According to the official documentation there is no such variable
CI_BUILD_ID
on the list of the GitLab CI variables: https://docs.gitlab.com/ee/ci/variables/But Fake is providing a following function
Which as the result is always returning an empty string while running on a GitLab CI.
Repro steps
Call a
BuildServer.gitlabCIBuildNumber
function while running at a GitLab CI runner.Expected behavior
The function should be instead looking for a variable
CI_PIPELINE_ID
which defines a pipeline id.Known workarounds
Use
Environment.environVar "CI_PIPELINE_ID"
directly.The text was updated successfully, but these errors were encountered: