Skip to content

Commit

Permalink
Merge pull request #6957 from topcoder-platform/develop
Browse files Browse the repository at this point in the history
CORE-201 Shut down Community App - Beta,Staging,Test & QA envs
  • Loading branch information
kkartunov authored Jan 19, 2024
2 parents e65e6f4 + 7403c27 commit 270777a
Show file tree
Hide file tree
Showing 9 changed files with 219 additions and 921 deletions.
338 changes: 174 additions & 164 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,121 +76,127 @@ jobs:
./master_deploy.sh -d ECS -e DEV -t latest -s dev_communityapp_taskvar -i communityapp
# Build & Deploy against testing backend
"build-test":
<<: *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 DEV
./buildenv.sh -e DEV -b test_communityapp_buildvar,test_communityapp_deployvar -l dev_communityapp_buildvar_ps
# 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 DEV -t latest -s test_communityapp_taskvar -i communityapp
# "build-test":
# <<: *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 DEV
# ./buildenv.sh -e DEV -b test_communityapp_buildvar,test_communityapp_deployvar -l dev_communityapp_buildvar_ps
# # 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 DEV -t latest -s test_communityapp_taskvar -i communityapp

# Build & Deploy against testing backend
"build-qa":
<<: *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 QA
./buildenv.sh -e QA -b qa_communityapp_buildvar,qa_communityapp_deployvar -l qa_communityapp_buildvar_ps
# 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 QA -t latest -s qa_communityapp_taskvar -i communityapp
# Deprecate this workflow due to beta env shutdown
# https://topcoder.atlassian.net/browse/CORE-250
# "build-qa":
# <<: *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 QA
# ./buildenv.sh -e QA -b qa_communityapp_buildvar,qa_communityapp_deployvar -l qa_communityapp_buildvar_ps
# # 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 QA -t latest -s qa_communityapp_taskvar -i communityapp

# Build & Deploy against prod api backend
"build-prod-beta":
<<: *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 beta_communityapp_buildvar,beta_communityapp_deployvar -l prod_communityapp_buildvar_ps
# 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 beta_communityapp_taskvar, -i communityapp
# Deprecate this workflow due to beta env shutdown
# https://topcoder.atlassian.net/browse/CORE-201
# "build-prod-beta":
# <<: *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 beta_communityapp_buildvar,beta_communityapp_deployvar -l prod_communityapp_buildvar_ps
# # 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 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 -l prod_communityapp_buildvar_ps
# 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
curl --request POST \
--url https://circleci.com/api/v2/project/github/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME/pipeline \
--header "Circle-Token: ${CIRCLE_TOKEN}" \
--header 'content-type: application/json' \
--data '{"branch":"'"$CIRCLE_BRANCH"'","parameters":{"run_smoketesting":true , "run_performancetesting":false, "run_basedeployment": false}}'
# Deprecate this workflow due to beta env shutdown
# https://topcoder.atlassian.net/browse/CORE-202
# "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 -l prod_communityapp_buildvar_ps
# # 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
# curl --request POST \
# --url https://circleci.com/api/v2/project/github/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME/pipeline \
# --header "Circle-Token: ${CIRCLE_TOKEN}" \
# --header 'content-type: application/json' \
# --data '{"branch":"'"$CIRCLE_BRANCH"'","parameters":{"run_smoketesting":true , "run_performancetesting":false, "run_basedeployment": false}}'

# Build & Deploy against production backend
"build-prod":
Expand Down Expand Up @@ -226,30 +232,32 @@ jobs:
--data '{"branch":"'"$CIRCLE_BRANCH"'","parameters":{"run_smoketesting":true , "run_performancetesting":false, "run_basedeployment": false}}'
# Automated Smoke Testing against Staging
Smoke-Testing-On-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
- run:
name: "Run automation"
no_output_timeout: 20m
command: |
source awsenvconf
source buildenvvar
./automated-smoke-test/smoketest.sh automation-config-staging.json prod
- store_artifacts:
path: ./automated-smoke-test/test-results
# Deprecate this workflow due to beta env shutdown
# https://topcoder.atlassian.net/browse/CORE-202
# Smoke-Testing-On-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
# - run:
# name: "Run automation"
# no_output_timeout: 20m
# command: |
# source awsenvconf
# source buildenvvar
# ./automated-smoke-test/smoketest.sh automation-config-staging.json prod
# - store_artifacts:
# path: ./automated-smoke-test/test-results

# Automated Smoke Testing against Production
Smoke-Testing-On-Production:
Expand Down Expand Up @@ -352,34 +360,42 @@ workflows:
- remove_submission_review
- CORE-107
# This is alternate dev env for parallel testing
- "build-test":
context : org-global
filters:
branches:
only:
- metadata-fix
# Deprecate this workflow due to beta env shutdown
# https://topcoder.atlassian.net/browse/CORE-251
# - "build-test":
# context : org-global
# filters:
# branches:
# only:
# - metadata-fix
# This is alternate dev env for parallel testing
- "build-qa":
context : org-global
filters:
branches:
only:
- qaenv
# Deprecate this workflow due to beta env shutdown
# https://topcoder.atlassian.net/browse/CORE-250
# - "build-qa":
# context : org-global
# filters:
# branches:
# only:
# - qaenv
# This is beta env for production soft releases
- "build-prod-beta":
context : org-global
filters:
branches:
only:
- develop
# Deprecate this workflow due to beta env shutdown
# https://topcoder.atlassian.net/browse/CORE-201
# - "build-prod-beta":
# context : org-global
# filters:
# branches:
# only:
# - develop
# This is stage env for production QA releases
- "build-prod-staging":
context : org-global
filters: &filters-staging
branches:
only:
- develop
- HOTFIX_Contentful_Not_Working_June222023
# Deprecate this workflow due to beta env shutdown
# https://topcoder.atlassian.net/browse/CORE-202
# - "build-prod-staging":
# context : org-global
# filters: &filters-staging
# branches:
# only:
# - develop
# - CORE-201
# Production builds are exectuted
# when PR is merged to the master
# Don't change anything in this configuration
Expand All @@ -406,12 +422,6 @@ workflows:
jobs:
- Hold [Smoke-Testing]:
type: approval
- Smoke-Testing-On-Staging:
context : org-global
requires:
- Hold [Smoke-Testing]
filters:
<<: *filters-staging
- Smoke-Testing-On-Production:
context : org-global
requires:
Expand Down
Loading

0 comments on commit 270777a

Please sign in to comment.