0

I am trying to compile code in Jenkins, when pushing code to TFS, and passing the branch name dynamically.

I am using the TFS Hook, and i couldn't find how to pass the branch name though the http Get call to Jenkins.

Any idea how to make it happen ?

thanks, Eran.

enter image description here Above is the TFS Service Hook, where i am trying to pass the branch name dynamically to Jenkins.

1 Answer 1

0

It's not able to pass the branch name in TFS dynamically. When you set the Trigger of the event type--code pushed, there will be filters of branch. You have to select the branch here.

Branch: The branch that code was pushed into

enter image description here

If you want the branch in TFS repo to be dynamically pushed, you could set the branch value= any as a workaround.

3
  • thanks for the reply. But this way i can trigger only one build in the tfs --> master. If i set the branch value as "any", i will not be able to determine which branch was changed, in order to build it.
    – eran
    Dec 4, 2017 at 13:06
  • Hi @eran, Sorry, not sure what's your really requirement, if you have selected master of branch in filters , it's actually hardcode the branch name master. Then why you need to pass branch name dynamically to Jenkins Job? Dec 6, 2017 at 4:37
  • Hi @eran , any update on this issue? Did my reply helped or give a right direction? Dec 16, 2017 at 9:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.