File tree Expand file tree Collapse file tree 1 file changed +13
-7
lines changed
docker/jenkins/casc_configs/dsl/jobs Expand file tree Collapse file tree 1 file changed +13
-7
lines changed Original file line number Diff line number Diff line change @@ -96,13 +96,19 @@ jobs:
9696 }
9797
9898 // Fetch installed plugins from Jenkins API
99- def pluginList = sh(
100- // TODO: CI_USER_PASSWORD doesn't exist anymore, read from file...
101- script: '''
102- curl -s -u "ci_user:cI_User@123" "http://jenkins:8080/pluginManager/api/json?depth=1"
103- ''',
104- returnStdout: true
105- ).trim()
99+ def pluginList = ''
100+ withCredentials([usernamePassword(
101+ credentialsId: 'ci_user_creds',
102+ usernameVariable: 'CI_USER',
103+ passwordVariable: 'CI_PASS'
104+ )]) {
105+ pluginList = sh(
106+ script: '''
107+ curl -s -u "\$CI_USER:\$CI_PASS" "http://jenkins:8080/pluginManager/api/json?depth=1"
108+ ''',
109+ returnStdout: true
110+ ).trim()
111+ }
106112
107113 // Parse JSON response
108114 def json = new groovy.json.JsonSlurper().parseText(pluginList)
You can’t perform that action at this time.
0 commit comments