Browse Source

Merge pull request #1 from radtac-craft/dev

dev changes
pull/79/head
Megha Mehta 4 years ago
committed by GitHub
parent
commit
bc2993b485
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 26
      Jenkinsfile
  2. 2
      kustomize-guestbook/overlays/prod/ingress.yaml

26
Jenkinsfile

@ -1,20 +1,23 @@
node { node {
stage('SCM checkout') { timestamps{
checkout([$class: 'GitSCM', branches: [[name: '*/master']], extensions: [], userRemoteConfigs: [[url: 'https://github.com/radtac-craft/argocd-example-apps.git']]]) properties([buildDiscarder(logRotator(artifactDaysToKeepStr: '', artifactNumToKeepStr: '', daysToKeepStr: '3', numToKeepStr: '7'))])
}
stage('Start argocd') { stage('Start argocd') {
withKubeConfig(credentialsId: 'eksctl-kubeconfig', serverUrl: '') { withKubeConfig(credentialsId: 'aws-eksctl-kubeconfig', serverUrl: '') {
// sh 'kubectl get all' // withCredentials([usernamePassword(credentialsId: 'argocd-devops-lab', usernameVariable: 'USERNAME', passwordVariable: 'PASSWORD')]) {
sh 'kubectl port-forward svc/argocd-server -n argocd 8080:443&' sh"""
// sh 'argocd login 127.0.0.1:8080' kubectl port-forward svc/argocd-server -n argocd 8080:443&
sh 'argocd login 127.0.0.1:8080 --config /Users/mac/.argocd/config --insecure --username admin --password admin' kubectl get pods -A
sh 'argocd app list' argocd logout 127.0.0.1:8080
argocd login 127.0.0.1:8080 --insecure --username admin --password admin
argocd app list
"""
} }
// }
} }
stage('Create app') { stage('Create app') {
withKubeConfig(credentialsId: 'eksctl-kubeconfig', serverUrl: '') { withKubeConfig(credentialsId: 'aws-eksctl-kubeconfig', serverUrl: '') {
sh """ sh """
argocd app create prod-kustomize-guestbook \ argocd app create prod-kustomize-guestbook \
--repo https://github.com/radtac-craft/argocd-example-apps.git \ --repo https://github.com/radtac-craft/argocd-example-apps.git \
@ -28,8 +31,9 @@ node {
} }
stage('Verify app') { stage('Verify app') {
withKubeConfig(credentialsId: 'eksctl-kubeconfig', serverUrl: '') { withKubeConfig(credentialsId: 'aws-eksctl-kubeconfig', serverUrl: '') {
sh 'argocd app list' sh 'argocd app list'
} }
} }
} }
}

2
kustomize-guestbook/overlays/prod/ingress.yaml

@ -5,7 +5,7 @@ metadata:
namespace: namespace:
spec: spec:
rules: rules:
- host: kustomize-guestbook-argocd.natwest-labs.com - host: kustomize-guestbook-argocd1.natwest-labs.com
http: http:
paths: paths:
- backend: - backend:

Loading…
Cancel
Save