How do I run a stage in Jenkins only on pull request?
问题 I have a Jenkinsfile-based pipeline with several stages in it right now that is triggered by webhook on every commit to Github. I'd like to keep the "build" and "unit tests" stages running on every commit, but ONLY run the "integration tests" stage when the branch is up for pull request. What I want: stage("build)"{ // runs every commit } stage("unit tests"){ // runs every commit } stage("integration tests"){ // runs ONLY on pull request } I've been unable to find a solution to this, any