]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
CI: Yet Another stab at creds
authorGeorge Joseph <gjoseph@digium.com>
Thu, 16 Aug 2018 18:23:05 +0000 (12:23 -0600)
committerGeorge Joseph <gjoseph@digium.com>
Thu, 16 Aug 2018 18:23:05 +0000 (12:23 -0600)
Change-Id: I768850780d39151c5dd8e2bb1a4b24776727958e

tests/CI/unittests.jenkinsfile

index 4af91538e8b3432495ef4716159e0f7889d2ca4e..8cf9f4ac5986ae42465604a365c50be433ceaadb 100644 (file)
@@ -83,8 +83,8 @@ pipeline {
                                                 * We need to retrieve the jenkins2 gerrit https credentials
                                                 * in case this review is in a restricted project.
                                                 */
-                                               withCredentials([usernamePassword(credentialsId: env.JENKINS_GERRIT_CREDS,
-                                                       usernameVariable: 'GERRIT_USER_NAME')]) {
+                                               withCredentials([usernamePassword(credentialsId: "${JENKINS_GERRIT_CREDS}",
+                                                       passwordVariable: 'GERRIT_USER_PW', usernameVariable: 'GERRIT_USER_NAME')]) {
 
                                                        sh "printenv | sort"
 
@@ -114,12 +114,11 @@ pipeline {
                                                                        credentialsId: env.JENKINS_GERRIT_CREDS,
                                                                        name: env.GERRIT_NAME,
                                                                        refspec: env.GERRIT_REFSPEC,
-                                                                       url: env.GERRIT_PROJECT_URL
+                                                                       url: env.GERRIT_PROJECT_URL.replaceAll("http(s)?://", "http\$1://${GERRIT_USER_NAME}@")
                                                                        ]
                                                                ]
                                                        ]
                                                }
-//                                             url: env.GERRIT_PROJECT_URL.replaceAll("http(s)?://", "http\$1://${env.GERRIT_USER_NAME}@")
 
                                                sh "sudo tests/CI/setupJenkinsEnvironment.sh"
                                        }