Skip to content
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

BuildHelpers grabs the wrong variable GitLab CI #122

Open
raandree opened this issue Apr 15, 2020 · 1 comment
Open

BuildHelpers grabs the wrong variable GitLab CI #122

raandree opened this issue Apr 15, 2020 · 1 comment

Comments

@raandree
Copy link
Contributor

When building on GitLab CI BuildHelpers uses the wrong variable to get the build number. The variable 'CI_JOB_ID' is not the build number but is different between each job (worker) in the same build. This should be replaced by 'CI_PIPELINE_ID'.

BHBranchName DscTaggingTest 
BHBuildNumber 3327 
BHBuildOutput G:\GIT\GitLab_Live\ServerDsc6\Repo\sTjDq1w6\0\DesiredStateConfig...
BHBuildSystem GitLab CI 
BHProjectName ServerManagement 
BHProjectPath G:\GIT\GitLab_Live\ServerDsc6\Repo\sTjDq1w6\0\DesiredStateConfig...
CI true 
CI_BUILD_ID 3327 
CI_BUILD_NAME build_batch1 
CI_COMMIT_BRANCH DscTaggingTest 
CI_COMMIT_REF_NAME DscTaggingTest 
CI_CONCURRENT_ID 0 
CI_CONCURRENT_PROJECT_ID 0 
CI_DEFAULT_BRANCH master 
CI_JOB_ID 3327 
CI_JOB_NAME build_batch1 
CI_JOB_STAGE build 
CI_JOB_TOKEN [MASKED] 
CI_PIPELINE_ID 1575 
CI_PIPELINE_IID 1122 
CI_PIPELINE_SOURCE push 

And please close #43.

raandree added a commit to raandree/BuildHelpers that referenced this issue Apr 15, 2020
@RamblingCookieMonster
Copy link
Owner

gotcha - It might be worth looking for CI_PIPELINE_IID, and falling back to CI_PIPELINE_ID for compatibility (IID is per project, ID increments globally for all projects, so could be painful for those of us with busy gitlabs - at least, afaict from reading a few issues and their definitions).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants