1 jenkins job trigger multiple jenkins jobs based on parameters

梦想的初衷 提交于 2019-12-10 15:34:19

问题


Is there any Jenkins plugin that helps with the following:

  • if a directory <XXX*, is present in SVN folder <GoRoCo>
  • then the <GoRoCo>_<XXX> Jenkins job is called ?

Example:
In job "TEST" , I specify parameters like directory name (A, B , C) and folder name (G1R2) then job "TEST" should trigger the jobs "G1R2_A" , "G1R2_B" and "G1R2_C"


回答1:


Use Parameterized Trigger Plugin. When specifying jobs to call in the plugin you can use tokens, as in JOB_${PARAM1}_${PARAM2}.




回答2:


Take a look at that plugin, i think it does exactly what you are looking for:

https://wiki.jenkins-ci.org/display/JENKINS/Files+Found+Trigger




回答3:


Use Build Flow plugin

With the help this plugin you can run as many jobs with or without parameter.




回答4:


Use some scripts to create property file with the required parameters for each of the modified project and place them in the workspace directory.

Later you can use parameterised plugin to trigger downstream project like this.

Note: you might also have to delete those properties after triggering the down stream projects.



来源:https://stackoverflow.com/questions/10810975/1-jenkins-job-trigger-multiple-jenkins-jobs-based-on-parameters

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!