0

Any idea how to use parameters from the job's environment in the Combination Filter for multi-configuration job?

I've tried : index%3 == 0 and it's working properly, but I want to replace (3) with ${EXECUTOR_NUMBER} to make the runs more dynamic.

When using EXECUTOR_NUMBER I'm getting:

javax.servlet.ServletException: org.jenkinsci.plugins.scriptsecurity.sandbox.RejectedAccessException: Scripts not permitted to use method groovy.lang.GroovyObject invokeMethod java.lang.String java.lang.Object (Script1 $ Script1$_run_closure1)

Tried looking online but couldn't find any good examples - would appreciate the help

Dvir669
  • 6,577
  • 1
  • 20
  • 21
  • 1
    Voting down makes no sense when no comment is added about what is missing in the post. Thanks guys. – Dvir669 May 22 '16 at 15:08

1 Answers1

1

You can try Matrix Groovy Execution Strategy which gives you a more powerful way to specify which combinations to run.

println '---------parameters--------'
parameters.each{ k,v ->
    println "${k}-->${v}"
}
println '-------------env--------------'
env.each{ k,v ->
    println "${k}-->${v}"
}
println '--------------------------------'

will display stuff you can use.

The combinations are passed in and it expects a tree map out of the combinations to run.

Disclosure: I created the plugin

KeepCalmAndCarryOn
  • 8,817
  • 2
  • 32
  • 47