Parallel nghĩ các stage trong pipeline sẽ chạy đồng thời.
Parallel
if pipeline doesn’t have problem.
pipeline{
agent{
label "k8s-permanent"
}
stages{
stage("Stages Running in Parallel"){
failFast true
parallel{
stage("stage 1"){
steps {
echo "stage1 executing"
sleep 10
}
}
stage("stage 2"){
steps {
echo "stage2 executing"
sleep 10
}
}
stage("stage 3"){
steps {
echo "stage3 executing"
sleep 10
}
}
}
}
}
}
![](https://nimtechnology.com/wp-content/uploads/2021/10/image-452.png)
if a stage was error
![](https://nimtechnology.com/wp-content/uploads/2021/10/image-453.png)
![](https://nimtechnology.com/wp-content/uploads/2021/10/image-454.png)
pipeline{
agent{
label "k8s-permanent"
}
stages{
stage("Stages Running in Parallel"){
failFast true
parallel{
stage("stage 1"){
steps {
echo "stage1 executing"
sleep 10
}
}
stage("stage 2"){
steps {
echo "stage2 executing"
error "simulating error stage2"
sleep 2
}
}
stage("stage 3"){
steps {
echo "stage3 executing"
sleep 10
}
}
}
}
}
}