Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jenkins - triggering a parameterized build

I have project configured in Jenkins that polls an SCM and begins a build when a change is posted. There is a post build action to build another project. The question I have is, the project that is being built afterwards has its own parameters. How do I know which parameter is specified when the post-build action triggers? Right now if if I use 'Choices', is it just picking the first one? How do I have it pick other ones?

like image 739
randombits Avatar asked Feb 26 '12 18:02

randombits


People also ask

How do you trigger a build with parameters in Jenkins?

Using build parameters, we can pass any data we want: git branch name, secret credentials, hostnames and ports, and so on. Any Jenkins job or pipeline can be parameterized. All we need to do is check the box on the General settings tab, “This project is parameterized”: Then we click the Add Parameter button.

How do you trigger a build in Jenkins?

Follow the steps as mentioned below to trigger a Jenkins job automatically based on GitHub's webhook configurations: Step 1: Go to the Configuration page of the respective job and under the build trigger section, check the "GitHub hook trigger for GITScm polling" checkbox and click on the Save button.

What is parameterized trigger?

a set of predefined properties. properties from a properties file read from the workspace of the triggering build. the parameters of the current build. Subversion revision: makes sure the triggered projects are built with the same revision(s) of the triggering build.


1 Answers

OK, let's take it one by one :)

  1. If you want to see which parameter were used, You can install this plugin: Show Build Parameters Plugin
  2. If you want to trigger a build with a specific parameters, use this plugin: Parameterized Trigger Plugin
like image 186
Łukasz Rżanek Avatar answered Nov 16 '22 03:11

Łukasz Rżanek