Jenkins中与Multijob相关的查询 [英] Multijob related query in Jenkins
问题描述
我在詹金斯有一份工作.此多任务包含以下任务: i)工作1:在Unix盒工作区中从GIT同步和构建 ii)作业2:它从同一工作空间运行API测试执行
I have a multijob in Jenkins. This multijob contains following jobs: i) Job 1: that sync and build from GIT in an Unix box workspace ii) Job 2: it runs the API test execution from the same workspace
仅当在GIT中签入了代码更改时,我才想同时运行作业1和作业2.目前,我为两个作业都选择了仅当SCM更改时才构建"选项.但是我面临的问题是,如果代码发生更改,则作业1正在运行,但如果Unix box工作区目录中没有与测试用例相关的更改,则作业2未运行. 请提出建议.
I want to run the Job 1 and 2 both only if there is code change checked in into GIT. Currently I have selected "Build only if SCM changes" option for both of the jobs. But the issue I am facing is, if there is code change then the Job 1 is running but the Job 2 is not running if there is no test case related changes in the Unix box workspace directory. Please suggest.
推荐答案
使用下面提到的插件
https://wiki.jenkins-ci.org/display/JENKINS/Gerrit + Trigger
请参阅上述链接中的"Git插件的使用"部分
Refer to the section: Usage with the Git Plugin in the above link
按照上图配置您的两个作业,如果对git repo进行了签入更改,则应同时触发两个作业.
Configure both your jobs as per the image above and both your jobs should be triggered if there is a change checked in to git repo.
这篇关于Jenkins中与Multijob相关的查询的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!