How to add administrative build in jenkins?

I am trying to figure out how to add an administrative assembly in Jenkins that will manage multiple assemblies, and how I can configure the parameters from the administrative assembly to child assemblies.

+1
source share
1 answer

A parameterized trigger plugin is what you are looking for.

Once you have installed the plugin, see the second screenshot below. Go to the Configure page of your project. Find Build > Add build step > From drop-down menu, select Trigger/call builds on other projects . After that, click Add Parameters > From drop-down menu, select Current build parameters

enter image description here

Above the snapshot is parent task A, where I define a string parameter that will be used in its child task B.

enter image description here

Above the picture, there is again parent task A, where I indicate the descending (child) task B, as well as the inclusion of Current build parameters , which ensures that the parameters defined in the parent task A are visible to the child tasks. Once we are done with these settings, we should be able to see the link to the upstream task in child task B, as shown below. This will confirm that everything is still fine. :)

enter image description here

Now the only task is to use / call the variable (defined in parent task A) in child task B. This is shown in the following snapshot:

enter image description here

  • I tested it on Windows, so I used %string% .

  • If you are on a UNIX / Linux machine, select Run Shell and use ${string}

+7
source

Source: https://habr.com/ru/post/973824/


All Articles