configFiles no longer finds maven settings config files?

120 views
Skip to first unread message

Kyle Cronin

unread,
Apr 18, 2015, 3:40:39 PM4/18/15
to job-dsl...@googlegroups.com


I have the following maven settings config file setup

mavenSettingsConfigFile('central-mirror') {
  content readFileFromWorkspace
('maven-settings/central-mirror.xml')
}

and I have a freeStyleJob that is configured to pass this config file to an ant job (which needs the settings file to execute a series of maven jobs). 

freeStyleJob('dsl-template-release') {
 wrappers
{
       configFiles
{
            file
('central-mirror') {
                variable
('JENKINS_SETTINGS_FILE')
           
}
       
}
   
}
}

I get the following error when running this above script.

java.lang.NullPointerException: Custom config file with name 'central-mirror' not found
	at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:204)
	at com.google.common.base.Preconditions$checkNotNull.call(Unknown Source)
	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42)
	at com.google.common.base.Preconditions$checkNotNull.call(Unknown Source)
	at javaposse.jobdsl.dsl.helpers.wrapper.ConfigFilesContext.file(ConfigFilesContext.groovy:21)

This worked in previous versions of the plugin, most likely pre 1.30. Any idea how I can get this working again?


Kyle Cronin

unread,
Apr 18, 2015, 3:54:03 PM4/18/15
to job-dsl...@googlegroups.com
I take that part about it working in a previous version. We must have not run the templates job since this configFiles was introduces. I suppose this is now an enhancement request rather than a question :)

Kyle Cronin

unread,
Apr 30, 2015, 10:07:15 PM4/30/15
to job-dsl...@googlegroups.com
I've created a pull request with this enhancement.


Reply all
Reply to author
Forward
0 new messages