[JIRA] (JENKINS-60096) Jenkins is throwing a NullPointerException at SauceOnDemandBuildWrapper when the jobs are created using a DSL script

8 views
Skip to first unread message

dstephen@stamps.com (JIRA)

unread,
Nov 7, 2019, 2:55:02 PM11/7/19
to jenkinsc...@googlegroups.com
Daniel Vergil created an issue
 
Jenkins / Bug JENKINS-60096
Jenkins is throwing a NullPointerException at SauceOnDemandBuildWrapper when the jobs are created using a DSL script
Issue Type: Bug Bug
Assignee: Yeh Fang
Attachments: sauce_labs_plugin_nullpointer_exception.jpg
Components: sauce-ondemand-plugin
Created: 2019-11-07 19:54
Environment: Jenkins Version - 2.190.1
sauce-ondemand - 1.186
Java - 1.8
Labels: plugins SauceOnDemand sauce-connect
Priority: Major Major
Reporter: Daniel Vergil
  • I use a DSL groovy script to create my jobs
  • The jobs are created successfully
  • When I attempt to build a job that was created by the DSL, Jenkins is throwing the below error

 

Starting pre-build for Sauce Labs plugin
FATAL: null
java.lang.NullPointerException
	at hudson.plugins.sauce_ondemand.SauceOnDemandBuildWrapper.setUp(SauceOnDemandBuildWrapper.java:354)
	at hudson.model.Build$BuildExecution.doRun(Build.java:157)
	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:504)
	at hudson.model.Run.execute(Run.java:1815)
	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
	at hudson.model.ResourceController.execute(ResourceController.java:97)
	at hudson.model.Executor.run(Executor.java:429)
  • However, if I click on the configure job link, do nothing and hit save/apply, the job is building fine.
  • The sauce pre-build is successful if I save the job once manually
  • I have tons of jobs and it's not really possible to configure every job manually 

Can someone please advise on what's going wrong here? Thanks! 

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo

dstephen@stamps.com (JIRA)

unread,
Jan 2, 2020, 2:48:03 PM1/2/20
to jenkinsc...@googlegroups.com

robert.arles@gmail.com (JIRA)

unread,
Jan 8, 2020, 4:05:03 PM1/8/20
to jenkinsc...@googlegroups.com

I'm seeing the same issue and the same workaround (open the config, save, then the job runs properly) I'm only just starting to troubleshoot this, I'm suspecting an issue originating in the groovy DSL, but it is isolated to specific jobs, not affected all jobs created by the script.

dstephen@stamps.com (JIRA)

unread,
Jan 8, 2020, 4:21:02 PM1/8/20
to jenkinsc...@googlegroups.com

robert arles I figured out that the issue was with the 'credentialId' in the 'sauceOnDemandBuildWrapper'. The scope of the credentialId I used was incorrect. It's working fine now after I fixed the 'credentialId'. Thanks! 

robert.arles@gmail.com (JIRA)

unread,
Jan 8, 2020, 6:11:02 PM1/8/20
to jenkinsc...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages