Skip to content

Commit

Permalink
Merge pull request #310 from flexion/sprint-44.5
Browse files Browse the repository at this point in the history
Sprint 44.5
  • Loading branch information
mmarcotte authored Jul 28, 2020
2 parents 65736df + 829f496 commit 1aec55f
Show file tree
Hide file tree
Showing 376 changed files with 8,265 additions and 3,345 deletions.
43 changes: 22 additions & 21 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ jobs:
aws_auth:
aws_access_key_id: $AWS_ACCESS_KEY_ID
aws_secret_access_key: $AWS_SECRET_ACCESS_KEY
resource_class: small
steps:
- restore_cache:
name: Source - Restoring Cache
Expand Down Expand Up @@ -54,7 +55,7 @@ jobs:
aws_auth:
aws_access_key_id: $AWS_ACCESS_KEY_ID
aws_secret_access_key: $AWS_SECRET_ACCESS_KEY
resource_class: medium
resource_class: small
steps:
- restore_cache:
name: Source - Restoring Cache
Expand Down Expand Up @@ -96,7 +97,7 @@ jobs:
aws_auth:
aws_access_key_id: $AWS_ACCESS_KEY_ID
aws_secret_access_key: $AWS_SECRET_ACCESS_KEY
resource_class: medium
resource_class: small
steps:
- restore_cache:
name: Source - Restoring Cache
Expand Down Expand Up @@ -174,6 +175,7 @@ jobs:
aws_auth:
aws_access_key_id: $AWS_ACCESS_KEY_ID
aws_secret_access_key: $AWS_SECRET_ACCESS_KEY
resource_class: small
steps:
- attach_workspace:
at: ~/
Expand Down Expand Up @@ -217,7 +219,7 @@ jobs:
environment:
discovery.type: single-node
environment:
_JAVA_OPTIONS: '-Xms1024m -Xmx4096m'
_JAVA_OPTIONS: '-Xms2048m -Xmx4096m'
resource_class: xlarge
steps:
- restore_cache:
Expand Down Expand Up @@ -362,7 +364,7 @@ jobs:
deploy:
machine:
docker_layer_caching: true
resource_class: medium
resource_class: small
steps:
- checkout
- run:
Expand Down Expand Up @@ -450,23 +452,22 @@ jobs:
else
echo "skipping…"
fi
# Disabled temporarily until we find a better approach for smoke testing
# - run:
# name: 'Deploy - Cypress Smoke Tests'
# command: |
# if [ "${CIRCLE_BRANCH}" == "develop" ] || [ "${CIRCLE_BRANCH}" == "experimental1" ] || [ "${CIRCLE_BRANCH}" == "experimental2" ] || [ "${CIRCLE_BRANCH}" == "staging" ] || [ "${CIRCLE_BRANCH}" == "irs" ]; then
# docker run -e "AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID}" -e "AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY}" -e "ENV=${ENV}" -e "EFCMS_DOMAIN=${EFCMS_DOMAIN}" --rm efcms /bin/sh -c "npm run cypress:smoketests"
# else
# echo "skipping…"
# fi
# - run:
# name: 'Deploy - Pa11y Smoke Tests'
# command: |
# if [ "${CIRCLE_BRANCH}" == "develop" ] || [ "${CIRCLE_BRANCH}" == "experimental1" ] || [ "${CIRCLE_BRANCH}" == "experimental2" ] || [ "${CIRCLE_BRANCH}" == "staging" ] || [ "${CIRCLE_BRANCH}" == "irs" ]; then
# docker run -e "AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID}" -e "AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY}" -e "EFCMS_DOMAIN=${EFCMS_DOMAIN}" --rm efcms /bin/sh -c "ENV=${ENV} npm run test:pa11y:smoketests"
# else
# echo "skipping…"
# fi
- run:
name: 'Deploy - Cypress Smoke Tests'
command: |
if [ "${CIRCLE_BRANCH}" == "develop" ] || [ "${CIRCLE_BRANCH}" == "experimental1" ] || [ "${CIRCLE_BRANCH}" == "experimental2" ] || [ "${CIRCLE_BRANCH}" == "staging" ] || [ "${CIRCLE_BRANCH}" == "irs" ]; then
docker run -e "AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID}" -e "AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY}" -e "ENV=${ENV}" -e "EFCMS_DOMAIN=${EFCMS_DOMAIN}" --rm efcms /bin/sh -c "npm run cypress:smoketests"
else
echo "skipping…"
fi
- run:
name: 'Deploy - Pa11y Smoke Tests'
command: |
if [ "${CIRCLE_BRANCH}" == "develop" ] || [ "${CIRCLE_BRANCH}" == "experimental1" ] || [ "${CIRCLE_BRANCH}" == "experimental2" ] || [ "${CIRCLE_BRANCH}" == "staging" ] || [ "${CIRCLE_BRANCH}" == "irs" ]; then
docker run -e "AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID}" -e "AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY}" -e "EFCMS_DOMAIN=${EFCMS_DOMAIN}" --rm efcms /bin/sh -c "ENV=${ENV} npm run test:pa11y:smoketests"
else
echo "skipping…"
fi
- run:
name: 'Deploy - Authorizer Smoke Tests'
command: |
Expand Down
16 changes: 8 additions & 8 deletions cypress-smoketests/fixtures/caseMigrations.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ exports.CASE_WITH_OTHER_FILERS = {
city: faker.address.city(),
countryType: COUNTRY_TYPES.DOMESTIC,
name: faker.name.findName(),
otherFilerType: 'Participant',
otherFilerType: 'Tax Matters Partner',
phone: faker.phone.phoneNumber(),
postalCode: faker.address.zipCode(),
state: faker.address.stateAbbr(),
Expand All @@ -163,7 +163,7 @@ exports.CASE_WITH_OTHER_FILERS = {
city: faker.address.city(),
countryType: COUNTRY_TYPES.DOMESTIC,
name: faker.name.findName(),
otherFilerType: 'Participant',
otherFilerType: 'Tax Matters Partner',
phone: faker.phone.phoneNumber(),
postalCode: faker.address.zipCode(),
state: faker.address.stateAbbr(),
Expand All @@ -175,7 +175,7 @@ exports.CASE_WITH_OTHER_FILERS = {
city: faker.address.city(),
countryType: COUNTRY_TYPES.DOMESTIC,
name: faker.name.findName(),
otherFilerType: 'Participant',
otherFilerType: 'Tax Matters Partner',
phone: faker.phone.phoneNumber(),
postalCode: faker.address.zipCode(),
state: faker.address.stateAbbr(),
Expand All @@ -187,7 +187,7 @@ exports.CASE_WITH_OTHER_FILERS = {
city: faker.address.city(),
countryType: COUNTRY_TYPES.DOMESTIC,
name: faker.name.findName(),
otherFilerType: 'Participant',
otherFilerType: 'Tax Matters Partner',
phone: faker.phone.phoneNumber(),
postalCode: faker.address.zipCode(),
state: faker.address.stateAbbr(),
Expand All @@ -199,7 +199,7 @@ exports.CASE_WITH_OTHER_FILERS = {
city: faker.address.city(),
countryType: COUNTRY_TYPES.DOMESTIC,
name: faker.name.findName(),
otherFilerType: 'Participant',
otherFilerType: 'Tax Matters Partner',
phone: faker.phone.phoneNumber(),
postalCode: faker.address.zipCode(),
state: faker.address.stateAbbr(),
Expand All @@ -211,7 +211,7 @@ exports.CASE_WITH_OTHER_FILERS = {
city: faker.address.city(),
countryType: COUNTRY_TYPES.DOMESTIC,
name: faker.name.findName(),
otherFilerType: 'Participant',
otherFilerType: 'Tax Matters Partner',
phone: faker.phone.phoneNumber(),
postalCode: faker.address.zipCode(),
state: faker.address.stateAbbr(),
Expand All @@ -223,7 +223,7 @@ exports.CASE_WITH_OTHER_FILERS = {
city: faker.address.city(),
countryType: COUNTRY_TYPES.DOMESTIC,
name: faker.name.findName(),
otherFilerType: 'Participant',
otherFilerType: 'Tax Matters Partner',
phone: faker.phone.phoneNumber(),
postalCode: faker.address.zipCode(),
state: faker.address.stateAbbr(),
Expand All @@ -235,7 +235,7 @@ exports.CASE_WITH_OTHER_FILERS = {
city: faker.address.city(),
countryType: COUNTRY_TYPES.DOMESTIC,
name: faker.name.findName(),
otherFilerType: 'Participant',
otherFilerType: 'Tax Matters Partner',
phone: faker.phone.phoneNumber(),
postalCode: faker.address.zipCode(),
state: faker.address.stateAbbr(),
Expand Down
2 changes: 2 additions & 0 deletions cypress-smoketests/support/pages/case-detail.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ exports.addDocketEntryForOrderAndServe = () => {
cy.get('.modal-button-confirm').click();
cy.url().should('not.contain', '/add-court-issued-docket-entry');
cy.get('button:contains("Order to Show Cause")').click();
cy.get('h3:contains("Order to Show Cause")').should('exist');
cy.get('div:contains("Served")').should('exist');
};

Expand All @@ -47,5 +48,6 @@ exports.addDocketEntryForOrderAndServePaper = () => {
cy.url().should('contain', '/print-paper-service');
cy.get('#print-paper-service-done-button').click();
cy.get('button:contains("Order to Show Cause")').click();
cy.get('h3:contains("Order to Show Cause")').should('exist');
cy.get('div:contains("Served")').should('exist');
};
15 changes: 15 additions & 0 deletions docker-smoketests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash -e

# This runs the post-deply smoke tests
# rm -rf node_modules dist .elasticsearch .dynamodb
# npm ci

docker build -t efcms -f Dockerfile .

docker run -e AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID \
-e AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY \
-e CYPRESS_BASE_URL=$CYPRESS_BASE_URL \
-e EFCMS_DOMAIN=$EFCMS_DOMAIN \
-e ENV=$ENV \
--rm efcms /bin/sh \
-c 'npm run cypress:smoketests && npm run test:pa11y:smoketests'
6 changes: 3 additions & 3 deletions docker-test-all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ docker run -v "$(pwd)/shared/coverage:/home/app/shared/coverage" --rm efcms /bin

docker run -v "$(pwd)/web-api/coverage:/home/app/web-api/coverage" --rm efcms /bin/sh -c 'npm run test:api'

docker run -v "$(pwd)/web-client/coverage:/home/app/web-client/coverage" --rm -e SKIP_CACHE_INVALIDATION=true efcms /bin/sh -c \
docker run -v "$(pwd)/web-client/coverage:/home/app/web-client/coverage" --rm efcms /bin/sh -c \
'(npm run start:api &) && ./wait-until.sh http://localhost:4000/api/swagger && npm run test:client'

docker run --rm -e SKIP_CACHE_INVALIDATION=true -e AWS_ACCESS_KEY_ID=noop -e AWS_SECRET_ACCESS_KEY=noop efcms /bin/sh -c \
docker run --rm -e AWS_ACCESS_KEY_ID=noop -e AWS_SECRET_ACCESS_KEY=noop efcms /bin/sh -c \
'(npx run-p start:api start:client:ci &) && ./wait-until.sh http://localhost:4000/api/swagger && ./wait-until.sh http://localhost:1234 && npm run test:pa11y'

docker run --rm -e SKIP_CACHE_INVALIDATION=true -e SLS_DEBUG=* -e AWS_ACCESS_KEY_ID=noop -e AWS_SECRET_ACCESS_KEY=noop efcms /bin/sh -c \
docker run --rm -e AWS_ACCESS_KEY_ID=noop -e AWS_SECRET_ACCESS_KEY=noop efcms /bin/sh -c \
'(npx run-p start:api start:client:ci &) && ./wait-until.sh http://localhost:4000/api/swagger && ./wait-until.sh http://localhost:1234 && npm run cypress'
6 changes: 6 additions & 0 deletions docker-test-integration.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash -e

docker build -t efcms -f Dockerfile .

docker run -v "$(pwd)/web-client/coverage:/home/app/web-client/coverage" --rm efcms /bin/sh -c \
'(npm run start:api:ci &) && ./wait-until.sh http://localhost:4000/api/swagger && npm run test:client:integration'
2 changes: 1 addition & 1 deletion docs/MIGRATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ Valid Case object example:
"name": "Guy Fieri",
"email": "someone@example.com",
"hasEAccess": true,
"otherFilerType": "Participant",
"otherFilerType": "Tax Matters Partner",
"phone": "1234567890",
"postalCode": "05198",
"state": "AK"
Expand Down
46 changes: 11 additions & 35 deletions docs/SCRIPTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,38 +2,14 @@

The following scripts are used for local development and managing deployments to AWS. Valid AWS admin credentials are required.

`reset-dependencies.sh`

Removes all downloaded dependencies and reinstalls everything from scratch.

`npm run deploy:account-specific`

Prepares AWS for a deployment to an AWS account.

`npm run deploy:environment-specific -- ENV`

Prepares AWS for a deployment to an environment.

`npm run init:api -- ENV`

Initializes the API code in your workspace to AWS.

`npm run init:ui -- ENV`

Initializes the UI code in your workspace to AWS.

`npm run deploy:api -- ENV`

Deploys the API code in your workspace to AWS.

`npm run deploy:ui -- ENV`

Deploys the UI code in your workspace to AWS.

`npm run reset-cases ENV`

Removes all cases from DynamoDB and ElasticSearch for an environment in AWS.

`npm run destroy:ENV`

Removes all infrastructure resources and data for an environment in AWS.
|Command|Description|
|----------------------------|------------------------------------------------------------------------------------------|
|`reset-dependencies.sh` |Removes all downloaded dependencies and reinstalls everything from scratch. |
|`npm run deploy:account-specific` |Prepares AWS for a deployment to an AWS account. |
|`npm run deploy:environment-specific -- ENV`|Prepares AWS for a deployment to an environment.|
|`npm run init:api -- ENV`|Initializes the API code in your workspace to AWS.|
|`npm run init:ui -- ENV`|Initializes the UI code in your workspace to AWS.|
|`npm run deploy:api -- ENV`|Deploys the API code in your workspace to AWS.|
|`npm run deploy:ui -- ENV`|Deploys the UI code in your workspace to AWS.|
|`npm run reset-cases ENV`|Removes all cases from DynamoDB and ElasticSearch for an environment in AWS.|
|`npm run destroy:ENV`|Removes all infrastructure resources and data for an environment in AWS.|
9 changes: 8 additions & 1 deletion docs/TROUBLESHOOTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,4 +91,11 @@ Error: Error applying plan:
* aws_apigatewayv2_domain_name.websockets_domain: error creating API Gateway v2 domain name: BadRequestException: The provided certificate does not exist.
```

When this happens, re-run the deploy.
When this happens, re-run the deploy.


### aws-xray-sdk version 3.1.0

We have locked aws-xray-sdk to version 2.5.0 because when upgrading to 3.1.0, an error is thrown during the web-api terraform deploy:

`Error: error archiving file: could not archive missing file`
4 changes: 4 additions & 0 deletions docs/entities/Case.md
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,10 @@
- "Other"
- "Individual petitioner"
- "Petitioner and spouse"
hasPendingItems:
type: "boolean"
flags:
presence: "optional"
hasVerifiedIrsNotice:
type: "boolean"
flags:
Expand Down
13 changes: 12 additions & 1 deletion docs/entities/DocketRecord.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,17 @@
name: "max"
args:
limit: 500
docketRecordId:
type: "string"
flags:
presence: "required"
rules:
-
name: "guid"
args:
options:
version:
- "uuidv4"
documentId:
type: "string"
flags:
Expand All @@ -48,7 +59,7 @@
-
name: "max"
args:
limit: 3000
limit: 4000
allow:
- null
metas:
Expand Down
Loading

0 comments on commit 1aec55f

Please sign in to comment.