Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-41236

SauceConnect step fails in Declarative pipeline: Missing required parameter: "sauceConnectPath"

XMLWordPrintable

      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
      

            Unassigned Unassigned
            bitwiseman Liam Newman
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: