Alternating between two branchs in branch specifier in jenkins without pipeline and plugins

24 Views Asked by At

I have a jenkins build that is running on a schedule and have some logic written in bash, The branch specifier is a parameter passed by the user, i'd like to alternate between two different branches so every other run of the build is with a different branch specifier , how can I achieve this? I cannot install plugins (lets not go there :) also transitioning to pipeline cannot be done too.. not sure what path to go here but i feel like its still achievable somehow? any ideas?

I haven't tried much because there's no good lead to try, couldn't find anything solid to try

1

There are 1 best solutions below

0
John Q Citizen On

i'd like to alternate between two different branches so every other run of the build is with a different branch specifier, how can I achieve this?

Seems like you need two jobs:

  • Job A checking out Branch A at intervals 1, 3, 5, 7, etc
  • Job B checking out Branch B at intervals 2, 4, 6, 8, etc