0

I have a Jenkins job which accepts only BranchName(bitbucket) as an input parameter.

I have scheduled this Job to run every morning 7 AM with Build periodically option H 7 * * *.

On triggering automatically, it takes default input parameter as development.

Now my requirement is that I need to pass few other branch names as input parameter automatically.

One option I tried it Down stream job with other branch name, but that works only from one branch and not a sophisticated solution.

Is there an easy way I can achieve this?

Job Configuration

  • Can you give a try using [Extensible Choice Parameter](https://plugins.jenkins.io/extensible-choice-parameter/) – Sourav Aug 09 '20 at 08:42

1 Answers1

0

If you only want to run a known set of branches you can either:

If you need to get the list of branches dynamically, I would assume, that running sh script: 'git branch', returnStdout: true and some Groovy string split operation is the easiest way to archive that.

crash
  • 603
  • 4
  • 11