'trigger pipeline job from jenkins pipeline script
I have two pipeline jobs which are job A and job B. I need to trigger job B while job A is running.. because job A will not finish due to some API calls. so I need to start the next pipeline job B.
how can we trigger another pipeline job from the Jenkins file?
All the parallel blocks of a,b,c need to run.
Below I have pasted the job A Jenkins script.
pipeline {
agent any
stages {
stage('need to run parallelly'){
steps {
parallel(
a:{
dir('file path'){
bat """
npm install
"""
}
},
b:{
dir('file path'){
bat """
npm start
"""
}
},
c:{
build job: 'JOB_B'
}
)
}
}
}
}
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|