I have a way to force a similar variation of this bug:
- Clean install of Jenkins 2.149 on a Windows box
- Install the default set of plugins along with Parameterized Trigger
- Create a new job with the following options:
- Name: Test1
- Type: Pipeline
- General:
- Discard old builds
- Pipeline script:
- pipeline {
agent any parameters { string(name: 'TEST1', defaultValue: 'test', description: 'test') string(name: 'TEST2', defaultValue: 'test', description: 'test') string(name: 'TEST3', defaultValue: 'test', description: 'test') string(name: 'TEST4', defaultValue: 'test', description: 'test') string(name: 'TEST5', defaultValue: 'test', description: 'test') string(name: 'TEST6', defaultValue: 'test', description: 'test') string(name: 'TEST7', defaultValue: 'test', description: 'test') string(name: 'TEST8', defaultValue: 'test', description: 'test') string(name: 'TEST9', defaultValue: 'test', description: 'test') } options { timestamps() timeout( time: 2, unit: 'HOURS') skipDefaultCheckout() buildDiscarder logRotator( daysToKeepStr: '14', numToKeepStr: '30' ) } stages
Unknown macro: { stage ('sync') { steps { echo '### Sync code' } }
stage ('cleanup') { steps { echo '### Clean up environment' } } stage ('setup') { steps { echo '### Set up environment' } } stage('download') { steps { echo '### Download stuff' } } stage('prepare') { steps { echo '### Prepare stuff' } } stage ('wait') { steps { echo "### Wait a bit" } } stage ('shutdown') { steps { echo "### Shutdown" } } } post { failure { echo 'Failed' } success { echo 'Succeeded' } } }
- Clone the job 9 more times so that you have Test1 - Test10
- Create a new job with the following options:
- Name: Test-Trigger
- Type: Freestyle Project
- General:
- Build Triggers:
- Build Periodically(*/1 * * * *)
- Post-Build Actions:
- Trigger parameterized build on other projects
- Projects to build: Test1, Test2, Test3, Test4, Test5, Test6, Test7, Test8, Test9, Test10
- Trigger when build is: Stable
- Trigger build without parameters: X
If you let it run for long enough, you should intermittently get the error. When the error occurs, all 10 jobs will display it simultaneously, and it will continue to occur for the next 10 minutes. If you get impatient and want to force the error to happen, I've had success with the following additional steps:
- Edit the Test4 job
- Change the options block in the pipeline script to the following:
- options { timestamps() timeout( time: 2, unit: 'HOURS') skipDefaultCheckout() buildDiscarder logRotator( daysToKeepStr: '14', numToKeepStr: '30' ) }
|