简体   繁体   中英

Jenkins pass json file to triggered downstream job

I have a job that has a json file in its parameters. I have this job trigger another job and it needs to pass the parameters. I have 'Current build parameters' enabled, but it does not pass files. How can I get it to pass the json file to the triggered job.

I did have this working before, we were on 2016 verion of jenkins and recently upgraded to 2.286.

I'm not sure about the breaking change that your Jenkins might have experienced, but as a workaround, you can assign a global environment variable in Configure Jenkins to point a path to your JSON file.

That variable will be accessible to all jobs, and they can easily refer to it.

For every matching file, invoke one build worked to pass the file. Just typed in the name of the file that I have in the parameters

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