From 93c8e42a21c68023e5f3fbf192d57abc2fd80b6b Mon Sep 17 00:00:00 2001 From: Megha Mehta <76773785+mm2020-ind@users.noreply.github.com> Date: Sat, 13 Mar 2021 02:09:36 +0530 Subject: [PATCH] Update Jenkinsfile --- Jenkinsfile | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 3c15fa9..be46811 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -4,16 +4,15 @@ node { stage('Start argocd') { withKubeConfig(credentialsId: 'aws-eksctl-kubeconfig', serverUrl: '') { -// withCredentials([usernamePassword(credentialsId: 'argocd-devops-lab', usernameVariable: 'USERNAME', passwordVariable: 'PASSWORD')]) { - sh""" - kubectl port-forward svc/argocd-server -n argocd 8080:443& - kubectl get pods -A - argocd logout 127.0.0.1:8080 - argocd login 127.0.0.1:8080 --insecure --username admin --password admin - argocd app list - """ + withCredentials([usernamePassword(credentialsId: 'argocd-devops-lab', usernameVariable: 'USERNAME', passwordVariable: 'PASSWORD')]) { +// sh""" + sh 'kubectl port-forward svc/argocd-server -n argocd 8080:443&' + sh 'argocd logout 127.0.0.1:8080' + sh 'argocd login 127.0.0.1:8080 --insecure --username $USERNAME --password $PASSWORD' + sh 'argocd app list' +// """ } -// } + } }