I've I have 2 Jenkins Job: A freestyle job 'A' and Pipeline 'B'
I want to build 'A' job inside 'B' in one of my stages.
I've tried building it this way inside my jenkins file:
stage('Running A') {
agent none
steps{
build job: 'A'
}
}
but it doesn't work. I get:
no item named 'A' found
Is there anyone who's familiar with this kind of method please guide me.
Instead of build job: 'A'
I've changed it to build 'A'
That's how it worked for me.
It's possible that you're not using the correct job name.
Get the job name of A
by REST API
at the bottom left or updating the script to run echo env.JOB_NAME && exit 1
temporarily.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.