pipeline scripts errors on older jenkins (and how do I hpi:run better)

204 views
Skip to first unread message

Gavin Mogan

unread,
Jun 8, 2016, 2:11:19 PM6/8/16
to Jenkins Developers
I've been debating if this should go to the users list, but because I'm trying to test my plugin development, I figured here might be better.

I've checked both the dev list and the user list for anything related to this, and so all I could find out was it was something todo with the bytecode transpiler or something.

The saucelabs plugin uses 1.609.2 as its baseline, so when I went to test some pipeline support on the base version, I found through trial and error that it works in 1.633. Am I going to have to update the baseline version? Is there a way to tell hpi:run to run a more modern version of jenkins?

Gavin

Error:

Started by user anonymous
java.lang.VerifyError: Expecting a stackmap frame at branch target 36
Exception Details:
  Location:
    org/jenkinsci/plugins/workflow/cps/CpsThread.<init>(Lorg/jenkinsci/plugins/workflow/cps/CpsThreadGroup;ILcom/cloudbees/groovy/cps/Continuable;Lorg/jenkinsci/plugins/workflow/cps/FlowHead;Lorg/jenkinsci/plugins/workflow/cps/ContextVariableSet;)V @27: ifeq
  Reason:
    Expected stackmap frame at this location.
  Bytecode:
    0x0000000: 2ab7 002d 2abb 002f 59b7 0030 b500 322a
    0x0000010: 2bb5 0034 2a1c 1202 b800 3899 0009 b500
    0x0000020: 3aa7 0006 b500 3a2a 2bb6 0040 b600 4699
    0x0000030: 000f bb00 4859 2d2a b700 4ba7 0004 2db5
    0x0000040: 004d 2a19 04b5 004f 2a19 05b5 0051 b1  

	at org.jenkinsci.plugins.workflow.cps.CpsScript.<init>(CpsScript.java:63)
	at WorkflowScript.<init>(WorkflowScript)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
	at java.lang.Class.newInstance(Class.java:442)
	at org.codehaus.groovy.runtime.InvokerHelper.createScript(InvokerHelper.java:408)
	at groovy.lang.GroovyShell.parse(GroovyShell.java:743)
	at org.jenkinsci.plugins.workflow.cps.CpsGroovyShell.reparse(CpsGroovyShell.java:106)
	at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.parseScript(CpsFlowExecution.java:376)
	at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.start(CpsFlowExecution.java:343)
	at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:212)
	at hudson.model.ResourceController.execute(ResourceController.java:98)
	at hudson.model.Executor.run(Executor.java:381)
Finished: FAILURE

Jesse Glick

unread,
Jun 8, 2016, 4:13:54 PM6/8/16
to Jenkins Dev
On Wed, Jun 8, 2016 at 2:11 PM, Gavin Mogan <ga...@gavinmogan.com> wrote:
> The saucelabs plugin uses 1.609.2 as its baseline, so when I went to test
> some pipeline support on the base version, I found through trial and error
> that it works in 1.633. Am I going to have to update the baseline version?

Try

<java.level>6</java.level>

cf. JENKINS-28781, JENKINS-30820

Gavin Mogan

unread,
Jun 8, 2016, 4:28:50 PM6/8/16
to jenkin...@googlegroups.com
Awesome.

