Re: Problem defining global variables

2017-01-05 Thread Sverre Moe
Must be a way in Jenkinsfile to access variables set within a Shared Library script. I could set a return variable for execute(), not a good solutions if I want to access more than one variable. def build = new com.company.ci.Build() def foo = build.execute() Unless I can return the variables o

Re: Problem defining global variables

2016-12-19 Thread Sverre Moe
Is it a problem with scope perhaps? Tried setting foo first before calling build.execute() variables.setFoo(true) def build = new com.company.ci.Build() build.execute() def foo = variables.isFoo() if (foo) { println "We got foo" } else{ println "No foo" } Within build.execute() it sets foo t