From d2b187386112ff423085fc59bdba38b7eddcfd8a Mon Sep 17 00:00:00 2001 From: Sushil Shinde Date: Thu, 14 Jan 2021 21:30:17 +0530 Subject: [PATCH 01/14] ci: added new smoke testing job --- .circleci/config.yml | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 4dd7eaa25e..33e7e22427 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -203,6 +203,17 @@ jobs: source awsenvconf source buildenvvar ./master_deploy.sh -d ECS -e PROD -t latest -s prod_communityapp_taskvar -i communityapp + + "smoke-test-on-staging": + <<: *defaults + steps: + - run: + name: "Run automation" + command: | + source awsenvconf + source buildenvvar + ./automated-smoke-test/smoketest.sh automation-config-dev.json dev + # Test job for the cases when we do not need deployment. It just rapidly # installs (updates) app dependencies, and runs tests (ESLint, Stylelint, # Jest unit-tests). @@ -267,14 +278,16 @@ workflows: - free # This is stage env for production QA releases - "build-prod-staging": - context : org-global - requires: - - smoke-testing + context : org-global filters: branches: only: - develop - - ci-manual-approval + - develop-approval-patch + - "smoke-testing-on-staging": + type: approval + requires: + - smoke-test-on-staging # Production builds are exectuted # when PR is merged to the master # Don't change anything in this configuration From f3f03bd9548a14b9d5b0ec91bfdbfeaebb1a5069 Mon Sep 17 00:00:00 2001 From: Sushil Shinde Date: Thu, 14 Jan 2021 21:33:14 +0530 Subject: [PATCH 02/14] ci: fixed error --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 33e7e22427..79d1c9bb69 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -284,7 +284,7 @@ workflows: only: - develop - develop-approval-patch - - "smoke-testing-on-staging": + - "smoke-test-on-staging": type: approval requires: - smoke-test-on-staging From 3a86bf84ede067b5cbc54711d84f154577e70310 Mon Sep 17 00:00:00 2001 From: Sushil Shinde Date: Thu, 14 Jan 2021 21:34:50 +0530 Subject: [PATCH 03/14] ci: fixed error --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 79d1c9bb69..15e149dbee 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -287,7 +287,7 @@ workflows: - "smoke-test-on-staging": type: approval requires: - - smoke-test-on-staging + - build-prod-staging # Production builds are exectuted # when PR is merged to the master # Don't change anything in this configuration From 4e56bb94f7317be2ebc76eeefe6d8c431656a0aa Mon Sep 17 00:00:00 2001 From: Sushil Shinde Date: Thu, 14 Jan 2021 22:03:25 +0530 Subject: [PATCH 04/14] ci: adding branch filter --- .circleci/config.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 15e149dbee..7b9cba45d9 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -285,9 +285,15 @@ workflows: - develop - develop-approval-patch - "smoke-test-on-staging": + context : org-global type: approval requires: - build-prod-staging + filters: + branches: + only: + - develop + - develop-approval-patch # Production builds are exectuted # when PR is merged to the master # Don't change anything in this configuration From d1beba1e67d0227d061e2d542716c5bf42826808 Mon Sep 17 00:00:00 2001 From: Sushil Shinde Date: Thu, 14 Jan 2021 22:12:09 +0530 Subject: [PATCH 05/14] ci: fixed erro --- .circleci/config.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 7b9cba45d9..af195aab5b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -283,7 +283,7 @@ workflows: branches: only: - develop - - develop-approval-patch + - develop-approval-patch-1 - "smoke-test-on-staging": context : org-global type: approval @@ -293,7 +293,14 @@ workflows: branches: only: - develop - - develop-approval-patch + - develop-approval-patch-1 + post-steps: + - run: + name: Run automation + command: | + source awsenvconf + source buildenvvar + ./automated-smoke-test/smoketest.sh automation-config-dev.json dev # Production builds are exectuted # when PR is merged to the master # Don't change anything in this configuration From 4405634d88d64a11556ff55711e17c12026da575 Mon Sep 17 00:00:00 2001 From: Sushil Shinde Date: Thu, 14 Jan 2021 22:37:54 +0530 Subject: [PATCH 06/14] ci: fixed running automation --- .circleci/config.yml | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index af195aab5b..48726ae1c0 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -284,23 +284,13 @@ workflows: only: - develop - develop-approval-patch-1 - - "smoke-test-on-staging": - context : org-global + - "hold-smoke-test-on-staging": type: approval requires: - build-prod-staging - filters: - branches: - only: - - develop - - develop-approval-patch-1 - post-steps: - - run: - name: Run automation - command: | - source awsenvconf - source buildenvvar - ./automated-smoke-test/smoketest.sh automation-config-dev.json dev + - "smoke-test-on-staging": + requires: + - hold-smoke-test-on-staging # Production builds are exectuted # when PR is merged to the master # Don't change anything in this configuration From bd96b3d3c57fb89179d5257595857abd06da536d Mon Sep 17 00:00:00 2001 From: Sushil Shinde Date: Thu, 14 Jan 2021 22:57:47 +0530 Subject: [PATCH 07/14] ci: fixed test case error --- .circleci/config.yml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 48726ae1c0..63244b12f3 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -207,13 +207,24 @@ jobs: "smoke-test-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 - run: name: "Run automation" command: | source awsenvconf source buildenvvar - ./automated-smoke-test/smoketest.sh automation-config-dev.json dev - + ./automated-smoke-test/smoketest.sh automation-config-dev.json prod + # Test job for the cases when we do not need deployment. It just rapidly # installs (updates) app dependencies, and runs tests (ESLint, Stylelint, # Jest unit-tests). From 4419f306b0b834a113cd4e4dab6cd690612c7095 Mon Sep 17 00:00:00 2001 From: Sushil Shinde Date: Thu, 14 Jan 2021 23:30:56 +0530 Subject: [PATCH 08/14] ci: fixed file name --- .circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 63244b12f3..b7a9cbad2d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -222,8 +222,8 @@ jobs: name: "Run automation" command: | source awsenvconf - source buildenvvar - ./automated-smoke-test/smoketest.sh automation-config-dev.json prod +# source buildenvvar + ./automated-smoke-test/smoketest.sh automation-config-staging.json prod # Test job for the cases when we do not need deployment. It just rapidly # installs (updates) app dependencies, and runs tests (ESLint, Stylelint, From 673976be5b00cbe356c370f82041ed1deb45ef86 Mon Sep 17 00:00:00 2001 From: Sushil Shinde Date: Thu, 14 Jan 2021 23:33:47 +0530 Subject: [PATCH 09/14] ci: fixing syntax --- .circleci/config.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index b7a9cbad2d..6685adeef3 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -218,13 +218,11 @@ jobs: name: "configuring environment" command: | ./awsconfiguration.sh PROD - - run: + - run: name: "Run automation" command: | - source awsenvconf -# source buildenvvar + source awsenvconf ./automated-smoke-test/smoketest.sh automation-config-staging.json prod - # Test job for the cases when we do not need deployment. It just rapidly # installs (updates) app dependencies, and runs tests (ESLint, Stylelint, # Jest unit-tests). From 48361ffa2dd29dadb4f4e6d1b31379499302daae Mon Sep 17 00:00:00 2001 From: "Luiz R. Rodrigues" Date: Thu, 14 Jan 2021 15:40:30 -0300 Subject: [PATCH 10/14] Added missing vars setup to smoke test on staging --- .circleci/config.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 6685adeef3..8de52043a8 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -218,10 +218,12 @@ jobs: name: "configuring environment" command: | ./awsconfiguration.sh PROD + ./buildenv.sh -e PROD -b staging_communityapp_buildvar,staging_communityapp_deployvar - run: name: "Run automation" command: | - source awsenvconf + source awsenvconf + source buildenvvar ./automated-smoke-test/smoketest.sh automation-config-staging.json prod # Test job for the cases when we do not need deployment. It just rapidly # installs (updates) app dependencies, and runs tests (ESLint, Stylelint, From 23c1518afa9d9555187917cfcd8f35765d4ccce0 Mon Sep 17 00:00:00 2001 From: "Luiz R. Rodrigues" Date: Thu, 14 Jan 2021 16:22:21 -0300 Subject: [PATCH 11/14] ci: Added context to smoke-test-on-staging --- .circleci/config.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 8de52043a8..6288be2301 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -299,7 +299,8 @@ workflows: type: approval requires: - build-prod-staging - - "smoke-test-on-staging": + - "smoke-test-on-staging": + context : org-global requires: - hold-smoke-test-on-staging # Production builds are exectuted From 141adfc814db03867654b2599e3eb340e3df60a2 Mon Sep 17 00:00:00 2001 From: Sushil Shinde Date: Fri, 15 Jan 2021 08:18:41 +0530 Subject: [PATCH 12/14] ci: added prod job --- .circleci/config.yml | 42 +++++++++++++++++++++++++++++++++--------- 1 file changed, 33 insertions(+), 9 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 6288be2301..100a78dfe1 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -225,6 +225,29 @@ jobs: source awsenvconf source buildenvvar ./automated-smoke-test/smoketest.sh automation-config-staging.json prod + + "smoke-test-on-production": + <<: *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 prod_communityapp_buildvar,prod_communityapp_deployvar + - run: + name: "Run automation" + command: | + source awsenvconf + source buildenvvar + ./automated-smoke-test/smoketest.sh automation-config-prod.json prod + # Test job for the cases when we do not need deployment. It just rapidly # installs (updates) app dependencies, and runs tests (ESLint, Stylelint, # Jest unit-tests). @@ -255,13 +278,6 @@ workflows: - develop - develop_automation - ci-manual-approval - post-steps: - - run: - name: Run automation - command: | - source awsenvconf - source buildenvvar - ./automated-smoke-test/smoketest.sh automation-config-dev.json dev - "smoke-testing": type: approval requires: @@ -295,14 +311,14 @@ workflows: only: - develop - develop-approval-patch-1 - - "hold-smoke-test-on-staging": + - "approve-smoke-test-on-staging": type: approval requires: - build-prod-staging - "smoke-test-on-staging": context : org-global requires: - - hold-smoke-test-on-staging + - approve-smoke-test-on-staging # Production builds are exectuted # when PR is merged to the master # Don't change anything in this configuration @@ -315,6 +331,14 @@ workflows: branches: only: - master + - "approve-smoke-test-on-production": + type: approval + requires: + - build-prod + - "smoke-test-on-production": + context : org-global + requires: + - approve-smoke-test-on-production # Simple testing is executed for any branch other than "develop" and # "master". - test: From 4a44736db382ce21588dab12499f7a77ebda48bf Mon Sep 17 00:00:00 2001 From: Sushil Shinde Date: Fri, 15 Jan 2021 08:42:39 +0530 Subject: [PATCH 13/14] ci: fixing error --- .circleci/config.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 100a78dfe1..ac7354fbbc 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -276,8 +276,6 @@ workflows: branches: only: - develop - - develop_automation - - ci-manual-approval - "smoke-testing": type: approval requires: @@ -310,7 +308,6 @@ workflows: branches: only: - develop - - develop-approval-patch-1 - "approve-smoke-test-on-staging": type: approval requires: From c0a6b51784946fd5fa32e6e36f9ffb056e02be23 Mon Sep 17 00:00:00 2001 From: Sushil Shinde Date: Fri, 15 Jan 2021 08:46:01 +0530 Subject: [PATCH 14/14] ci: removing smoke test on dev branch --- .circleci/config.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index ac7354fbbc..d723a4d47b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -276,10 +276,6 @@ workflows: branches: only: - develop - - "smoke-testing": - type: approval - requires: - - build-dev # This is alternate dev env for parallel testing - "build-test": context : org-global