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

[JENKINS-34540] Add build parameters to environment variables to allow checkout specified tag #408

Closed
wants to merge 1 commit into from

Conversation

bozaro
Copy link

@bozaro bozaro commented Jun 3, 2016

I try to create a "Pipeline" with string parameter "TAG_NAME" and "Pipeline script from SCM" with "Branch Specifier" = "refs/tags/${TAG_NAME}" (I attached job file to this issue).
But this don't work (looks like TAG_NAME is not pass to environment variable) with error like:

Started by user Artem V. Navrotskiy
 > git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
 > git config remote.origin.url https://github.com/bozaro/octobuild.git # timeout=10
Fetching upstream changes from https://github.com/bozaro/octobuild.git
 > git --version # timeout=10
using .gitcredentials to set credentials
 > git config --local credential.username bozaro # timeout=10
 > git config --local credential.helper store --file=/tmp/git5054038889952082299.credentials # timeout=10
 > git -c core.askpass=true fetch --tags --progress https://github.com/bozaro/octobuild.git +refs/heads/*:refs/remotes/origin/*
 > git config --local --remove-section credential # timeout=10
 > git rev-parse refs/tags/${TAG_NAME}^{commit} # timeout=10
 > git rev-parse refs/remotes/origin/refs/tags/${TAG_NAME}^{commit} # timeout=10
 > git rev-parse refs/tags/${TAG_NAME}^{commit} # timeout=10
ERROR: Couldn't find any revision to build. Verify the repository and branch configuration for this job.
Finished: FAILURE

But on old-style "Freestyle Build Job" I can use parameters in branch specifier.
Also, this issue can not be work around by Jenkinsfile content.

@KostyaSha
Copy link
Member

👎
Sounds like https://issues.jenkins-ci.org/browse/JENKINS-28447 that should be fixed itself without overloading plugins with hacks.

@bozaro
Copy link
Author

bozaro commented Jun 3, 2016

JENKINS-28447 is one year old. I do not believe that he will be fixed soon.

@MarkEWaite
Copy link
Contributor

I agree with @KostyaSha that this should not be in the git plugin. Wouldn't it be better to propose a pull request (with unit tests) to the workflow plugin on behalf of JENKINS-28447 instead?

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

Successfully merging this pull request may close these issues.

3 participants