When building from git on master jenkins fetches and uses origin/master. When building from git on a branch jenkins fetches and users mybranch not origin/mybranch and isn’t picking up changes.
I switched the branch specifier to use origin/mybranch and it seems to work. Is the the standard way to handle things or am I missing a more obvious way of doing this? I don’t want to add unecessary complexity.
Please let me know if jenkins should use origin/branchname instead of branchname for its Branches-To-Build field.
Thanks
Peter
Check your current .git/config, and you will see that your “origin” and how master relates to origin is already specified. No other branches will be specified, so the plugin can’t construct a url. To add further branches…
This would enable you to just put in the branch name in the branches to build field in Jenkins. That’s probably overkill, and extra maintenance. Just put in the origin/branchname.