From 768517f43ed63f2e38116d31694e733abd1e27f7 Mon Sep 17 00:00:00 2001 From: Sushil Shinde Date: Thu, 30 Apr 2020 11:52:18 +0530 Subject: [PATCH 1/2] ci: added configuration for staging env --- .circleci/config.yml | 37 ++++++++++++++++++++++++++++++++++++- deploy.sh | 2 ++ 2 files changed, 38 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index c49a288539..2b9077827e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -119,7 +119,35 @@ jobs: source awsenvconf source buildenvvar ./master_deploy.sh -d ECS -e PROD -t latest -s beta_communityapp_taskvar, -i communityapp - + + # Build & Deploy against prod api backend + "build-prod-staging": + <<: *defaults + steps: + # Initialization. + - checkout + - setup_remote_docker + - run: *install_dependency + - run: *install_deploysuite + # Restoration of node_modules from cache. + - restore_cache: *restore_cache_settings_for_build + - run: + name: "configuring environment" + command: | + ./awsconfiguration.sh PROD + ./buildenv.sh -e PROD -b staging_communityapp_buildvar,staging_communityapp_deployvar + # Build of Docker image. + - run: *build_docker_image + # Caching node modules. + - save_cache: *save_cache_settings + # Deployment. + - deploy: + name: Running MasterScript + command: | + source awsenvconf + source buildenvvar + ./master_deploy.sh -d ECS -e PROD -t latest -s staging_communityapp_taskvar, -i communityapp + # Build & Deploy against production backend "build-prod": <<: *defaults @@ -191,6 +219,13 @@ workflows: only: - develop - notifications-analytics + # This is beta env for production soft releases + - "build-prod-staging": + context : org-global + filters: + branches: + only: + - staging-env-setup # Production builds are exectuted # when PR is merged to the master # Don't change anything in this configuration diff --git a/deploy.sh b/deploy.sh index 562bdc812e..4afa6d464a 100755 --- a/deploy.sh +++ b/deploy.sh @@ -85,6 +85,8 @@ make_task_def(){ NODE_CONFIG_ENV=production elif [ "$ENV" = "PRODBETA" ]; then NODE_CONFIG_ENV=production + elif [ "$ENV" = "PRODSTAGING" ]; then + NODE_CONFIG_ENV=production elif [ "$ENV" = "DEV" ]; then NODE_CONFIG_ENV=development elif [ "$ENV" = "TEST" ]; then From db48bbe6ef11f469a292bb352d3ad455415139bb Mon Sep 17 00:00:00 2001 From: Sushil Shinde Date: Thu, 30 Apr 2020 13:02:43 +0530 Subject: [PATCH 2/2] ci: added configuration for staging env --- .circleci/config.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 2b9077827e..061d4a6ab3 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -221,11 +221,11 @@ workflows: - notifications-analytics # This is beta env for production soft releases - "build-prod-staging": - context : org-global - filters: - branches: - only: - - staging-env-setup + context : org-global + filters: + branches: + only: + - staging-env-setup # Production builds are exectuted # when PR is merged to the master # Don't change anything in this configuration