diff --git a/Jenkinsfile b/Jenkinsfile index 1461bd0..931511d 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,5 +1,5 @@ node { - def project = 'chris_ricci' + def project = 'snsumner75' def appName = 'python_api' def feSvcName = "${appName}" def namespace = 'production' @@ -8,10 +8,10 @@ node { stage 'Printenv' sh("printenv") - + stage 'Login to Quay.io' sh("docker login -u=\"${env.quay_username}\" -p=\"${env.quay_password}\" quay.io") - + stage 'Build image' sh("docker build -t ${imageTag} .") @@ -23,7 +23,7 @@ node { stage "Deploy Application" switch (env.BRANCH_NAME) { - case "canary": + case "canary": // Roll out to canary environment // Change deployed image in canary to the one we just built sh("sed -i.bak 's#quay.io/${project}/${appName}:.*\$#${imageTag}#' ./k8s/canary/*.yaml") @@ -40,6 +40,6 @@ node { break default: - break + break } } diff --git a/app/views.py b/app/views.py index 5603900..6063b5c 100644 --- a/app/views.py +++ b/app/views.py @@ -5,4 +5,4 @@ @app.route('/index') def index(): timestamp = str(datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S')) - return timestamp + " Hello, World!\n" + return timestamp + " Hello, World! - Version 1.0\n" diff --git a/k8s/canary/python-api.yaml b/k8s/canary/python-api.yaml index 09158f7..137a941 100644 --- a/k8s/canary/python-api.yaml +++ b/k8s/canary/python-api.yaml @@ -2,7 +2,7 @@ apiVersion: extensions/v1beta1 kind: Deployment metadata: labels: - app: python-api + app: python-api env: canary name: python-api-canary spec: @@ -14,11 +14,11 @@ spec: env: canary spec: containers: - - image: quay.io/chris_ricci/python_api:v1 + - image: quay.io/snsumner75/python_api:v1 imagePullPolicy: IfNotPresent name: python-api ports: - - containerPort: 5000 + - containerPort: 5000 protocol: TCP resources: {} terminationMessagePath: /dev/termination-log diff --git a/k8s/production/python-api.yaml b/k8s/production/python-api.yaml index cb074a5..07b2483 100644 --- a/k8s/production/python-api.yaml +++ b/k8s/production/python-api.yaml @@ -2,7 +2,7 @@ apiVersion: extensions/v1beta1 kind: Deployment metadata: labels: - app: python-api + app: python-api env: production name: python-api-production spec: @@ -14,11 +14,11 @@ spec: env: production spec: containers: - - image: quay.io/chris_ricci/python_api:v1 + - image: quay.io/snsumner75/python_api:v1 imagePullPolicy: IfNotPresent name: python-api ports: - - containerPort: 5000 + - containerPort: 5000 protocol: TCP resources: {} terminationMessagePath: /dev/termination-log