From c7c2cb273c132872bb447122fc887606583c7979 Mon Sep 17 00:00:00 2001 From: Megha Mehta <76773785+mm2020-ind@users.noreply.github.com> Date: Fri, 12 Mar 2021 15:47:03 +0530 Subject: [PATCH] creds for argocd --- Jenkinsfile | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 9711663..1a87c76 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -4,12 +4,13 @@ node { // sh 'kubectl get all' sh""" kubectl port-forward svc/argocd-server -n argocd 8080:443& - argocd login 127.0.0.1:8080 --insecure --username admin --password admin + + withCredentials([usernamePassword(credentialsId: 'argocd-devops-lab', usernameVariable: 'USERNAME', passwordVariable: 'PASSWORD')]) { + sh 'argocd login 127.0.0.1:8080 --insecure --username $USERNAME --password $PASSWORD' + } + argocd app list """ -// sh 'kubectl port-forward svc/argocd-server -n argocd 8080:443&' -// sh 'argocd login 127.0.0.1:8080 --insecure --username admin --password admin' -// sh 'argocd app list' } }