简体   繁体   中英

Multi configuration Jenkins job

I have a multi configuration matrix job that consists of 3 configurations. I have one user defined axis lets call it ParameterA and it has 3 values value1, value2, value3 for each configuration.

The job also has a promote process. In the promote process I copy the 3 artifacts produced and I'd like to use groovy/curl to push them to Artifactory.

In order to do this I need to loop through the names of the artifacts (the names are made up of the jobName-.

Is there a way to retrieve or save all the values of ParameterA so that I can loop through them and perform a curl command to upload each one?

Something like ParameterA=value1,value2,value3

One way you could do this is by using the Groovy Postbuild Plugin in the promote process job (I'm assuming it's a separate job?).

In the postbuild step, you will have access to the Jenkins model which contains everything you would probably need to extract the ParameterA axis, as well as the ability to upload via groovy/curl.

Unfortunately, I can't get to the Jenkins javadoc right now, so I couldn't look up the necessary functions to retrieve the corresponding ParameterA axis, but hopefully this will get you started.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM