[英]Configuring a single Jenkins job for multiple maven projects
I have 3 library projects based on Maven, A, B, and C. 我有3个基于Maven,A,B和C的图书馆项目。
A 一种
-- B -B
-- --C - - C
Here C is dependent on both A & B and B is dependent on A. 在此,C依赖于A和B,而B依赖于A。
Now I want to know, how can I configure a Jenkins job in such a way that a single job runs all three projects as per their dependency order? 现在,我想知道如何配置Jenkins作业,以使单个作业按照其依赖顺序运行所有三个项目?
Things I did: I created 3 Jenkins job and adding a relationship between them as per their build order. 我所做的事情:我创建了3个Jenkins职位,并按照其构建顺序在它们之间添加了关系。
I want a single job to do this. 我想要一份工作来做到这一点。 I might be missing something. 我可能会缺少一些东西。 Any help will be great. 任何帮助都会很棒。
Create a pipeline job with 3 stage can solve it. 创建一个具有3个阶段的管道作业可以解决该问题。
....
stages {
stage ('build A') {
(steps in A)
}
stage ('build B') {
(steps in B)
}
stage ('build C') {
(steps in C)
}
}
...
In pipeline each stage depends on the result of previous one. 在流水线中,每个阶段取决于上一个阶段的结果。 You can print logs at each stage. 您可以在每个阶段打印日志。 Hope it helps. 希望能帮助到你。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.