[JIRA] (JENKINS-41236) SauceConnect step fails in Declarative pipeline: Missing required parameter: "sauceConnectPath"

14 views
Skip to first unread message

bitwiseman@gmail.com (JIRA)

unread,
Jan 19, 2017, 7:58:02 PM1/19/17
to jenkinsc...@googlegroups.com
Liam Newman created an issue
 
Jenkins / Bug JENKINS-41236
SauceConnect step fails in Declarative pipeline: Missing required parameter: "sauceConnectPath"
Issue Type: Bug Bug
Assignee: Andrew Bayer
Components: pipeline-model-definition-plugin, sauce-ondemand-plugin
Created: 2017/Jan/20 12:57 AM
Priority: Major Major
Reporter: Liam Newman

The following code fails on the sauceconnect step unless the script block is uncommented:
https://raw.githubusercontent.com/bitwiseman/JS-Nightwatch.js/issue/declarative/sauceConnectPath/Jenkinsfile

pipeline {
    agent any
    stages {
        stage ("Build") {
            steps {
                // Install dependencies
                sh 'npm install'
            }
        }
        stage ("Test") {
            steps {
//              script {
                // Add sauce credentials
                sauce('f0a6b8ad-ce30-4cba-bf9a-95afbc470a8a') {
                    // Start sauce connect
                    sauceconnect(options: '', useGeneratedTunnelIdentifier: false, verboseLogging: false) {

                    }
                }
//              }
            }
        }
    }
}

The error is:

org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
WorkflowScript: 16: Missing required parameter: "sauceConnectPath" @ line 16, column 25.
                           sauceconnect(options: '', useGeneratedTunnelIdentifier: false, verboseLogging: false) {
                           ^

1 error

	at org.codehaus.groovy.control.ErrorCollector.failIfErrors(ErrorCollector.java:310)
	at org.codehaus.groovy.control.CompilationUnit.applyToPrimaryClassNodes(CompilationUnit.java:1073)
	at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:591)
	at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:569)
	at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:546)
	at groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:298)
	at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:268)
	at groovy.lang.GroovyShell.parseClass(GroovyShell.java:688)
	at groovy.lang.GroovyShell.parse(GroovyShell.java:700)
	at org.jenkinsci.plugins.workflow.cps.CpsGroovyShell.reparse(CpsGroovyShell.java:67)
	at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.parseScript(CpsFlowExecution.java:429)
	at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.start(CpsFlowExecution.java:392)
	at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:221)
	at hudson.model.ResourceController.execute(ResourceController.java:98)
	at hudson.model.Executor.run(Executor.java:404)
Finished: FAILURE
Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)
Atlassian logo

andrew.bayer@gmail.com (JIRA)

unread,
Jan 19, 2017, 8:11:01 PM1/19/17
to jenkinsc...@googlegroups.com
Andrew Bayer commented on Bug JENKINS-41236
 
Re: SauceConnect step fails in Declarative pipeline: Missing required parameter: "sauceConnectPath"

So...I would consider this very much a bug in the Sauce plugin rather than Declarative. If you look at https://github.com/jenkinsci/sauce-ondemand-plugin/blob/master/src/main/java/com/saucelabs/jenkins/pipeline/SauceConnectStep.java#L49-L55, you can see that the sauceconnect step in fact has four required parameters - if any of them should actually be optional, they shouldn't be in the @DataBoundConstructor, and they should instead have their own @DataBoundSetter.

andrew.bayer@gmail.com (JIRA)

unread,
Jan 19, 2017, 8:11:01 PM1/19/17
to jenkinsc...@googlegroups.com

andrew.bayer@gmail.com (JIRA)

unread,
Jan 19, 2017, 8:11:01 PM1/19/17
to jenkinsc...@googlegroups.com

andrew.bayer@gmail.com (JIRA)

unread,
Jan 19, 2017, 8:13:03 PM1/19/17
to jenkinsc...@googlegroups.com
Andrew Bayer edited a comment on Bug JENKINS-41236
So...I would consider this very much a bug in the Sauce plugin rather than Declarative. If you look at https://github.com/jenkinsci/sauce-ondemand-plugin/blob/master/src/main/java/com/saucelabs/jenkins/pipeline/SauceConnectStep.java#L49-L55, you can see that the {{sauceconnect}} step in fact has four required parameters - if any of them should actually be optional, they shouldn't be in the {{@DataBoundConstructor}}, and they should instead have their own {{@DataBoundSetter}}.

And I should mention that I'm actually not sure how this works outside Declarative! =)

tyler@monkeypox.org (JIRA)

unread,
Jan 25, 2017, 7:09:02 PM1/25/17
to jenkinsc...@googlegroups.com

Gavin Mogan, my colleague Liam Newman were hoping to feature the Sauce OnDemand plugin in another blog post around Declarative Pipeline.

Would that be sufficient motivation to fix this issue mebbe?

halkeye@gmail.com (JIRA)

unread,
Jan 25, 2017, 7:20:01 PM1/25/17
to jenkinsc...@googlegroups.com

Do you have a timeline for that? I've been looking at this one and the related one (JENKINS-37610) on and off the last couple of weeks but been busy with an important internal project (DIE FLASH DIE).

Can it wait till early next week? I should have time then.

tyler@monkeypox.org (JIRA)

unread,
Jan 25, 2017, 7:28:06 PM1/25/17
to jenkinsc...@googlegroups.com

Most definitely can wait until early next week. We're queuing up a blog series to start after the 1.0 launch of Declarative Pipeline (~ feb 4/5th)

halkeye@gmail.com (JIRA)

unread,
Jan 26, 2017, 8:36:02 PM1/26/17
to jenkinsc...@googlegroups.com

Okay, I had time today, so did a bit of refactoring. Should be released tomorrow, monday at the latest.

scm_issue_link@java.net (JIRA)

unread,
Jan 27, 2017, 6:34:03 PM1/27/17
to jenkinsc...@googlegroups.com

Code changed in jenkins
User: Gavin Mogan
Path:
src/main/java/com/saucelabs/jenkins/pipeline/SauceConnectStep.java
http://jenkins-ci.org/commit/sauce-ondemand-plugin/18608f6f3e3188fd0c4f3f0d5002291575c35fb1
Log:
Make parameters for sauceconnect pipeline step optional - JENKINS-41236

halkeye@gmail.com (JIRA)

unread,
Jan 27, 2017, 6:38:02 PM1/27/17
to jenkinsc...@googlegroups.com

bitwiseman@gmail.com (JIRA)

unread,
Mar 28, 2017, 3:50:01 PM3/28/17
to jenkinsc...@googlegroups.com
Liam Newman closed an issue as Fixed
Change By: Liam Newman
Status: Resolved Closed
Assignee: Gavin Mogan
This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages