How to build the latest git flow release branch in Jenkins?

I’m trying to set up continuous integration in Jenkins for git flow style development. I thought I would create three jobs to build RPM packages: for master, develop and the latest release branch.

The problem is with the latest release branch, as I’m not sure it is possible to setup builds so that Jenkins polls my git repo, and only does a build if the change ocurrs in the latest release/* branch. Is it more usual for people to clone jobs and hardcore branch names or can what I intend be done?

  • Jenkins JUnit Attachments Plugin throws 404 for attached files
  • Using maven and jenkins, how to test the programmers did some test cases?
  • Failed to apply plugin
  • Prevent Jenkins from Installing Artifact to Local Maven Repository
  • How to upload a .xlsx file to jenkins job
  • Is there an SVN client we can use for Maven that supports picking up credentials from Jenkins
  • Scheduling a nightly build in Jenkins with multiple conditions
  • Adding Git Commit Hashes to Email-ext Plugin in Jenkins
  • One Solution collect form web for “How to build the latest git flow release branch in Jenkins?”

    If I understand correctly you are trying to see if there is a generic way to build branches in jenkins? (correct me if I am wrong)

    If thats what your trying to achieve, you can use parameterized builds. Make the branch name as a parameter.In jenkins configuration for the build, you can specify parameter name as BRANCH and reference that in your git clone command (i am assuming your using execute shell)

    git clone -b ${BRANCH}

    Now everytime you build, jenkins will prompt you for the branch name and you can specify values like origin/master or origin/release etc..

    Hope this helps

    Git Baby is a git and github fan, let's start git clone.