Skip to content

Commit

Permalink
Merge pull request #2041 from GSA/dev
Browse files Browse the repository at this point in the history
Release v0.9.0 (Sprint 48)
  • Loading branch information
scottqueen-bixal authored Jan 9, 2025
2 parents b66c54b + 988f094 commit e259271
Show file tree
Hide file tree
Showing 101 changed files with 2,567 additions and 1,073 deletions.
17 changes: 14 additions & 3 deletions .github/workflows/build-and-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ jobs:
- name: Configure application
run: |
cd usagov-2021
sed -i "s/memory_limit = 1G/memory_limit = 500M/g" .docker/src-cms/etc/php81/php.ini
sed -i "s/memory_limit = 1G/memory_limit = 500M/g" .docker/src-cms/etc/php83/php.ini
mv .docker/Dockerfile-cms .
sed -i 's/80/8080/g' Dockerfile-cms
sed -i 's/ENTRYPOINT/CMD/' Dockerfile-cms
Expand Down Expand Up @@ -213,6 +213,7 @@ jobs:
CR_USERNAME: "${{ secrets.CR_USERNAME }}"
PROJECT: "${{ secrets.PROJECT }}"
TEST_USER_PASS: "${{ secrets.TEST_USER_PASS }}"
TEST_USER_NAMES: "${{ secrets.TEST_USER_NAMES }}"
run: |
source ./scripts/pipeline/cloud-gov-login.sh
cd usagov-2021
Expand All @@ -222,6 +223,16 @@ jobs:
cf add-network-policy ${PROJECT}-waf-${BRANCH} ${PROJECT}-cms-${BRANCH} -s ${PROJECT}-${BRANCH} -o ${CF_ORG} --protocol tcp --port 61443
cf map-route benefit-finder-cms-${BRANCH} apps.internal --hostname benefit-finder-cms-${BRANCH} --app-protocol http1
cd ..
## sed -i "s#TU_PASS#${TEST_USER_PASS}#g" ./scripts/drush-post-deploy.sh
## cat ./scripts/drush-post-deploy.sh
# Split the USERS_LIST into an array
IFS=',' read -ra users <<< "${TEST_USER_NAMES}"
# Generate the password reset commands
password_reset_commands=""
for user in "${users[@]}"; do
password_reset_commands+="drush user:password $user \"TU_PASS\"\n"
done
# Make replacement in the drush post deploy with user change password commands
sed -i "s|### USER_PASSWORD_RESET_PLACEHOLDER ###|$password_reset_commands|" ./scripts/drush-post-deploy.sh
# Set the test user's passwords to the value of the github secret value for TEST_USER_PASS.
sed -i "s#TU_PASS#${TEST_USER_PASS}#g" ./scripts/drush-post-deploy.sh
# Execute the drush command script
source ./scripts/pipeline/cloud-gov-post-deploy.sh
16 changes: 15 additions & 1 deletion .github/workflows/database-restore.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,25 @@ jobs:
CF_ORG: "${{ secrets.CF_ORG }}"
PROJECT: "${{ secrets.PROJECT }}"
DATABASE_BACKUP_BASTION_NAME: "${{ secrets.DATABASE_BACKUP_BASTION_NAME }}"
TEST_USER_PASS: "{{ secrets.TEST_USER_PASS }}"
TEST_USER_PASS: "${{ secrets.TEST_USER_PASS }}"
TEST_USER_NAMES: "${{ secrets.TEST_USER_NAMES }}"
run: |
export S3_FILE_PATH=${{ github.event.inputs.database_file_override }}
source ./scripts/pipeline/s3-backup-download.sh
source ./scripts/pipeline/database-restore.sh
# Split the USERS_LIST into an array
IFS=',' read -ra users <<< "${TEST_USER_NAMES}"
# Generate the password reset commands
password_reset_commands=""
for user in "${users[@]}"; do
password_reset_commands+="drush user:password $user \"TU_PASS\"\n"
done
# Make replacement in the drush post deploy with user change password commands
sed -i "s|### USER_PASSWORD_RESET_PLACEHOLDER ###|$password_reset_commands|" ./scripts/drush-post-deploy.sh
# Set the test user's passwords to the value of the github secret value for TEST_USER_PASS.
sed -i "s#TU_PASS#${TEST_USER_PASS}#g" ./scripts/drush-post-deploy.sh
# Execute the drush command script
source ./scripts/pipeline/cloud-gov-post-deploy.sh
source ./scripts/pipeline/cloud-gov-post-deploy.sh
source ./scripts/pipeline/s3-backup-post-restore.sh
stopBastion:
Expand Down
107 changes: 73 additions & 34 deletions .github/workflows/increment_sub_hash.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,55 @@ on:
workflow_dispatch: # Allows manual trigger

