From 2424a8d7fb60d858ab3d516743595272cea19a1f Mon Sep 17 00:00:00 2001 From: Mayank Patel Date: Fri, 14 Jun 2024 13:16:36 +0100 Subject: [PATCH] WiP --- Makefile | 1 - build/jenkins/deployments.Jenkinsfile | 13 +++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 276ce001..67e30a9f 100644 --- a/Makefile +++ b/Makefile @@ -13,7 +13,6 @@ prepare: ## Prepare environment pipeline-prepare pipeline-prepare: - sh echo "Preparing pipeline $(PROJECT_DIR) - ${JENKINS_ENV} - ${JENKINS_SERVICE_TEAM}" sh $(PROJECT_DIR)scripts/assume_role.sh $(JENKINS_ENV) $(JENKINS_SERVICE_TEAM) pipeline-slave-prepare: diff --git a/build/jenkins/deployments.Jenkinsfile b/build/jenkins/deployments.Jenkinsfile index 442830e3..cc9b8fff 100644 --- a/build/jenkins/deployments.Jenkinsfile +++ b/build/jenkins/deployments.Jenkinsfile @@ -69,6 +69,7 @@ pipeline { stage('Show Variables') { steps { script { + env.PROFILE = envProfile sh 'make devops-print-variables' } } @@ -76,6 +77,7 @@ pipeline { stage('Check Py Lib Folder') { steps { script { + env.PROFILE = envProfile sh 'make create-lambda-deploy-dir' } } @@ -83,6 +85,7 @@ pipeline { stage('Plan Infrastructure') { steps { script { + env.PROFILE = envProfile sh "make plan PROFILE=${envProfile}" } } @@ -90,6 +93,7 @@ pipeline { stage('Infrastructure Approval') { steps { script { + env.PROFILE = envProfile input 'Approve to continue with provisioning' } } @@ -97,6 +101,7 @@ pipeline { stage('Provision Infrastructure') { steps { script { + env.PROFILE = envProfile sh "make provision PROFILE=${envProfile}" } } @@ -104,6 +109,7 @@ pipeline { stage('Deploy API') { steps { script { + env.PROFILE = envProfile sh "make deploy PROFILE=${envProfile} IMAGE_TAG=${params.IMAGE_TAG}" } } @@ -111,6 +117,7 @@ pipeline { stage('Monitor Deployment') { steps { script { + env.PROFILE = envProfile sh 'make k8s-check-deployment-of-replica-sets' } } @@ -118,6 +125,7 @@ pipeline { stage('Monitor Route53 Connection') { steps { script { + env.PROFILE = envProfile sh 'make monitor-r53-connection' } } @@ -125,6 +133,7 @@ pipeline { stage('Perform Extract Lambda function') { steps { script { + env.PROFILE = envProfile sh "make postcode-extract-etl PROFILE=${envProfile}" } } @@ -137,6 +146,7 @@ pipeline { } steps { script { + env.PROFILE = envProfile sh "make postcode-insert-etl PROFILE=${envProfile}" } } @@ -144,6 +154,7 @@ pipeline { stage('Smoke Tests') { steps { script { + env.PROFILE = envProfile sh 'make run-smoke-test' } } @@ -153,12 +164,14 @@ pipeline { failure { script { if (params.PROFILE == 'Demo') { + env.PROFILE = envProfile sh 'make terraform-remove-state-lock' } } } always { script { + env.PROFILE = envProfile sh 'make clean' } }