Skip to content

Commit

Permalink
Merge pull request #1012 from GSA/dev
Browse files Browse the repository at this point in the history
Release | v0.2.0.beta.1
  • Loading branch information
scottqueen-bixal authored Mar 20, 2024
2 parents a25951f + 35ea7ca commit f9102d8
Show file tree
Hide file tree
Showing 334 changed files with 41,224 additions and 44,655 deletions.
103 changes: 47 additions & 56 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version: 2.1
jobs:
build_and_deploy_dev:
machine:
image: ubuntu-2004:202107-02
image: default

steps:
- run:
Expand All @@ -18,7 +18,6 @@ jobs:
cd usagov-2021
git checkout prod
- run:
name: Moving the benefit-finder app into usagov-2021 module
command: |
Expand All @@ -28,7 +27,6 @@ jobs:
echo "moving the benefit-finder-app module into the usagov-2021 directory"
rm -r usagov-2021/web/modules/custom/usagov_benefit_finder/*
mv usagov_benefit_finder/* usagov-2021/web/modules/custom/usagov_benefit_finder/
mv html.html.twig usagov-2021/web/themes/custom/usagov/templates/html.html.twig
mv bin/cloudgov/entrypoint.sh usagov-2021/scripts/entrypoint.sh
mv bin/cloudgov/static-generation.sh usagov-2021/scripts/static-generation.sh
mv bin/cloudgov/bf-tome-run.sh usagov-2021/scripts/bf-tome-run.sh
Expand All @@ -37,7 +35,7 @@ jobs:
mv bin/cloudgov/bf-tome-sync.sh usagov-2021/scripts/bf-tome-sync.sh
mv bin/cloudgov/cf-install.sh usagov-2021/scripts/cf-install.sh
- run:
- run:
name: Pre-docker-build configurations
command: |
cd px-benefit-finder/usagov-2021
Expand All @@ -47,13 +45,12 @@ jobs:
sed -i 's/ENTRYPOINT/CMD/' Dockerfile-cms
sed -i 's/\["s3"\]\[\]?/s3\[\]/g' scripts/tome-run.sh scripts/tome-sync.sh
sed -i 's/80/8080/g' .docker/src-cms/etc/nginx/partials/cms.conf.tmpl
sed -i 's/80/8080/g' .docker/src-cms/etc/nginx/partials/www.conf.tmpl
sed -i "s/\$service\['name'\] === 'database'/stristr(\$service\['name'\], 'mysql')/" web/sites/default/settings.php
sed -i "s/\$settings\['hash_salt'\] = \$service\['credentials'\]\['HASH_SALT'\]/\$settings\['hash_salt'\] = \$service\['credentials'\]\['hash_salt'\]/" web/sites/default/settings.php
sed -i "s/\$service\['name'\] === 'storage'/stristr(\$service\['name'\], 'storage')/" web/sites/default/settings.php
sed -i "s/\$service\['name'\] === 'secrets'/stristr(\$service\['name'\], 'secrets')/" web/sites/default/settings.php
- run:
- run:
name: Building, tagging, pushing the Docker Image
command: |
export IMAGE_TAG=$( echo $CIRCLE_WORKFLOW_ID | cut -b -8 )
Expand All @@ -63,7 +60,6 @@ jobs:
echo "$CR_PAT" | docker login ghcr.io --username "$GH_USERNAME" --password-stdin
docker push "$DOCKERREPO:$IMAGE_TAG"
docker logout
- run:
name: Injecting container name to the manifest.yml
Expand All @@ -83,6 +79,7 @@ jobs:
sed -i "s#^ - secrets# - benefit-finder-secrets-${CIRCLE_BRANCH}#" manifest.yml
sed -i "s#^ - storage# - benefit-finder-storage-${CIRCLE_BRANCH}#" manifest.yml
sed -i "s#^ - dbstorage# - benefit-finder-static-${CIRCLE_BRANCH}#" manifest.yml
sed -i '16i\ command: ./scripts/entrypoint.sh' manifest.yml
cat manifest.yml
- run:
Expand All @@ -101,7 +98,7 @@ jobs:
apt-get install -y cf8-cli
fi
cf -v
cf login -a https://api.fr.cloud.gov -u "$CF_USER" -p "$CF_PASSWORD" -o "$CF_ORG" -s "benefit-finder-${CIRCLE_BRANCH}"
cf login -a https://api.fr.cloud.gov -u "$CF_USER" -p "$CF_PASSWORD" -o "$CF_ORG" -s "benefit-finder-${CIRCLE_BRANCH}"
- run:
name: Deploy the app to cloud.gov
Expand All @@ -117,7 +114,7 @@ jobs:
cf stop benefit-finder-cms-${CIRCLE_BRANCH}
CF_DOCKER_PASSWORD=$( echo $CR_PAT) cf push benefit-finder-cms-${CIRCLE_BRANCH} --docker-image "$DOCKERREPO:$IMAGE_TAG" --docker-username "$CF_USER"
docker logout
while : ; do
while : ; do
app_status=$( cf app benefit-finder-cms-${CIRCLE_BRANCH} | grep "#0" | awk '{print $2}' )
if [ "${app_status}" == "running" ]; then
break
Expand All @@ -126,8 +123,8 @@ jobs:
sleep 2
fi
done
cf add-network-policy benefit-finder-waf-${CIRCLE_BRANCH} benefit-finder-cms-${CIRCLE_BRANCH} -s benefit-finder-${CIRCLE_BRANCH} -o ${CF_ORG} --protocol tcp --port 61443
build_and_deploy_main:
machine:
image: ubuntu-2004:202107-02
Expand All @@ -145,7 +142,6 @@ jobs:
cd usagov-2021
git checkout prod
- run:
name: Moving the benefit-finder app into usagov-2021 module
command: |
Expand All @@ -155,7 +151,6 @@ jobs:
echo "moving the benefit-finder-app module into the usagov-2021 directory"
rm -r usagov-2021/web/modules/custom/usagov_benefit_finder/*
mv usagov_benefit_finder/* usagov-2021/web/modules/custom/usagov_benefit_finder/
mv html.html.twig usagov-2021/web/themes/custom/usagov/templates/html.html.twig
mv bin/cloudgov/entrypoint.sh usagov-2021/scripts/entrypoint.sh
mv bin/cloudgov/static-generation.sh usagov-2021/scripts/static-generation.sh
mv bin/cloudgov/bf-tome-run.sh usagov-2021/scripts/bf-tome-run.sh
Expand All @@ -164,23 +159,21 @@ jobs:
mv bin/cloudgov/bf-tome-sync.sh usagov-2021/scripts/bf-tome-sync.sh
mv bin/cloudgov/cf-install.sh usagov-2021/scripts/cf-install.sh
- run:
- run:
name: Pre-docker-build configurations
command: |
cd px-benefit-finder/usagov-2021
sed -i "s/memory_limit = 1G/memory_limit = 500M/g" .docker/src-cms/etc/php81/php.ini
mv .docker/Dockerfile-cms .
sed -i 's/80/8080/g' Dockerfile-cms
sed -i 's/80/8080/g' Dockerfile-cms
sed -i 's/ENTRYPOINT/CMD/' Dockerfile-cms
sed -i 's/80/8080/g' .docker/src-cms/etc/nginx/partials/cms.conf.tmpl
sed -i 's/80/8080/g' .docker/src-cms/etc/nginx/partials/www.conf.tmpl
sed -i "s/\$service\['name'\] === 'database'/stristr(\$service\['name'\], 'mysql')/" web/sites/default/settings.php
sed -i "s/\$settings\['hash_salt'\] = \$service\['credentials'\]\['HASH_SALT'\]/\$settings\['hash_salt'\] = \$service\['credentials'\]\['hash_salt'\]/" web/sites/default/settings.php
sed -i "s/\$service\['name'\] === 'storage'/stristr(\$service\['name'\], 'storage')/" web/sites/default/settings.php
sed -i "s/\$service\['name'\] === 'secrets'/stristr(\$service\['name'\], 'secrets')/" web/sites/default/settings.php
- run:
- run:
name: Building, tagging, pushing the Docker Image
command: |
export CIRCLE_BRANCH="main"
Expand All @@ -191,7 +184,6 @@ jobs:
echo "$CR_PAT" | docker login ghcr.io --username "$GH_USERNAME" --password-stdin
docker push "$DOCKERREPO:$IMAGE_TAG"
docker logout
- run:
name: Injecting container name to the manifest.yml
Expand Down Expand Up @@ -246,7 +238,7 @@ jobs:
cf stop benefit-finder-cms-${CIRCLE_BRANCH}
CF_DOCKER_PASSWORD=$( echo $CR_PAT) cf push benefit-finder-cms-${CIRCLE_BRANCH} --docker-image "$DOCKERREPO:$IMAGE_TAG" --docker-username "$CF_USER"
docker logout
while : ; do
while : ; do
app_status=$( cf app benefit-finder-cms-${CIRCLE_BRANCH} | grep "#0" | awk '{print $2}' )
if [ "${app_status}" == "running" ]; then
break
Expand All @@ -255,6 +247,7 @@ jobs:
sleep 2
fi
done
cf add-network-policy benefit-finder-waf-${CIRCLE_BRANCH} benefit-finder-cms-${CIRCLE_BRANCH} -s benefit-finder-${CIRCLE_BRANCH} -o ${CF_ORG} --protocol tcp --port 61443
component-library:
machine:
Expand Down Expand Up @@ -286,38 +279,38 @@ jobs:
fi
cf -v
cf login -a https://api.fr.cloud.gov -u "$CF_USER" -p "$CF_PASSWORD" -o "$CF_ORG" -s "benefit-finder-${CIRCLE_BRANCH}"
- run:
name: Deploy Storybook
command: |
cd px-benefit-finder/benefit-finder
mv manifest.yml manifest.yml.tpl
envsubst < manifest.yml.tpl > manifest.yml
echo "---------------------------------------------"
pwd
ls -l
cat manifest.yml
echo "---------------------------------------------"
nvm install node --reinstall-packages-from=node
npm i @craco/craco
npm run build
cd ..
bash mv-uswds-usagov-theme.sh
cd benefit-finder
npm run build:storybook
mv manifest.yml storybook-static/
mv Staticfile storybook-static/
mv nginx storybook-static/
cd storybook-static
echo "${storybook_username}:${storybook_password}" > Staticfile.auth
cf push benefit-finder-storybook-${CIRCLE_BRANCH}
command: |
cd px-benefit-finder/benefit-finder
mv manifest.yml manifest.yml.tpl
envsubst < manifest.yml.tpl > manifest.yml
echo "---------------------------------------------"
pwd
ls -l
cat manifest.yml
echo "---------------------------------------------"
nvm install node --reinstall-packages-from=node
npm i @craco/craco
npm run build
cd ..
bash mv-uswds-usagov-theme.sh
cd benefit-finder
npm run build:storybook
mv manifest.yml storybook-static/
mv Staticfile storybook-static/
mv nginx storybook-static/
cd storybook-static
echo "${storybook_username}:${storybook_password}" > Staticfile.auth
cf push benefit-finder-storybook-${CIRCLE_BRANCH}
lint:
docker:
- image: cimg/php:8.0.16-node
steps:
- checkout
- run:
- run:
name: Init and Update USAGov submodule
command: |
git submodule init
Expand Down Expand Up @@ -368,7 +361,7 @@ jobs:
$COMPOSER_DIR/vendor/bin/phpcs --standard=./usagov-2021/.phpcs.xml.dist -v --warning-severity=0 ./usagov_benefit_finder | tee /tmp/results/php-cs.log
- store_artifacts:
path: /tmp/results

static-site-generation-dev:
docker:
- image: cimg/base:stable
Expand All @@ -390,7 +383,7 @@ jobs:
apt-get install -y cf8-cli
fi
cf -v
cf login -a https://api.fr.cloud.gov -u "$CF_USER" -p "$CF_PASSWORD" -o "$CF_ORG" -s "benefit-finder-${CIRCLE_BRANCH}"
cf login -a https://api.fr.cloud.gov -u "$CF_USER" -p "$CF_PASSWORD" -o "$CF_ORG" -s "benefit-finder-${CIRCLE_BRANCH}"
- run:
name: "Run Drush Cron and Generate Static Site"
command: |
Expand Down Expand Up @@ -419,7 +412,7 @@ jobs:
apt-get install -y cf8-cli
fi
cf -v
cf login -a https://api.fr.cloud.gov -u "$CF_USER" -p "$CF_PASSWORD" -o "$CF_ORG" -s "benefit-finder-${CIRCLE_BRANCH}"
cf login -a https://api.fr.cloud.gov -u "$CF_USER" -p "$CF_PASSWORD" -o "$CF_ORG" -s "benefit-finder-${CIRCLE_BRANCH}"
- run:
name: "Run Drush Cron and Generate Static Site"
command: |
Expand All @@ -429,32 +422,32 @@ jobs:
# Orchestrate our job run sequence
workflows:
# This workflow only gets triggered when there is a push to `main` and `dev` branches.
# This workflow only gets triggered when there is a push to `main` and `dev` branches.
cms_build_and_deploy_workflow:
jobs:
- build_and_deploy_dev:
filters:
branches:
only:
only:
- dev
- static-site-generation-dev:
requires:
- build_and_deploy_dev
filters:
branches:
only:
only:
- dev
- build_and_deploy_main:
filters:
branches:
only:
only:
- main
- static-site-generation-main:
requires:
- build_and_deploy_main
filters:
branches:
only:
only:
- main

create-component-library-workflow:
Expand All @@ -468,7 +461,7 @@ workflows:
php-lint-code-snif:
jobs:
- lint

static-site-generation-cron:
triggers:
- schedule:
Expand All @@ -479,5 +472,3 @@ workflows:
- main
jobs:
- static-site-generation-main


59 changes: 59 additions & 0 deletions .github/ISSUE_TEMPLATE/release_qa_form.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
---
name: Release QA
description: Use this form to create a new release QA task(s)
labels: ["QA"]
body:
- type: markdown
attributes:
value: |
## Introduction
- type: markdown
attributes:
value: >
Release QA tasks are associated with and/or make reference to
work that is "Ready for Deployment".
- type: markdown
attributes:
value: |
## Required fields
- type: dropdown
id: domain
attributes:
label: Domain
options:
- a11y
- design
- data
- ux
- product owner
- development
- other
default: 0
validations:
required: true

- type: textarea
id: related-issues
attributes:
label: Related Issue(s)
description: "What issues are related to this QA effort"
value: >
New issues that arise from this task should be created using the [Bug Report form](https://github.com/GSA/px-benefit-finder/issues/new?assignees=&labels=bug&projects=&template=bug_report_form.yml).
validations:
required: true

- type: markdown
attributes:
value: |
## Optional fields
- type: textarea
id: description
attributes:
label: Description
description: "Include any additional context if needed"
validations:
required: false
10 changes: 5 additions & 5 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@

## Related Github Issue

- fixes #(issue)
- Fixes #(issue)

## Detailed Testing steps

<!--- Link to testing steps in the issue or list them here -->

- [ ] Testing step 1
- [ ] Testing step 2
<!--- If there are steps for local setup list them here -->
- [ ] Setup step 1
- [ ] etc...

<!--- If there are steps for user testing list them here -->
Loading

0 comments on commit f9102d8

Please sign in to comment.