How to use global parameters in a build that is part of a build pipeline

1,141 views
Skip to first unread message

Eric Wood

unread,
Jun 4, 2014, 12:44:14 PM6/4/14
to jenkins...@googlegroups.com
I have several jenkins jobs that I want to use global variables.  The only way I have seen to do this is to parameterize my build and to set a global parameter string using the plugin documented here:

The issue I run into is that this forces me to run a build with parameters and prompts me to select the defaults., and the build pipeline plugin does not know anything about this and does not seem to kick off the build with the specified defaults.

It there a way for me to set up global parameters and get the build process to accept them without prompting me for a "parameterized" build?

Thansdk, Eric

Mike Chmielewski

unread,
Jun 4, 2014, 3:34:24 PM6/4/14
to jenkins...@googlegroups.com
For Build Flows, I have passed in arbitrary variables not defined on a job in the flow, and they are picked up correctly.


--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

Michael Chmielewski | Practice Lead, Release Engineering

T 617.478.9368



BULLHORN®

Twitter LinkedIn | Facebook

Eric Wood

unread,
Jun 5, 2014, 10:13:44 AM6/5/14
to jenkins...@googlegroups.com
Mike:

Thanks for the reply. I'm not sure I follow the response.  When you mention Build Flows are you talking about build pipeline creating using the build pipeline plugin?  Also, who are you setting the values that you pass in?

Thanks, Eric

Mike Chmielewski

unread,
Jun 5, 2014, 12:28:17 PM6/5/14
to jenkins...@googlegroups.com
I'm using the build flow plugin, which I believe is used by the build pipeline.

Basically my groovy script that orchestrates the build flow passes in some variables to the build calls in build flow. I don't have to define the parameters on the build job that I am calling with the parameters.

Eric Wood

unread,
Jun 6, 2014, 9:47:29 AM6/6/14
to jenkins...@googlegroups.com
I do not think tha the build pipeline uses build flows.  Also, when I look at teh build flow plugin, they state that it is a POC plugin and it seems tha the developers are moving on and suggest the use of the workflow plugin.  It seems that there has to be some way to set global variables and use them without having to use the parameterized build plugin, as this forces me to have to indicate I want to run the build and the build pipeline plugin does not recognize this functionality (i.e. it does nto run with the default values).

Eric Wood

unread,
Jun 9, 2014, 8:03:57 AM6/9/14
to jenkins...@googlegroups.com
Ok, the use of global varaibles/parameters is pretty simple, merely set them in the 
manage jenkins ->configure system->Global Properties-> environment variables and set a series of name/value pairs.  In the jenkins job I reference them in the ANT properties box as name=${Global_property_1}.  In my case I want to set a bunch of global propertry values to use in ANT by a bunch of jenkins jobs.

I have read the global vaiable sting parameter plugin wchic seemed overly comlicated and got confuised by the use the plugin and what I assume is built-in fiunctionality. 

Thansk, eric
Reply all
Reply to author
Forward
0 new messages