Skip to content

Commit

Permalink
Update Jenkinsfile
Browse files Browse the repository at this point in the history
  • Loading branch information
dawid-bladzich authored May 16, 2023
1 parent 2bad06b commit b5e8200
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,8 @@ pipeline {
steps {
container('agent') {
script {
withCredentials([usernamePassword(credentialsId: "argocd-${env.CLUSTER}", usernameVariable: 'USERNAME', passwordVariable: 'PASSWORD')]) {
env.ARGOCD_AUTH_TOKEN = sh(script: "curl -s https://${env.ARGOCD_SERVER}/api/v1/session -d \$'{\"username\":\"$USERNAME\",\"password\":\"$PASSWORD\"}' | sed -e 's/[{}]/''/g' | awk -F: '{print \$2}' | sed 's/\\\"//g'", returnStdout: true).trim()
withCredentials([usernamePassword(credentialsId: "argocd-${env.CLUSTER}", usernameVariable: 'ARGOCD_USERNAME', passwordVariable: 'ARGOCD_PASSWORD')]) {
env.ARGOCD_AUTH_TOKEN = sh(script: "curl -s https://${env.ARGOCD_SERVER}/api/v1/session -d \$'{\"username\":\"$ARGOCD_USERNAME\",\"password\":\"$ARGOCD_PASSWORD\"}' | sed -e 's/[{}]/''/g' | awk -F: '{print \$2}' | sed 's/\\\"//g'", returnStdout: true).trim()
sh """
set +x
Expand Down

0 comments on commit b5e8200

Please sign in to comment.