jobs:
update-submodule:
# update-submodule-on-release:
# name: update-submodule-on-release
# runs-on: ubuntu-latest
#
# steps:
# - name: Checkout repository without submodules
# uses: actions/checkout@v4
# with:
# submodules: false # Do not checkout submodules initially
# fetch-depth: 0 # Fetch all history
#
# - name: Set up Git
# run: |
# git config --global user.name "Xavier Metichecchia"
# git config --global user.email "[email protected]"
# git config --global pull.rebase false # Ensure merge strategy
# git remote set-url origin https://${{ secrets.HASH_PAT }}@github.com/GSA/px-benefit-finder.git
#
# - name: Update submodules on release branch
# continue-on-error: true
# run: |
# # Checkout the release branch
# git checkout release
#
# # Update and initialize submodules
# git submodule update --init
# git submodule set-branch --branch prod usagov-2021
# git submodule update --remote || echo "Expected error: Failed to update all submodules."
#
# # Check Git Status
# git add .
# git commit --allow-empty -m "Updated submodule to the latest commit on release branch"
#
# # Commit the changes
# git status
# git --no-pager diff
#
# # Push changes to release branch
# git push origin release

update-submodule-on-main:
name: update-submodule-on-main
runs-on: ubuntu-latest

steps:
- name: Checkout repository without submodules
uses: actions/checkout@v4
with:
submodules: false # Do not checkout submodules initially
# submodules: false # Do not checkout submodules initially
fetch-depth: 0 # Fetch all history

- name: Set up Git
Expand All @@ -21,46 +62,44 @@ jobs:
git config --global pull.rebase false # Ensure merge strategy
git remote set-url origin https://${{ secrets.HASH_PAT }}@github.com/GSA/px-benefit-finder.git
- name: Update submodules on release branch
continue-on-error: true
run: |
# Checkout the release branch
git checkout release
# Update and initialize submodules
git submodule update --init
git submodule set-branch --branch prod usagov-2021
git submodule update --remote || echo "Expected error: Failed to update all submodules."
# Check Git Status
git add .
git commit --allow-empty -m "Updated submodule to the latest commit on release branch"
# Commit the changes
git status
git --no-pager diff
# Push changes to release branch
git push origin release
- name: Sync release to main
run: |
# Switch to the main branch
git checkout main
git submodule update --remote
# Pull changes from release into main
git pull origin release
# Push updated main branch
git push origin main
- name: Sync release to dev
run: |
# Switch to the dev branch
git checkout dev
# Pull changes from release into dev
git pull origin release
# Push updated dev branch
git push origin dev
# update-submodule-on-dev:
# name: update-submodule-on-dev
# runs-on: ubuntu-latest
#
# steps:
# - name: Checkout repository without submodules
# uses: actions/checkout@v4
# with:
# # submodules: false # Do not checkout submodules initially
# fetch-depth: 0 # Fetch all history
#
# - name: Set up Git
# run: |
# git config --global user.name "Xavier Metichecchia"
# git config --global user.email "[email protected]"
# git config --global pull.rebase false # Ensure merge strategy
# git remote set-url origin https://${{ secrets.HASH_PAT }}@github.com/GSA/px-benefit-finder.git
#
# - name: Sync release to dev
# run: |
# # Switch to the dev branch
# git checkout dev
#
# # Pull changes from release into dev
# git pull origin release
#
# # Push updated dev branch
# git push origin dev
4 changes: 1 addition & 3 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
{
"recommendations": [
"rvest.vs-code-prettier-eslint"
],
"recommendations": ["github.vscode-github-actions", "esbenp.prettier-vscode"]
}
15 changes: 7 additions & 8 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
{
"debug.javascript.autoAttachFilter": "onlyWithFlag",
"editor.renderWhitespace": "none",
"diffEditor.ignoreTrimWhitespace": false,
"editor.defaultFormatter": "rvest.vs-code-prettier-eslint",
"editor.formatOnType": false,
"editor.formatOnSave": true,
"editor.formatOnSaveMode": "file",
"vs-code-prettier-eslint.prettierLast": true,
"debug.javascript.autoAttachFilter": "onlyWithFlag",
"editor.renderWhitespace": "none",
"diffEditor.ignoreTrimWhitespace": false,
"editor.formatOnType": false,
"editor.formatOnSave": true,
"editor.formatOnSaveMode": "file",
"editor.defaultFormatter": "esbenp.prettier-vscode"
}
30 changes: 30 additions & 0 deletions benefit-finder/.cspell.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"$schema": "https://raw.githubusercontent.com/streetsidesoftware/cspell/main/cspell.schema.json",
"version": "0.2",
"ignorePaths": [
"node_modules",
"themes",
"storybook-static",
"dist",
"coverage",
"build",
"src/shared/locales/es/es.json"
],
"language": "en",
"dictionaryDefinitions": [
{ "name": "content", "path": "./cspell-dictionary/content.txt" },
{ "name": "dev", "path": "./cspell-dictionary/dev.txt" },
{ "name": "es", "path": "./cspell-dictionary/es.txt" },
{ "name": "project", "path": "./cspell-dictionary/project.txt" }
],
"dictionaries": [
"html",
"bash",
"css",
"node",
"content",
"dev",
"es",
"project"
]
}
3 changes: 3 additions & 0 deletions benefit-finder/.lintstagedrc
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,8 @@
],
"src/**/*.scss": [
"stylelint --fix"
],
"**": [
"cspell lint"
]
}
11 changes: 6 additions & 5 deletions benefit-finder/.storybook/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,16 @@ const config = {
viteFinal(config) {
return mergeConfig(config, {
build: {
chunkSizeWarningLimit: '1000',
rollupOptions: {
chunkSizeWarningLimit: '1000',
rollupOptions: {
output: {
manualChunks: (id) => id.includes('src/App/index.jsx') ? 'app-chunk' : false,
manualChunks: id =>
id.includes('src/App/index.jsx') ? 'app-chunk' : false,
},
},
},
});
})
},
};
}

