Skip to content

Trigger After Upstream Project

If this is in a Jenkinsfile it will register your project’s main branch to be built after the ACE/ubi8/main has been successfully built.

pipeline {
triggers {
upstream(
upstreamProjects: env.BRANCH_NAME == 'main' ? 'ACE/ubi8/main' : ''
)
}
Use the full project name

Which is available under any Pipeline/Branch on the “Stage view”/“Builds” page.


Sources:
  • https://www.jenkins.io/doc/book/pipeline/syntax/#triggers
  • https://stackoverflow.com/questions/46733438/how-do-i-set-up-pipelinetriggers-using-a-declarative-jenkinsfile
  • https://stackoverflow.com/questions/40176995/jenkins-pipeline-how-to-build-job-build-after-multibranch-project-is-built