0
votes

I am using the 3 build configurations to use VCS root as develop, staging and master. Each having custom parameters like build env, Kubernetes cluster, namespaces, etc.

However, sometimes my dev team needs to check if the master branch code is running correctly on dev env, dev K8s cluster, dev namespaces. For that, I want to create the custom prompt-based parameters where they can choose the VCS Root with parameter options like develop, master or staging.

Can anyone please guide how to achieve this for the single build configuration? Can I parameterize the VCS root? I want to keep this prompt-based option so there will not be any automatic trigger required.

I will keep the the common 3 build configurations as it is. I just want to add 4th build configuration named as "Custom" where there will be choice for every parameter.

1

1 Answers

0
votes

Yes, you can parameterize your VCS root,

if your repository is same for all environments then you have to set only one parameter for VCS root an that is for branch name.

Step 1 : Write %branch-name% in VCS root configuration and save it.

The same parameter (config.branch-name) will be added automatically in your build configuration in which this VCS root used (new configuration as well as in existing configuration)

Step 2 :

In other configuration keep your config.branch-name parameter as it is ( Type : Configuration parameter, Display:Normal) but,

in new configuration, set Display : prompt for config.branch-name parameter

Note : This is only for setting variable based VCS root, assuming you can set all other parameters as per your requirement