-
Notifications
You must be signed in to change notification settings - Fork 211
[PROD RELEASE V6] #7128
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[PROD RELEASE V6] #7128
Changes from all commits
73cf4e1
d1b44c5
a85c6a3
5f272e4
5499d27
64baff2
92f2a10
f31f4fd
2877409
51688a9
aa4b329
60457f4
213dce4
a298aaf
59cd434
777182a
8e32a2a
761331c
4b48855
a62a525
16c636a
b5ce064
0009b17
a425bb0
2cb995a
608b14d
08b27d4
60c420e
e9f3c33
33d8feb
644678b
b28c4c7
1cadcd2
e3eb65a
87dc25e
38bed30
cf495d4
7bdfc52
d4ae0f4
ba44427
508459b
bc8d0f8
9b6fa41
3e671c1
7d98926
b404479
885c341
c40ccb8
21dcd3e
57a6df5
b638096
1a4b810
98c187d
3c0dbad
734408c
e553b93
daa2318
7502ff7
1d9f3d6
ab6a405
c338035
0bfc094
128ba3f
c34e63e
01aedcc
030b8ea
0d0a03e
5e9d6e0
fd10b54
c6a5aa3
3f5855c
8bc2831
9537e53
194e238
94f5928
0514140
3fbfb57
af06ba3
d657a7d
b4ee8d1
42c1b03
e808cea
62f6235
73726c3
61fa60f
76f5428
fdc0585
f5c483e
853f77e
ca9f918
defb35b
b35bc2a
575483e
47b8b1f
48dd44d
03071bf
661bf13
49bf7d1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -28,10 +28,11 @@ install_dependency: &install_dependency | |
| install_deploysuite: &install_deploysuite | ||
| name: Installation of install_deploysuite. | ||
| command: | | ||
| git clone --branch v1.4.14 https://github.com/topcoder-platform/tc-deploy-scripts ../buildscript | ||
| git clone --branch v1.4.17 https://github.com/topcoder-platform/tc-deploy-scripts ../buildscript | ||
| cp ./../buildscript/master_deploy.sh . | ||
| cp ./../buildscript/buildenv.sh . | ||
| cp ./../buildscript/awsconfiguration.sh . | ||
| cp ./../buildscript/psvar-processor.sh . | ||
| restore_cache_settings_for_build: &restore_cache_settings_for_build | ||
| key: docker-node-modules-v4-{{ checksum "package-lock.json" }} | ||
|
|
||
|
|
@@ -43,247 +44,69 @@ save_cache_settings: &save_cache_settings | |
| build_docker_image: &build_docker_image | ||
| name: Build of Docker image | ||
| command: | | ||
| source buildenvvar | ||
| source buildvar_env | ||
| ./build.sh | ||
| no_output_timeout: 20m | ||
| jobs: | ||
| # Build & Deploy against development backend | ||
| "build-dev": | ||
| <<: *defaults | ||
| steps: | ||
|
|
||
| build_steps: &build_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 | ||
| # - restore_cache: *restore_cache_settings_for_build | ||
| # Build of Docker image. | ||
| - run: | ||
| name: "configuring environment" | ||
| command: | | ||
| ./awsconfiguration.sh DEV | ||
| ./buildenv.sh -e DEV -b dev_communityapp_buildvar,dev_communityapp_deployvar -l dev_communityapp_buildvar_ps | ||
| ./awsconfiguration.sh ${DEPLOY_ENV} | ||
| source awsenvconf | ||
| ./psvar-processor.sh -t appenv -p /config/${APPNAME}/buildvar | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [❗❗ |
||
| source buildvar_env | ||
| # ./buildenv.sh -e ${DEPLOY_ENV} -b dev_communityapp_buildvar,dev_communityapp_deployvar -l dev_communityapp_buildvar_ps | ||
| - run: *build_docker_image | ||
| # Caching node modules. | ||
| - save_cache: *save_cache_settings | ||
| # - 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 dev_communityapp_taskvar -i communityapp -p FARGATE | ||
|
|
||
| # 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 & Deploy against testing backend | ||
| # 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 | ||
| # source buildenvvar | ||
| ./psvar-processor.sh -t appenv -p /config/${APPNAME}/deployvar | ||
| source deployvar_env | ||
| ./master_deploy.sh -d ECS -e $DEPLOY_ENV -t latest -j /config/${APPNAME}/appvar -i ${APPNAME} -p FARGATE | ||
| # ./master_deploy.sh -d ECS -e DEV -t latest -s dev_communityapp_taskvar -i communityapp -p FARGATE | ||
| if [ "${DEPLOY_ENV}" = "PROD" ]; | ||
| then | ||
| # Executing plan | ||
| curl --request POST \ | ||
| --url https://circleci.com/api/v2/project/github/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME/pipeline \ | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [❗❗ |
||
| --header "Circle-Token: ${CIRCLE_TOKEN}" \ | ||
| --header 'content-type: application/json' \ | ||
| --data '{"branch":"'"$CIRCLE_BRANCH"'","parameters":{"run_smoketesting":true , "run_performancetesting":false, "run_basedeployment": false}}' | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [ |
||
| fi | ||
|
|
||
| # Build & Deploy against prod api backend | ||
| # 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 | ||
| # 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}}' | ||
| jobs: | ||
| # Build & Deploy against development backend | ||
| "build-dev": | ||
| <<: *defaults | ||
| environment: | ||
| DEPLOY_ENV: "DEV" | ||
| LOGICAL_ENV: "dev" | ||
| APPNAME: "community-app" | ||
| steps: *build_steps | ||
|
|
||
| # Build & Deploy against production backend | ||
| "build-prod": | ||
| <<: *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 -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 prod_communityapp_taskvar -i communityapp -p FARGATE | ||
| 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}}' | ||
|
|
||
| # Automated Smoke Testing against Staging | ||
| # 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 | ||
| environment: | ||
| DEPLOY_ENV: "PROD" | ||
| LOGICAL_ENV: "prod" | ||
| APPNAME: "community-app" | ||
| steps: *build_steps | ||
|
|
||
| # Automated Smoke Testing against Production | ||
| # Smoke-Testing-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" | ||
| # no_output_timeout: 20m | ||
| # command: | | ||
| # source awsenvconf | ||
| # source buildenvvar | ||
| # ./automated-smoke-test/smoketest.sh automation-config-prod.json prod | ||
| # - store_artifacts: | ||
| # path: ./automated-smoke-test/test-results | ||
|
|
||
| # Test job for the cases when we do not need deployment. It just rapidly | ||
| # installs (updates) app dependencies, and runs tests (ESLint, Stylelint, | ||
|
|
@@ -358,51 +181,9 @@ workflows: | |
| branches: | ||
| only: | ||
| - develop | ||
| - pm-1346 | ||
| - pm-1358_1 | ||
| # This is alternate dev env for parallel testing | ||
| # 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 | ||
| # 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 | ||
| # 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 | ||
| # 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 | ||
| # That might trigger wrong branch to be | ||
| # deployed on the production | ||
| # master branch. | ||
| - v6 | ||
| - PM-2479 | ||
|
|
||
| - "build-prod": | ||
| context: org-global | ||
| filters: &filters-prod | ||
|
|
@@ -417,6 +198,7 @@ workflows: | |
| ignore: | ||
| - develop | ||
| - submission_delete_button | ||
| - v6 | ||
|
|
||
| Smoke Testing: | ||
| when: << pipeline.parameters.run_smoketesting >> | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| name: Trivy Scanner | ||
|
|
||
| permissions: | ||
| contents: read | ||
| security-events: write | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [❗❗ |
||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
| - dev | ||
| pull_request: | ||
| jobs: | ||
| trivy-scan: | ||
| name: Use Trivy | ||
| runs-on: ubuntu-24.04 | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [ |
||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Run Trivy scanner in repo mode | ||
| uses: aquasecurity/trivy-action@0.33.1 | ||
| with: | ||
| scan-type: "fs" | ||
| ignore-unfixed: true | ||
| format: "sarif" | ||
| output: "trivy-results.sarif" | ||
| severity: "CRITICAL,HIGH,UNKNOWN" | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [ |
||
| scanners: vuln,secret,misconfig,license | ||
| github-pat: ${{ secrets.GITHUB_TOKEN }} | ||
|
|
||
| - name: Upload Trivy scan results to GitHub Security tab | ||
| uses: github/codeql-action/upload-sarif@v3 | ||
| with: | ||
| sarif_file: "trivy-results.sarif" | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[❗❗
correctness]The branch version for
tc-deploy-scriptshas been updated fromv1.4.14tov1.4.17. Ensure that this new version is compatible with the current deployment process and does not introduce any breaking changes.