Reputation: 920
I config Jenkins deploy PHP app by trigger the script deployment whenever developers pushed their code to Github with domain .mydomain.com. If developer create new branch and push some changes to that branch, it works perfectly fine, the strange thing is when developer create new branch and push to server (don't change anything just create new branch and push) it doesn't trigger the script deployment. Could you please help?
Upvotes: 1
Views: 308
Reputation: 4358
In Git configuration there is a field Branch Specifier (blank for default):
if you put there **
it will build all branches from all remotes.
But if you are creating a new branch and push to server it won't trigger the job. As Github plugin in Jenkins configuration is monitoring the changes in the repo and creating a branch is not a change. So the job won't trigger for that branch until you do a commit in that branch. And I feel this is the correct behavior.
For example when you do a commit
xxxx
on branchmaster
, your job gets triggered with commit idxxxx
. Now you create a branch saybranch1
from master and you push to server. As you can see there is not difference between commitxxxx
andbranch1
so there is no need to buildbranch1
in Jenkins.
Upvotes: 1