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

Adding an environment variable for the current branch without the origin/ #154

Closed
wants to merge 1 commit into from

Conversation

mAu888
Copy link

@mAu888 mAu888 commented May 23, 2013

Added a second env variable GIT_LOCAL_BRANCH for retrieving the current branch without the remote origin/ prefix.

@buildhive
Copy link

Jenkins » git-plugin #251 SUCCESS
This pull request looks good
(what's this?)

@marc-guenther
Copy link
Member

Two problems with this:

  • the name of the remote is configurable and not always "origin"
  • Jenkins does not create a local branch, unless you explicitely tell it so in a different configuration parameter

@mAu888
Copy link
Author

mAu888 commented May 23, 2013

I see the problems. But it's only possible to check out the remote branches to one local branch (via Checkout/merge to local branch (optional)), isn't it?

@mAu888 mAu888 closed this May 23, 2013
@marc-guenther
Copy link
Member

Yes, it's exactly one local branch, or none.

You might expose that local branch name in an env variable maybe, if there's a use case for that?

@mAu888
Copy link
Author

mAu888 commented May 23, 2013

No. The problem I'm facing is that I'm deploying my build artefacts (iOS .ipa files in this case) to an internal distribution server. And besides our development branch, we create branches for release builds and I need just the name of the release branch for the deployment.

@maxromanovsky
Copy link

So how is it possible with the version 2.0 of Git Plugin?
I've tried Check out to specific local branch Additional Behaviour with branch name 1.4, but nothing had changed. ${GIT_BRANCH} still contains name of the remote branch.

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