I realized thats from upgrading to the latest parent pom system too (which i've been lazy and putting off)

I love that they are now decoupled and have all the new warnings and issues

Is there a way to figure out which workflow plugins work with which lts?

[INFO] --- maven-enforcer-plugin:1.3.1:enforce (display-info) @ sauce-ondemand ---
[INFO] Restricted to JDK 1.6 yet org.jenkins-ci.plugins.workflow:workflow-basic-steps:jar:1.15:compile contains org/jenkinsci/plugins/workflow/steps/MailStep.class targeted to JDK 1.7
[INFO] Restricted to JDK 1.6 yet org.jenkins-ci.plugins.workflow:workflow-job:jar:1.15:compile contains org/jenkinsci/plugins/workflow/job/WorkflowJob$DescriptorImpl.class targeted to JDK 1.7
[INFO] Restricted to JDK 1.6 yet org.jenkins-ci.plugins.workflow:workflow-support:jar:1.15:compile contains org/jenkinsci/plugins/workflow/support/steps/ExecutorStepExecution$PlaceholderTask.class targeted to JDK 1.7
[INFO] Restricted to JDK 1.6 yet org.jenkins-ci.plugins.workflow:workflow-step-api:jar:1.15:compile contains org/jenkinsci/plugins/workflow/steps/EnvironmentExpander$MergedEnvironmentExpander.class targeted to JDK 1.7
[INFO] Restricted to JDK 1.6 yet org.jenkins-ci.plugins.workflow:workflow-api:jar:1.15:compile contains org/jenkinsci/plugins/workflow/visualization/table/FlowNodeViewColumn.class targeted to JDK 1.7
[INFO] Restricted to JDK 1.6 yet org.jenkins-ci.plugins.workflow:workflow-cps:jar:1.15:compile contains org/jenkinsci/plugins/workflow/cps/CpsFlowDefinition$DescriptorImpl.class targeted to JDK 1.7
[INFO] Restricted to JDK 1.6 yet org.seleniumhq.selenium:selenium-api:jar:2.53.0:compile contains com/thoughtworks/selenium/BrowserConfigurationOptions.class targeted to JDK 1.7
[INFO] Restricted to JDK 1.6 yet org.jenkins-ci.plugins.workflow:workflow-scm-step:jar:1.15:compile contains org/jenkinsci/plugins/workflow/steps/scm/SubversionStep$DescriptorImpl.class targeted to JDK 1.7
[WARNING] Rule 2: org.apache.maven.plugins.enforcer.EnforceBytecodeVersion failed with message:
Found Banned Dependency: org.jenkins-ci.plugins.workflow:workflow-basic-steps:jar:1.15
Found Banned Dependency: org.jenkins-ci.plugins.workflow:workflow-job:jar:1.15
Found Banned Dependency: org.jenkins-ci.plugins.workflow:workflow-support:jar:1.15
Found Banned Dependency: org.jenkins-ci.plugins.workflow:workflow-step-api:jar:1.15
Found Banned Dependency: org.jenkins-ci.plugins.workflow:workflow-api:jar:1.15
Found Banned Dependency: org.jenkins-ci.plugins.workflow:workflow-cps:jar:1.15
Found Banned Dependency: org.seleniumhq.selenium:selenium-api:jar:2.53.0
Found Banned Dependency: org.jenkins-ci.plugins.workflow:workflow-scm-step:jar:1.15
Use 'mvn dependency:tree' to locate the source of the banned dependencies.


--
You received this message because you are subscribed to a topic in the Google Groups "Jenkins Developers" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jenkinsci-dev/nUwHKxY_chU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jenkinsci-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/CANfRfr3D2Vp0h-CTsVOvyPNHq2iqZBG_%2Bbjb3oGyd71GwJPhsQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Gavin Mogan

unread,
Jun 8, 2016, 4:37:16 PM6/8/16
to jenkin...@googlegroups.com
ah I found out workflow 1.14 will work.
Selenium libs however won't.

I'll have to rethink this a bit. Thanks!

Jesse Glick

unread,
Jun 8, 2016, 4:45:21 PM6/8/16
to Jenkins Dev
On Wed, Jun 8, 2016 at 4:37 PM, Gavin Mogan <ga...@gavinmogan.com> wrote:
> ah I found out workflow 1.14 will work.

1.14.2 even. https://github.com/jenkinsci/pipeline-plugin/blob/master/CHANGES.md

> Selenium libs however won't.

Yeah if this is a compile-time dependency and requires Java 7, then
your plugin would not work for Java 6 users on older versions of
Jenkins. (Jenkins 1.612 started requiring 7, IIRC.)

Might be easiest to just update to 1.642.x. If you do that, read

https://jenkins.io/blog/2016/04/22/pipeline-2/
Reply all
Reply to author
Forward
0 new messages