[JIRA] (JENKINS-40309) Redeploy Artifacts fails with IllegalStateException: the settings.xml could not be supplied for the current build: null

2 views
Skip to first unread message

bochenski.kuba+jenkins@gmail.com (JIRA)

unread,
Dec 8, 2016, 5:46:01 AM12/8/16
to jenkinsc...@googlegroups.com
Jakub Bochenski created an issue
 
Jenkins / Bug JENKINS-40309
Redeploy Artifacts fails with IllegalStateException: the settings.xml could not be supplied for the current build: null
Issue Type: Bug Bug
Assignee: Unassigned
Components: deploy-plugin
Created: 2016/Dec/08 10:45 AM
Priority: Critical Critical
Reporter: Jakub Bochenski

Deploying as a publisher step inside the job works.
Trying to use "redeploy" fails with

using settings config with name Default Maven Settings
Replacing all maven server entries not found in credentials list is false
java.lang.IllegalStateException: the settings.xml could not be supplied for the current build: null
	at org.jenkinsci.plugins.configfiles.maven.job.MvnSettingsProvider.supplySettings(MvnSettingsProvider.java:112)
	at jenkins.mvn.SettingsProvider.getSettingsFilePath(SettingsProvider.java:53)
	at jenkins.mvn.SettingsProvider.getSettingsRemotePath(SettingsProvider.java:70)
	at hudson.maven.MavenUtil.createEmbedder(MavenUtil.java:100)
	at hudson.maven.reporters.MavenAbstractArtifactRecord$1.perform(MavenAbstractArtifactRecord.java:226)
	at hudson.model.TaskThread.run(TaskThread.java:128)
Caused by: java.lang.UnsupportedOperationException
	at java.util.AbstractList.add(AbstractList.java:148)
	at hudson.model.EnvironmentList.add(EnvironmentList.java:67)
	at hudson.model.EnvironmentList.add(EnvironmentList.java:35)
	at java.util.AbstractList.add(AbstractList.java:108)
	at org.jenkinsci.plugins.configfiles.maven.job.MvnSettingsProvider.supplySettings(MvnSettingsProvider.java:105)
	... 5 more
Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)
Atlassian logo

bochenski.kuba+jenkins@gmail.com (JIRA)

unread,
Dec 8, 2016, 5:49:01 AM12/8/16
to jenkinsc...@googlegroups.com

aheritier@apache.org (JIRA)

unread,
Feb 15, 2017, 7:39:01 PM2/15/17
to jenkinsc...@googlegroups.com
Arnaud Héritier commented on Bug JENKINS-40309
 
Re: Redeploy Artifacts fails with IllegalStateException: the settings.xml could not be supplied for the current build: null

please provide more details about your jenkins version, the maven plugin version and your job configuration

bochenski.kuba+jenkins@gmail.com (JIRA)

unread,
Feb 16, 2017, 8:44:02 AM2/16/17
to jenkinsc...@googlegroups.com

bochenski.kuba+jenkins@gmail.com (JIRA)

unread,
Feb 16, 2017, 8:45:01 AM2/16/17
to jenkinsc...@googlegroups.com

aheritier@apache.org (JIRA)

unread,
Feb 16, 2017, 1:20:01 PM2/16/17
to jenkinsc...@googlegroups.com

Can you give me it's config.xml file or at least what are the options you defined. You did you configure your maven settings ?

bochenski.kuba+jenkins@gmail.com (JIRA)

unread,
Feb 16, 2017, 1:36:01 PM2/16/17
to jenkinsc...@googlegroups.com
Jakub Bochenski edited a comment on Bug JENKINS-40309
I don't have the config.xml at hand, but I'm using job-dsl to create those. I think the setup is pretty standard.
I have {{providedSettings '
' connect-maven-settings' ' }} in the job definition. I'm not overriding the global settings file.

I'm adding the settings  via job-dsl too {code}
    mavenSettingsConfigFile('connect-maven-settings') {
        comment "Auto-generated by ${BUILD_URL}"
        content readFileFromWorkspace('script/connect-settings.xml')
    }
{code}

I don't expect content of the settings.xml matters for this?

bochenski.kuba+jenkins@gmail.com (JIRA)

unread,
Feb 16, 2017, 1:36:02 PM2/16/17
to jenkinsc...@googlegroups.com

I don't have the config.xml at hand, but I'm using job-dsl to create those. I think the setup is pretty standard.
I have providedSettings ''connect-maven-settings'' in the job definition. I'm not overriding the global settings file.

I'm adding the settings via job-dsl too

    mavenSettingsConfigFile('connect-maven-settings') {
        comment "Auto-generated by ${BUILD_URL}"
        content readFileFromWorkspace('script/connect-settings.xml')
    }

I don't expect content of the settings.xml matters for this?

aheritier@apache.org (JIRA)

unread,
Feb 16, 2017, 1:51:01 PM2/16/17
to jenkinsc...@googlegroups.com

ok you are using jobDSL which is a first interesting point but the most import is that you are injecting your settings file from the workspace and thus I'm not surprised that it doesn't work. When you are republishing it it is done from jenkins master using archived artifacts especially because the workspace isn't available anymore. When settings are provided by the Config File Provideer plugin, AFAIR, we are able to retrieve them to redeploy but in your case I don't see how we could do it. We should archive the settings to be able to reuse them

bochenski.kuba+jenkins@gmail.com (JIRA)

unread,
Feb 16, 2017, 3:09:03 PM2/16/17
to jenkinsc...@googlegroups.com

you are injecting your settings file from the workspace and thus I'm not surprised that it doesn't work.

No, this is just a regular settings file. It's just uploaded using job-dsl build.

Here is the relevant part of job config

    
...
</prebuilders>
    <settings class="org.jenkinsci.plugins.configfiles.maven.job.MvnSettingsProvider">
        <settingsConfigId>connect-maven-settings</settingsConfigId>
    </settings>
    <rootPOM>acme/pom.xml</rootPOM>
    <goals>clean install</goals>
    <runPostStepsIfResult>
...
Reply all
Reply to author
Forward
0 new messages