6
這是我試圖執行的Jenkins管道。我正在關注this tutorial:Jenkins與平行管道
pipeline {
agent any
stages {
stage('one') {
parallel "first" : {
echo "hello"
},
"second": {
echo "world"
}
}
stage('two') {
parallel "first" : {
echo "hello"
},
"second": {
echo "world"
}
}
}
}
但是,作業失敗並顯示以下消息。
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
WorkflowScript: 4: Unknown stage section "parallel". Starting with version 0.5, steps in a stage must be in a steps block. @ line 4, column 9.
stage('one') {
^
WorkflowScript: 12: Unknown stage section "parallel". Starting with version 0.5, steps in a stage must be in a steps block. @ line 12, column 9.
stage('two') {
^
WorkflowScript: 4: Nothing to execute within stage "one" @ line 4, column 9.
stage('one') {
^
WorkflowScript: 12: Nothing to execute within stage "two" @ line 12, column 9.
stage('two') {
^
4 errors
有人可以幫我解答爲什麼這是失敗的。
非常感謝你,它的工作 – Shahzeb
但這使步驟平行,而不是階段。無論如何,我還沒有找到更好的解決方案。 –