Skip to content

Commit

Permalink
Merge pull request #1036 from usagov/stage
Browse files Browse the repository at this point in the history
Sprint 69 release to PROD
  • Loading branch information
tt-gsa authored Oct 9, 2024
2 parents 582f177 + e40282c commit cd93b0e
Show file tree
Hide file tree
Showing 114 changed files with 5,020 additions and 609 deletions.
88 changes: 46 additions & 42 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ parameters:
restore:
type: string
default: "none"
scheduled_backup:
scheduled-backup:
type: boolean
default: false
upkeep:
Expand All @@ -15,7 +15,7 @@ parameters:
jobs:
upkeep:
docker:
- image: cimg/base:stable
- image: cimg/base:current-22.04
steps:
- checkout
- run:
Expand Down Expand Up @@ -88,7 +88,7 @@ jobs:
path: testing/cypress/screenshots
deploy:
docker:
- image: cimg/base:stable
- image: cimg/base:current-22.04
steps:
- checkout
- attach_workspace:
Expand All @@ -106,7 +106,7 @@ jobs:
source ./scripts/pipeline/cloud-gov-deploy.sh
post-deploy:
docker:
- image: cimg/base:stable
- image: cimg/base:current-22.04
steps:
- checkout
- attach_workspace:
Expand All @@ -124,7 +124,7 @@ jobs:
source ./scripts/pipeline/cloud-gov-post-deploy.sh
post-deploy-upkeep:
docker:
- image: cimg/base:stable
- image: cimg/base:current-22.04
steps:
- checkout
- attach_workspace:
Expand All @@ -141,12 +141,9 @@ jobs:
source ./scripts/pipeline/exports.sh ${CIRCLE_BRANCH}
source ./scripts/pipeline/cloud-gov-login.sh
source ./scripts/pipeline/cloud-gov-post-deploy-upkeep.sh
downsync:
downsync-backup:
docker:
- image: cimg/base:stable
environment:
BACKUP_ENV: << pipeline.parameters.backup>>
RESTORE_ENV: << pipeline.parameters.restore>>
- image: cimg/base:current-22.04
steps:
- checkout
- run:
Expand All @@ -157,19 +154,38 @@ jobs:
source ./scripts/pipeline/deb-mysql-client-install.sh
source ./scripts/pipeline/deb-awscli.sh
cf install-plugin -f https://github.com/cloud-gov/cf-service-connect/releases/download/v1.1.3/cf-service-connect_linux_amd64
cf install-plugin -f https://github.com/cloud-gov/cf-service-connect/releases/download/v1.1.4/cf-service-connect_linux_amd64
- run:
name: "Run downsync"
name: "Run downsync-backup"
no_output_timeout: 30m
command: |
source ./scripts/pipeline/exports.sh "${BACKUP_ENV}"
source ./scripts/pipeline/exports.sh "prod"
source ./scripts/pipeline/cloud-gov-login.sh
source ./scripts/pipeline/downsync-backup.sh
source ./scripts/pipeline/prod-db-backup.sh
cf logout
downsync-restore:
docker:
- image: cimg/base:current-22.04
environment:
RESTORE_ENV: << pipeline.parameters.restore>>
steps:
- checkout
- run:
name: "Install cloudfoundry & dependencies"
command: |
source ./scripts/pipeline/deb-basic-deps.sh
source ./scripts/pipeline/deb-cf-install.sh
source ./scripts/pipeline/deb-mysql-client-install.sh
source ./scripts/pipeline/deb-awscli.sh
cf install-plugin -f https://github.com/cloud-gov/cf-service-connect/releases/download/v1.1.4/cf-service-connect_linux_amd64
- run:
name: "Run downsync"
no_output_timeout: 30m
command: |
source ./scripts/pipeline/exports.sh "${RESTORE_ENV}"
source ./scripts/pipeline/cloud-gov-login.sh
source ./scripts/pipeline/downsync-restore.sh
source ./scripts/pipeline/downsync-preprod.sh
php-lint:
docker:
- image: php:8.3-alpine
Expand Down Expand Up @@ -199,7 +215,7 @@ jobs:
destination: phpcs_<<pipeline.number>>.csv
scheduled-backup:
docker:
- image: cimg/base:stable
- image: cimg/base:current-22.04
steps:
- checkout
- run:
Expand All @@ -210,16 +226,16 @@ jobs:
source ./scripts/pipeline/deb-mysql-client-install.sh
source ./scripts/pipeline/deb-awscli.sh
cf install-plugin -f https://github.com/cloud-gov/cf-service-connect/releases/download/v1.1.3/cf-service-connect_linux_amd64
cf install-plugin -f https://github.com/cloud-gov/cf-service-connect/releases/download/v1.1.4/cf-service-connect_linux_amd64
- run:
name: "Run backup"
no_output_timeout: 30m
command: |
export BACKUP_ENV=${CIRCLE_BRANCH}
source ./scripts/pipeline/exports.sh "${CIRCLE_BRANCH}"
source ./scripts/pipeline/cloud-gov-login.sh
source ./scripts/pipeline/downsync-backup.sh
./scripts/pipeline/scheduled_backup.sh "${prod_cf_space}"
source ./scripts/pipeline/app-backup.sh
./scripts/pipeline/scheduled-backup.sh "${prod_cf_space}"
- run:
name: "Run backup"
no_output_timeout: 30m
Expand All @@ -228,22 +244,9 @@ jobs:
export BACKUP_ENV=${CIRCLE_BRANCH}
source ./scripts/pipeline/exports.sh "${CIRCLE_BRANCH}"
source ./scripts/pipeline/cloud-gov-login.sh
source ./scripts/pipeline/downsync-backup.sh
./scripts/pipeline/scheduled_backup.sh "${prod_cf_space}"
source ./scripts/pipeline/app-backup.sh
./scripts/pipeline/scheduled-backup.sh "${prod_cf_space}"
when: on_fail
snyk:
docker:
- image: snyk/snyk:php
# environment:
# SNYK_TOKEN: ${SNYK_TOKEN }
steps:
- checkout
- attach_workspace:
at: ~/
- run:
name: "Snyk"
command: |
snyk test --org=${SNYK_ORG} --severity-threshold=$THRESHOLD
link-validation:
docker:
- image: cypress/included:cypress-13.14.2-node-20.17.0-chrome-128.0.6613.119-1-ff-130.0-edge-128.0.2739.63-1
Expand Down Expand Up @@ -292,7 +295,6 @@ workflows:
equal: [ prod, << pipeline.git.branch >> ]
jobs:
- php-lint
- snyk
- build-theme:
filters:
branches:
Expand Down Expand Up @@ -397,22 +399,24 @@ workflows:
when:
and:
- equal: [ scheduled_pipeline, << pipeline.trigger_source >> ]
- equal: [ true, << pipeline.parameters.scheduled_backup >> ]
- equal: [ true, << pipeline.parameters.scheduled-backup >> ]
jobs:
- scheduled-backup
downsync-workflow:
downsync-backup:
when:
and:
- equal: [api, << pipeline.trigger_source >> ]
- or:
- equal: [ dev, << pipeline.parameters.backup >> ]
- equal: [ prod, << pipeline.parameters.backup >> ]
- equal: [stage, << pipeline.parameters.backup >> ]
- equal: [ test, << pipeline.parameters.backup >> ]
jobs:
- downsync-backup
downsync-restore:
when:
and:
- equal: [api, << pipeline.trigger_source >> ]
- or:
- equal: [ dev, << pipeline.parameters.restore >> ]
- equal: [ stage, << pipeline.parameters.restore >> ]
- equal: [ test, << pipeline.parameters.restore >> ]
jobs:
- downsync

- downsync-restore
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"drupal/editor_advanced_link": "^2.2",
"drupal/editoria11y": "^2.0",
"drupal/entity_reference_revisions": "^1.10",
"drupal/field_group": "^3.4",
"drupal/field_group": "^4.0@alpha",
"drupal/file_delete": "^2.0",
"drupal/focal_point": "^2.0",
"drupal/language_switcher_extended": "^1.1",
Expand Down
Loading

0 comments on commit cd93b0e

Please sign in to comment.