You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
1.3 KiB
36 lines
1.3 KiB
node {
|
|
stage('Start argocd') {
|
|
withKubeConfig(credentialsId: 'aws-eksctl-kubeconfig', serverUrl: '') {
|
|
// sh 'kubectl get all'
|
|
sh"""
|
|
kubectl port-forward svc/argocd-server -n argocd 8080:443&
|
|
|
|
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
|
|
"""
|
|
}
|
|
}
|
|
|
|
stage('Create app') {
|
|
withKubeConfig(credentialsId: 'aws-eksctl-kubeconfig', serverUrl: '') {
|
|
sh """
|
|
argocd app create prod-kustomize-guestbook \
|
|
--repo https://github.com/radtac-craft/argocd-example-apps.git \
|
|
--path kustomize-guestbook/overlays/prod \
|
|
--dest-server https://kubernetes.default.svc \
|
|
--dest-namespace prod-kustomize-guestbook
|
|
"""
|
|
sh 'argocd app sync prod-kustomize-guestbook'
|
|
sh 'argocd app wait prod-kustomize-guestbook --sync'
|
|
}
|
|
}
|
|
|
|
stage('Verify app') {
|
|
withKubeConfig(credentialsId: 'aws-eksctl-kubeconfig', serverUrl: '') {
|
|
sh 'argocd app list'
|
|
}
|
|
}
|
|
}
|
|
|