詹金斯建立其他工作的渠道 [英] Jenkins pipeline for building other jobs
问题描述
我在Jenkins中构建了四个iOS框架.作业是sdk_ios_f1,sdk_ios_f2,sdk_ios_f3和sdk_ios_f4.有一个使用这些框架的xcode项目.是sdk_ios_p.
I have four iOS frameworks that I build in Jenkins. The jobs are sdk_ios_f1, sdk_ios_f2, sdk_ios_f3, and sdk_ios_f4. There is an xcode project that uses these frameworks. It is sdk_ios_p.
我想创建一个Jenkins管道,该管道将按顺序构建这些作业:
I want to create a Jenkins pipeline that will build these jobs in order:
pipeline {
agent any
stages {
stage('Desc1') {
steps {
dir('/Users/Shared/Jenkins/Home/workspace/') {
build job: 'sdk_iOS_f1', quietPeriod: 5
build job: 'sdk_iOS_f2', quietPeriod: 5
}
}
}
stage('Desc2') {
steps {
dir('/Users/Shared/Jenkins/Home/workspace/') {
build job: 'sdk_iOS_d3', quietPeriod: 5
build job: 'sdk_iOS_f4', quietPeriod: 5
}
}
}
}
}
这两个阶段显示在Jenkins页面上,并且管道开始运行,但是它永远不会超过计划第一个构建(sdk_ios_f1)的时间.
The two stages are shown on the Jenkins page and the pipeline starts but it never gets past scheduling the first build (sdk_ios_f1).
请问,我需要做什么才能按列出的顺序运行作业?
Please, what do I need to do in order to run the jobs and in the order listed?
Started by user Smith Smith
[Pipeline] node
Running on Jenkins in
/Users/Shared/Jenkins/Home/workspace/pipeline_all_develops
[Pipeline] {
[Pipeline] stage
[Pipeline] { (Desc1)
[Pipeline] dir
Running in /Users/Shared/Jenkins/Home/workspace
[Pipeline] {
[Pipeline] build (Building sdk_iOS_f1)
Scheduling project: sdk_iOS_f1
(永远不会过去)
推荐答案
已修复!哈哈.只有一名执行者,所以管道阻塞了所有其他执行者.我添加了一个执行程序,一切都很好.
Fixed! Haha. There was only one executor so the pipeline was blocking all others. I added an executor and all is well.
这篇关于詹金斯建立其他工作的渠道的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!