Jenkins downstream jobs not triggered after enabling security
I currently have two jenkins freestyle jobs setup. One is titled AutomatedBackup, and the other AutomatedBackupCleanup. Upon successful completion of the AutomatedBackup job, the AutomatedBackupCleanup job is triggered.
I have recently enabled security on my Jenkins instance, which appears to have broken the trigger between the two jobs. The console output from the AutomatedBackup job looks like so:
Started by user Chuck Norris
Running as Chuck Norris
Building on master in workspace /var/lib/jenkins/jobs/AutomatedBackup/workspace
The documentation states:
The special case of the Reverse Triggering
The reverse triggering is when the downstream job is configured to be triggered after the upstream job.
When the build authorisations are configured triggers are executed by default as anonymous.
If the upstream job visibility is limited, the downstream job won’t see the upstream and thus it won’t be triggered. To make such triggering working, you will have to configure the downstream job to run as a user having the permission to see the upstream job.
In order to get the triggered job to trigger, I had to set the project Authorization to run as a specific user (my user Chuck Norris). After setting this value for the project Authorization, my downstream job was then triggered.