in out company we execute parallel test executions when each test gets it’s own node… The nodes are an aws spot type agents, which by policy can be taken by aws and get terminated while in progress. We want to re execute the stages which nodes were terminated by aws and we came across the Pipeline retry step retry-the-body-up-to-n-times step with condition, which can be set to retry a pipeline stage in case agent was interrupted. To use it we need to pass array of Nested Choice of Objects - in my case single object of “agent” i tried to execute the next code with different syntax attempts:
Also: hudson.AbortException: error 22 12:06:01 at org.jenkinsci.plugins.workflow.steps.ErrorStep$Execution.run(ErrorStep.java:63) 12:06:01 at org.jenkinsci.plugins.workflow.steps.ErrorStep$Execution.run(ErrorStep.java:50) 12:06:01 at org.jenkinsci.plugins.workflow.steps.SynchronousStepExecution.start(SynchronousStepExecution.java:37) 12:06:01 at org.jenkinsci.plugins.workflow.cps.DSL.invokeStep(DSL.java:319) 12:06:01 at org.jenkinsci.plugins.workflow.cps.DSL.invokeMethod(DSL.java:193) 12:06:01 at org.jenkinsci.plugins.workflow.cps.CpsScript.invokeMethod(CpsScript.java:122) 12:06:01 at sun.reflect.GeneratedMethodAccessor1245.invoke(Unknown Source) 12:06:01 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 12:06:01 at java.lang.reflect.Method.invoke(Method.java:498) 12:06:01 at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93) 12:06:01 at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325) 12:06:01 at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1213) 12:06:01 at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1022) 12:06:01 at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:42) 12:06:01 at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48) 12:06:01 at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113) 12:06:01 at org.kohsuke.groovy.sandbox.impl.Checker$1.call(Checker.java:163) 12:06:01 at org.kohsuke.groovy.sandbox.GroovyInterceptor.onMethodCall(GroovyInterceptor.java:23) 12:06:01 at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SandboxInterceptor.onMethodCall(SandboxInterceptor.java:158) 12:06:01 at org.kohsuke.groovy.sandbox.impl.Checker$1.call(Checker.java:161) 12:06:01 at org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(Checker.java:165) 12:06:01 at org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(Checker.java:135) 12:06:01 at org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(Checker.java:135) 12:06:01 at org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(Checker.java:135) 12:06:01 at org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(Checker.java:135) 12:06:01 at org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(Checker.java:135) 12:06:01 at org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(Checker.java:135) 12:06:01 at com.cloudbees.groovy.cps.sandbox.SandboxInvoker.methodCall(SandboxInvoker.java:17) 12:06:01 at WorkflowScript.run(WorkflowScript:32) 12:06:01 at cps.transform(Native Method) 12:06:01 at com.cloudbees.groovy.cps.impl.ContinuationGroup.methodCall(ContinuationGroup.java:86) 12:06:01 at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.dispatchOrArg(FunctionCallBlock.java:113) 12:06:01 at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.fixArg(FunctionCallBlock.java:83) 12:06:01 at sun.reflect.GeneratedMethodAccessor897.invoke(Unknown Source) 12:06:01 java.lang.NoSuchMethodError: No such DSL method ‘kubernetesAgent’ found among steps
Do i need to use a specific plugin for it ?
I tried to look for kubernetesAgent object doc but couldn’t find it , Can u please point me to “agent” which is another option conditions can receive?