export default config
2 changes: 1 addition & 1 deletion benefit-finder/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ We take a utility first approach. We do not have full control over our styles si

1. we establish uswds components with `usa-<class>` classes.
2. this inherits global `uswds` `css` and `js`
3. IF we need to overide, we clone the uswds class `usa-` and prepend `bf-`.
3. IF we need to override, we clone the uswds class `usa-` and prepend `bf-`.

```css
.bf-usa-<class> .usa-<class>
Expand Down
4 changes: 4 additions & 0 deletions benefit-finder/cspell-dictionary/content.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
DOLO
FEMA
FASS
CHAMPVA
40 changes: 40 additions & 0 deletions benefit-finder/cspell-dictionary/dev.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
autodocs
camelcase
esbenp
fieldgroup
fieldset
fieldsets
firstname
lastname
stylelint
backcta
spacebar
pageup
pagedown
icongallery
skipnav
Vitest
labelledby
tabindex
stylesheet
hreflang
evenodd
checkmark
inputmode
datetype
describedby
noreferrer
noopener
lede
nbsp
httpstat
prestart
pagesurvey
Pagesub
ALLOWALL
cflinuxfs
buildpack
buildpacks
webfonts
hkshshslhshjksh
kjgljjlhkhgljgjh
16 changes: 16 additions & 0 deletions benefit-finder/cspell-dictionary/es.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
inglés
enero
Aplicar
beneficio
beneficios
buscador
discapacidad
jubilacion
suma
muerte
elegible
resultados
selecciónes
revisar
casada
Hija
2 changes: 2 additions & 0 deletions benefit-finder/cspell-dictionary/project.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
usagov
uswds
2 changes: 1 addition & 1 deletion benefit-finder/cypress.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

const { defineConfig } = require('cypress')

module.exports = defineConfig({
Expand All @@ -7,6 +6,7 @@ module.exports = defineConfig({
runMode: 2,
openMode: 0,
},
viewportWidth: 1050,
e2e: {
baseUrl: 'http://localhost:6006',
excludeSpecPattern: 'cypress/e2e/usagov-public-site/*.cy.js',
Expand Down
Loading

0 comments on commit e259271

Please sign in to comment.