I am using the variable buildEnvironment to determine which set of nodes 
the branch should be built on.
Each release branch (including git master) has their own list of slave 
nodes.

Jenkinsfile:
#!groovy

def buildEnvironment = "master"
def param2 = null
String[] args = [buildEnvironment, param2] as String[]

def build = new com.company.ci.Build()
build.execute(args)

There has been some concerns that the Jenkinsfile could cause forever merge 
conflicts because one parameter is different among different branches.
origin/master -> def buildEnvironment = "master"
origin/releaseA -> def buildEnvironment = "releaseA"

I could use the branch name to determine which buildEnvironment to use, but 
that would not work when it is a feature or work branch created from either 
master or a release branch. The branch name master would work for branch 
master, but not myUser/work that is branched out of master.

Anyone have any idea how this can be solved without keeping the parameter 
buildEnvironment in the Jenkinsfile?

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/961d197c-3011-4048-8d63-3804dd2938d0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to