Использование Jenkinsfile Parallel Example - зависает в ожидании запланированной задачи.Я предполагаю, что пример должен работать.В этом примере параллельный этап был пропущен из-за
when branch master
, поэтому я удалил его.К сожалению, это приводит к зависанию процесса.Я также добавил узел к метке агента ... не помогло
agent { node { label "for-branch-a" } }
Может кто-нибудь сказать мне, как это работает?
pipeline {
agent any
stages {
stage('Non-Parallel Stage') {
steps {
echo 'This stage will be executed first.'
}
}
stage('Parallel Stage') {
when {
branch 'master'
}
failFast true
parallel {
stage('Branch A') {
agent {
label "for-branch-a"
}
steps {
echo "On Branch A"
}
}
stage('Branch B') {
agent {
label "for-branch-b"
}
steps {
echo "On Branch B"
}
}
}
}
}
}
Зависает на обеих ветвях А иB
> This stage will be executed first.
[Pipeline] }
[Pipeline] // stage
[Pipeline] stage
[Pipeline] { (Parallel Stage)
[Pipeline] parallel
[Pipeline] [Branch A] { (Branch: Branch A)
[Pipeline] [Branch B] { (Branch: Branch B)
[Pipeline] [Branch A] stage
[Pipeline] [Branch A] { (Branch A)
[Pipeline] [Branch B] stage
[Pipeline] [Branch B] { (Branch B)
[Pipeline] [Branch A] node
[Pipeline] [Branch B] node
[Branch A] Still waiting to schedule task
[Branch A] There are no nodes with the label ‘for-branch-a’
[Branch B] Still waiting to schedule task
[Branch B] There are no nodes with the label ‘for-branch-b’