any reason you don't use a standard git post-commit trigger http://yourserver/jenkins/git/notifyCommit?url=<URL of the Git repository> ?
2013/6/27 Bob Bick <[email protected]> > Sorry Nicolas… Here is the long (actually not too long) story…**** > > ** ** > > The Jenkins job supports both Continuous Integration (CI) and On-Demand > builds. CI builds are initiated when developers push a commit to our Stash > server, in which case it makes an HTTP call to the Jenkins server with the > Stash URL. For jobs that match the URL, Jenkins checks the branch specifier > to determine whether a code change was made for that branch; and if so, > then executes the job. If the branch specifier is “$OVERRIDE_BRANCH”, > then the CI build is not executed (even though it should be executed.**** > > ** ** > > So, long story short, in order to get CI builds to work, I had to set the > branch specifier to or CI branch (“develop”).**** > > ** ** > > *From:* [email protected] [mailto: > [email protected]] *On Behalf Of *nicolas de loof > *Sent:* Thursday, June 27, 2013 11:58 AM > *To:* [email protected] > *Subject:* Re: Modifying Git branch dynamically**** > > ** ** > > sole option I can see is to set branch specifier to $OVERRIDE_BRANCH with > default value to "develop"**** > > So can't give advise without the long story ;)**** > > ** ** > > ** ** > > 2013/6/27 Bob Bick <[email protected]>**** > > Hi,**** > > **** > > *Background***** > > **** > > Our Jenkins build job uses Git with a default branch specifier set to > ‘develop’.**** > > **** > > A build input parameter “OVERRIDE_BRANCH” allows the user to specify an > alternative Git branch. A Groovy script build step looks to see if > $OVERRIDE_BRANCH has been specified, and if so, it checks out that branch > for the build.**** > > **** > > *Problem***** > > **** > > When I run a build, it runs successfully. However, when I navigate to the > Jenkins build output page, it lists the Git code *Changes* for the > develop branch. This makes sense, because Jenkins has no way of knowing > that our Groovy script changed the branch.**** > > **** > > *Question***** > > **** > > Is there a way in Jenkins to tell it that the Git branch (and hence > corresponding Git revision) has changed?**** > > **** > > *NOTE***** > > **** > > I know one “solution” would be to change the Git default branch specifier > to the $OVERRIDE_BRANCH parameter; however, that is not desirable for some > other reasons. Long story…**** > > **** > > Thanks for reading this and any help.**** > > Bob**** > > > *** *** *** > This message contains information which may be confidential and > privileged. Unless you are the addressee (or authorized to receive for the > addressee), you may not use, copy or disclose to anyone the message or any > information contained in the message. If you have received the message in > error, please advise the sender by reply e-mail and delete the message.** > ** > > -- > You received this message because you are subscribed to the Google Groups > "Jenkins Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/groups/opt_out. > > **** > > ** ** > > -- > You received this message because you are subscribed to the Google Groups > "Jenkins Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/groups/opt_out. > > **** > > > *** *** *** > This message contains information which may be confidential and > privileged. Unless you are the addressee (or authorized to receive for the > addressee), you may not use, copy or disclose to anyone the message or any > information contained in the message. If you have received the message in > error, please advise the sender by reply e-mail and delete the message. > > -- > You received this message because you are subscribed to the Google Groups > "Jenkins Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/groups/opt_out. > > > -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
