Re: How to use the environment variables set by a parameterized build?
Hey, Checkout the environmental variable here: https://wiki.jenkins-ci.org/display/JENKINS/Building+a+software+project Short answer: echo ${JOB_NAME} echo ${BUILD_NUMBER} On Friday, November 16, 2012 3:39:26 PM UTC-5, Martin Lichtin wrote: Hi For a parameterized build with one run parameter (let's name it X), Jenkins set three environment variables. X X.jobName X.number How can the latter two be used in a pre-step shell script? Bash cannot handle environment variables containing a dot, it seems. $ echo ${X.jobName} bash: ${X.jobName}: bad substitution
Re: Build Flow Plugin: No signature of method FlowDelegate.parallel()
Woops. Thanks a lot, Nicolas, using the closure fixed my issue. parallel ( {build(agile_code, ENVIRONMENT: params[ENVIRONMENT], ACTION: params[ACTION])}, {build(agile_db, ENVIRONMENT: params[ENVIRONMENT], ACTION: params[ACTION])} ) On Saturday, November 10, 2012 9:28:18 AM UTC-5, Nicolas De loof wrote: parallel expect a set of closures, each closure being ran in a separate thread : parallel( { build(A) }, { build(B) } ) 2012/11/9 r2_ rle...@dailyvoice.com javascript: Hey, I got a really cool looking error using Build Flow Plugin. The flow is just 2 parameterized jobs which should run in parallel on different nodes. Here's the DSL: parallel ( build(agile_code, ENVIRONMENT: params[ENVIRONMENT], ACTION: params[ACTION]), build(agile_db, ENVIRONMENT: params[ENVIRONMENT], ACTION: params[ACTION]) ) Unfortunately, the jobs run serially. Jenkins is v1.487, Build Flow Plugin is v0.5. Stacktrace is below. Apologies if I'm just plain doing this wrong. Is there a better way to run parallel jobs or a better way to use this module? Thanks! Started by user anonymous https://alpha.n-ws.org/jenkins/user/null Building remotely on delta https://alpha.n-ws.org/jenkins/computer/delta in workspace /var/lib/jenkins/workspace/test_create_environment_flow Trigger job agile_code https://alpha.n-ws.org/jenkins/job/agile_code/agile_code #11 https://alpha.n-ws.org/jenkins/job/agile_code/11/ completed Trigger job agile_db https://alpha.n-ws.org/jenkins/job/agile_db/agile_db #7 https://alpha.n-ws.org/jenkins/job/agile_db/7/ completed FATAL: No signature of method: com.cloudbees.plugins.flow.FlowDelegate.parallel() is applicable for argument types: (com.cloudbees.plugins.flow.JobInvocation, com.cloudbees.plugins.flow.JobInvocation) values: [running job :agile_code, running job :agile_db] Possible solutions: parallel([Lgroovy.lang.Closure;), parallel(java.util.Collection)groovy.lang.MissingMethodException http://stacktrace.jenkins-ci.org/search?query=groovy.lang.MissingMethodException: No signature of method: com.cloudbees.plugins.flow.FlowDelegate.parallel() is applicable for argument types: (com.cloudbees.plugins.flow.JobInvocation, com.cloudbees.plugins.flow.JobInvocation) values: [running job :agile_code, running job :agile_db] Possible solutions: parallel([Lgroovy.lang.Closure;), parallel(java.util.Collection) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:532) at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:77) at org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrapNoCoerce.callConstructor(ConstructorSite.java:102) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:198) at com.cloudbees.plugins.flow.FlowDelegate.methodMissing(FlowDSL.groovy:235) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90) at groovy.lang.MetaClassImpl.invokeMissingMethod(MetaClassImpl.java:811) at groovy.lang.MetaClassImpl.invokePropertyOrMissing(MetaClassImpl.java:1103) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1056) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:884) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:704) at com.cloudbees.plugins.flow.FlowDelegate.invokeMethod(FlowDSL.groovy) at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeOnDelegationObjects(ClosureMetaClass.java:407) at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:348) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:884) at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:66) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:46) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:133) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:145) at Script1$_run_closure1.doCall(Script1.groovy:3) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method
Build Flow Plugin: No signature of method FlowDelegate.parallel()
Hey, I got a really cool looking error using Build Flow Plugin. The flow is just 2 parameterized jobs which should run in parallel on different nodes. Here's the DSL: parallel ( build(agile_code, ENVIRONMENT: params[ENVIRONMENT], ACTION: params[ACTION]), build(agile_db, ENVIRONMENT: params[ENVIRONMENT], ACTION: params[ACTION]) ) Unfortunately, the jobs run serially. Jenkins is v1.487, Build Flow Plugin is v0.5. Stacktrace is below. Apologies if I'm just plain doing this wrong. Is there a better way to run parallel jobs or a better way to use this module? Thanks! Started by user anonymous https://alpha.n-ws.org/jenkins/user/null Building remotely on delta https://alpha.n-ws.org/jenkins/computer/delta in workspace /var/lib/jenkins/workspace/test_create_environment_flow Trigger job agile_code https://alpha.n-ws.org/jenkins/job/agile_code/agile_code #11 https://alpha.n-ws.org/jenkins/job/agile_code/11/ completed Trigger job agile_db https://alpha.n-ws.org/jenkins/job/agile_db/agile_db #7 https://alpha.n-ws.org/jenkins/job/agile_db/7/ completed FATAL: No signature of method: com.cloudbees.plugins.flow.FlowDelegate.parallel() is applicable for argument types: (com.cloudbees.plugins.flow.JobInvocation, com.cloudbees.plugins.flow.JobInvocation) values: [running job :agile_code, running job :agile_db] Possible solutions: parallel([Lgroovy.lang.Closure;), parallel(java.util.Collection)groovy.lang.MissingMethodException http://stacktrace.jenkins-ci.org/search?query=groovy.lang.MissingMethodException: No signature of method: com.cloudbees.plugins.flow.FlowDelegate.parallel() is applicable for argument types: (com.cloudbees.plugins.flow.JobInvocation, com.cloudbees.plugins.flow.JobInvocation) values: [running job :agile_code, running job :agile_db] Possible solutions: parallel([Lgroovy.lang.Closure;), parallel(java.util.Collection) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:532) at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:77) at org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrapNoCoerce.callConstructor(ConstructorSite.java:102) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:198) at com.cloudbees.plugins.flow.FlowDelegate.methodMissing(FlowDSL.groovy:235) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90) at groovy.lang.MetaClassImpl.invokeMissingMethod(MetaClassImpl.java:811) at groovy.lang.MetaClassImpl.invokePropertyOrMissing(MetaClassImpl.java:1103) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1056) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:884) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:704) at com.cloudbees.plugins.flow.FlowDelegate.invokeMethod(FlowDSL.groovy) at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeOnDelegationObjects(ClosureMetaClass.java:407) at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:348) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:884) at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:66) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:46) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:133) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:145) at Script1$_run_closure1.doCall(Script1.groovy:3) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90) at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233) at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:272) at