Retrieve parameters from properties file

I have several Jenkins parameterized jobs that uses the same parameters and parameters values. When I have to change the default value of one of those parameters, I need to go over all of those jobs and reconfigure them.

A simple solution to this problem would be an option to retrieve all parameters from config file (in the master/ in the workspace) but I could not find a sufficient implementation for that.

I want to be able to feed build with standard Java config file (in format "key"="value") and then refer to those parameters like every other parameters during the build.

Do you know of an appropriate solution?

Answers


Use EnvInject Plugin to read your parameters from a file as environment variables in an Inject Environment Variables build step. The glitch is that then you can't override them easily. One solution would be to use it in conjunction with the Conditional BuildStep Plugin. You can then can define a boolean parameter OVERRIDE that would be false by default. You can then run your Inject build step conditionally only when OVERRIDE is false. When you need to override your parameters with values provided by hand (on in a custom call to run the job) specify the override values and set OVERRIDE to true.


I use hudson with ant and set parameters (customer) in my hudson job. This parameter is then the name of a property file that i open with ant as follow:

<loadproperties> srcFile="${project.dir}/build/resources/${customer}.properties"/>

Need Your Help

ASP .NET AJAX and JQuery

asp.net jquery ajax

I'm trying to set up a simple JQuery example in order to make AJAX calls to a .NET webservice. Using the following example below I'm getting AJAX errors that are just saying 0 in the result instead...

Fluid Spacing for a div

javascript jquery css jquery-ui addthis

I have a page that features a main image. The main image will change its height and width depending on the photo. I also have an AddThis sharing widget next to the image. I have the spacing correct...