I am trying to configure Jenkins using a Git project to:
It will build from branches matching the pattern (origin / master, origin / feature / *, origin / hotfix / *, etc.) when the changes are transferred to the central repository
Developers and testers can initiate assembly for any required edition, specified as an assembly parameter, which is a tag name, branch name, or commit hash. The task has other parameters, and sometimes we want to create assemblies with something other than the default values.
I have 1. working correctly by setting up a post-receive script on a Git server and adding a few branch qualifiers to Jenkins.
To do 2., I added an additional build parameter to GitRef , and then added an additional branch specifier with $GitRef . Manually, starting the assembly, it will simply continue to build from the same commit / branch each time, regardless of which parameter was set. If I deleted all the other branch specifiers, the manual assembly would work as expected. But then the assemblies built with the help of the hook will build only from origin / master (the default value is $GitRef ).
Am I trying to achieve even without creating two jobs for each project? If so, what do I need to do to make it work?
source share