user1111926
user1111926

Reputation: 11

build Jenkins use properties from file

I want to use the option "This build has the parameters" in Jenkins ( hudson ) and then instead of String parameters, I want to load these settings from an external file that contains all the parameters (val=value ...) . I find this plugin in the "Trigger parameterized" that puts a file paraetres but after a build, me I need this file in the first build thank you

Upvotes: 1

Views: 1570

Answers (1)

ki_
ki_

Reputation: 649

I would suggest that you specify the path to the file as a String parameter, call it PARAMS_FILE

The file should look like.

VAR1=someValue
VAR2=someOtherValue

If you use bash in your build steps then you could do.

. ${PARAMS_FILE}

At the beginning of an execute shell and the params would be set for that shell.

That would solve the problem for using shell build steps atleast.
If you use other build steps you would have to do another solution.

Upvotes: 1

Related Questions