From 64a5e375d2de43ad7e24177f6de188e7af4762cc Mon Sep 17 00:00:00 2001 From: WinstonKamau Date: Wed, 20 Feb 2019 11:38:33 +0300 Subject: [PATCH] chore(pipeline-deploy): create a deployment pipeline - a pipeline to deploy to production [ Fixes #164100281] --- .circleci/config.yml | 3 ++- scripts/deploy.sh | 7 +++++++ scripts/slack_notification.sh | 2 +- scripts/upgrade.sh | 2 +- 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 9f75bdc..e18ab73 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -85,7 +85,7 @@ workflows: - develop - master - develop-V2 - - master-v2 + - master-V2 - deploy: requires: - upgrade-database @@ -95,3 +95,4 @@ workflows: - develop - master - develop-V2 + - master-V2 diff --git a/scripts/deploy.sh b/scripts/deploy.sh index d5baf95..6f3828c 100644 --- a/scripts/deploy.sh +++ b/scripts/deploy.sh @@ -27,6 +27,13 @@ set_variables() { GOOGLE_CLUSTER_NAME=${STAGING_CLUSTER_NAME} DEPLOYMENT_NAME="staging-v2-${PROJECT_NAME}" ;; + master-V2) + IMAGE_TAG="production-v2-${COMMIT_HASH}" + ENVIRONMENT=production + GOOGLE_COMPUTE_ZONE=${PRODUCTION_ZONE} + GOOGLE_CLUSTER_NAME=${PRODUCTION_CLUSTER_NAME} + DEPLOYMENT_NAME="production-v2-${PROJECT_NAME}" + ;; *) echo "Err: This branch should not deploy." exit 1 diff --git a/scripts/slack_notification.sh b/scripts/slack_notification.sh index 059a195..540fc3a 100644 --- a/scripts/slack_notification.sh +++ b/scripts/slack_notification.sh @@ -55,7 +55,7 @@ declare_env_variables() { develop-V2) ENVIRONMENT="Staging V2" ;; - master-v2) + master-V2) ENVIRONMENT="Production V2" ;; *) diff --git a/scripts/upgrade.sh b/scripts/upgrade.sh index b1c1a3b..d767bc8 100644 --- a/scripts/upgrade.sh +++ b/scripts/upgrade.sh @@ -28,7 +28,7 @@ set_variables(){ INSTANCE_NAME=${STAGING_INSTANCE_NAME} DATABASE_NAME=${STAGING_V2_DATABASE_NAME} ;; - master-v2) + master-V2) APP_SETTINGS="Production" VERSION="-v2" CLOUDSQL_CONNECTION_NAME=${PRODUCTION_CLOUD_SQL_CONNECTION_NAME}