How to handle Versioning for Master and Feature branch

7 views
Skip to first unread message

Shilpa Nimbalkar

unread,
Aug 16, 2016, 5:11:39 AM8/16/16
to Jenkins Users
Hello All,

I am new baby in Jenkins. My aim is to trigger a build when there is commit in Master and Feature branch. But when there is change in Master branch, Jenkins should run Master job and increment version from 1.0.0 to 2.0.0 and when there is change in feature branch, jenkins should change version from 1.1.0 to 1.2.0.

Now I have 2 jobs, one for master and one for branch. My repo is in Github and two webhooks (one for master and another one for feature) configured. Whenever I am commiting any change in repository both jobs are running and changing the build versions. Even though there is no commit in feature branch, job is running the build job and version is updating.

May be my approach is wrong, let me know how to handle versioning for same repo with diff branchs in jenkins/github.
Reply all
Reply to author
Forward
0 new messages