Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Setup remote tracking in Jenkins / Git

With Jenkins, I'm checking out a project that later it builds using SBT. But when it tries to execute the sbt-release plugin, it complains:

No tracking branch is set up. Either configure a remote tracking branch, or remove the pushChanges release part

This is my Jenkins GIT plugin configuration:

  • Repository URL: points to .git file
  • Name: blank
  • Refspec: blank
  • Branches to build/Branch Specifier (blank for default): develop (the branch I'm building)
  • Checkout/merge to local branch (optional): develop

I set those items following the guide that answers this question.

I think the SBT-release plugin needs the remote tracking in order make a tag on the branch.

like image 412
Luciano Avatar asked May 16 '13 20:05

Luciano


1 Answers

Assuming you want to build from master.

In Jenkins in GIT section select:

Branches to build:     master

also add:

Additional Behaviours: 
      Check out to specific local branch:      master

Build step

Execute Shell:

git branch --set-upstream-to=origin/master master

And then add your SBT build step

sbt "release with-defaults"
like image 174
maestr0 Avatar answered Oct 21 '22 21:10

maestr0