I have a Jenkins pipeline job like this:
triggers {
parameterizedCron(env.BRANCH_NAME == "master" ? "0 12 * * * % RUN_E2E=true;MODE=parallel" : "")
}
Later I have conditional logic like this:
stage('Build Release') {
when {
allOf {
branch 'master'
not {
triggeredBy 'TimerTrigger'
}
}
}
The triggeredBy is not activated however. That is, "not triggered by timerTrigger" appears to be true even when the parameterizedCron runs.
I got this example from the docs here.
My question is, if I want my build/release stage to execute only on branch == master, and not during the parameterizedCron execution, how can I do that?