[JIRA] (JENKINS-59567) Server Credentials created from Jenkins credentials don't show up in maven settings.xml

15 views
Skip to first unread message

fakemailred888@gmail.com (JIRA)

unread,
Sep 27, 2019, 5:18:02 PM9/27/19
to jenkinsc...@googlegroups.com
red der updated an issue
 
Jenkins / Bug JENKINS-59567
Server Credentials created from Jenkins credentials don't show up in maven settings.xml

I linked the wrong ticket to this. This is a different issue than the one described in the ticket I linked initially

Change By: red der
Summary: Server Credentials created from Jenkins credentials don't show up in maven settings.xml (regression)
Looks like pretty much this same issue: https://issues.jenkins-ci.org/browse/JENKINS-29805

Also on SO: [https://stackoverflow.com/questions/58139761/pipeline-maven-plugin-not-replacing-servers-in-global-settings-xml-from-jenkin]

hard coding "<servers></servers>" in the config file works but configuring "Server Credentials" from jenkins credentials is not working. I tried with and without "Replace all"
Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo

cleclerc@cloudbees.com (JIRA)

unread,
Oct 10, 2019, 5:56:03 AM10/10/19
to jenkinsc...@googlegroups.com
Cyrille Le Clerc commented on Bug JENKINS-59567
 
Re: Server Credentials created from Jenkins credentials don't show up in maven settings.xml

Cross posting answer already made on https://groups.google.com/forum/#!topic/jenkinsci-users/7P1Wd2W-OcA

 Hello,

This is one of the most broadly used feature of the pipeline-maven-plugin, I think it works for most user, there is probably a glitch somewhere.

Can you please share your testing Jenkinsfile and the details reported by withMaven in the build logs?

The troubleshooting pipeline script should look like

withMaven(...) {
   sh "mvn help:effective-settings"
}

The build logs line that reports the credentials injected in the settings looks like

[withMaven] using Maven global settings.xml 'global-settings-for-pipeline-maven-plugin' with Maven servers credentials provided by Jenkins (replaceAll: false): [mavenServerId: 'github', jenkinsCredentials: 'github-credentials', username: 'cyrille-leclerc', type: 'UsernamePasswordCredentialsImpl'], [mavenServerId: 'nexus3.example.com', jenkinsCredentials: 'api-team-nexus-deployment-credentials', username: 'api-team', type: 'UsernamePasswordCredentialsImpl']

 

cleclerc@cloudbees.com (JIRA)

unread,
Oct 10, 2019, 5:57:04 AM10/10/19
to jenkinsc...@googlegroups.com
Cyrille Le Clerc edited a comment on Bug JENKINS-59567
Cross posting answer already made on [https://groups.google.com/forum/#!topic/jenkinsci-users/7P1Wd2W-OcA]

 Hello,

This is one of the most broadly used feature of the pipeline-maven-plugin, I think it works for most user, there is probably a glitch somewhere.

Can you please share your testing Jenkinsfile and the details reported by withMaven in the build logs?

The troubleshooting pipeline script should look like

{code}

withMaven(...) {
   sh "mvn help:effective-settings"
}
{code}


The build logs line that reports the credentials injected in the settings looks like

{ code noformat }

[withMaven] using Maven global settings.xml 'global-settings-for-pipeline-maven-plugin' with Maven servers credentials provided by Jenkins (replaceAll: false): [mavenServerId: 'github', jenkinsCredentials: 'github-credentials', username: 'cyrille-leclerc', type: 'UsernamePasswordCredentialsImpl'], [mavenServerId: 'nexus3.example.com', jenkinsCredentials: 'api-team-nexus-deployment-credentials', username: 'api-team', type: 'UsernamePasswordCredentialsImpl']
{ code noformat }

 

cleclerc@cloudbees.com (JIRA)

unread,
Oct 10, 2019, 5:57:05 AM10/10/19
to jenkinsc...@googlegroups.com
Cyrille Le Clerc edited a comment on Bug JENKINS-59567
Cross posting answer already made on [https://groups.google.com/forum/#!topic/jenkinsci-users/7P1Wd2W-OcA]

 Hello,

This is one of the most broadly used feature of the pipeline-maven-plugin, I think it works for most user, there is probably a glitch somewhere.

Can you please share your testing Jenkinsfile and the details reported by withMaven in the build logs?

The troubleshooting pipeline script should look like

{code}
withMaven(...) {
   sh "mvn help:effective-settings"
}
{code}

The build logs line that reports the credentials injected in the settings looks like

{ noformat code }

[withMaven] using Maven global settings.xml 'global-settings-for-pipeline-maven-plugin' with Maven servers credentials provided by Jenkins (replaceAll: false): [mavenServerId: 'github', jenkinsCredentials: 'github-credentials', username: 'cyrille-leclerc', type: 'UsernamePasswordCredentialsImpl'], [mavenServerId: 'nexus3.example.com', jenkinsCredentials: 'api-team-nexus-deployment-credentials', username: 'api-team', type: 'UsernamePasswordCredentialsImpl']
{ noformat code }

 

cleclerc@cloudbees.com (JIRA)

unread,
Oct 10, 2019, 5:59:02 AM10/10/19
to jenkinsc...@googlegroups.com

fakemailred888@gmail.com (JIRA)

unread,
Oct 10, 2019, 12:17:01 PM10/10/19
to jenkinsc...@googlegroups.com
red der commented on Bug JENKINS-59567
 
Re: Server Credentials created from Jenkins credentials don't show up in maven settings.xml

this can be closed. I gave up and just used a secret file to store my entire config instead. I realized I dont really need this plugin

cleclerc@cloudbees.com (JIRA)

unread,
Oct 25, 2019, 6:11:03 AM10/25/19
to jenkinsc...@googlegroups.com

Ack, i'm closing this ticket with "Can't reproduce" as several users have reported that this feature work for them. There me be an edge case or a glitch in the setup.

cleclerc@cloudbees.com (JIRA)

unread,
Oct 25, 2019, 6:11:03 AM10/25/19
to jenkinsc...@googlegroups.com
Cyrille Le Clerc closed an issue as Cannot Reproduce
 
Change By: Cyrille Le Clerc
Status: Open Closed
Resolution: Cannot Reproduce
Reply all
Reply to author
Forward
0 new messages