0

Basically, I have some slow tests and some fast tests, and three branches, dev staging and production. There are tons of PRs against dev, but only a weekly PR against staging. I'd only like to run the slow test suite when I make a PR against staging, to ensure nothing broken ever goes into staging. Is there a way to tell Jenkins "Run this test job for PRs against staging?"

John
  • 2,575
  • 1
  • 17
  • 29

1 Answers1

0

I figured this out. There is a Jenkins environment variable named CHANGE_TARGET which contains the name of the branch you're making a PR against. This can be accessed by writing ${env.CHANGE_TARGET}.

John
  • 2,575
  • 1
  • 17
  • 29