Skip to content
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

Deploy testing actions #611

Merged
merged 4 commits into from
Nov 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions .github/workflows/build-and-deploy-telemed-ehr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,8 @@ on:
type: choice
default: 'development'
options:
- development
- dev2
- development
- testing
- staging
incrementVersion:
description: 'Bump Version?'
type: boolean
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/build-and-deploy-telemed-intake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@ on:
default: 'development'
options:
- development
- dev2
- testing
- staging
incrementVersion:
description: 'Bump Version?'
type: boolean
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@ jobs:
- name: Set the urgent-care-intake/zambdas/.env/development.json
run: cp packages/urgent-care-intake/zambdas/.env/local.template.json packages/urgent-care-intake/zambdas/.env/development.json

- name: Set the telemed-ehr/zambdas/.env/testing.json
run: cp packages/telemed-ehr/zambdas/.env/local.template.json packages/telemed-ehr/zambdas/.env/testing.json

- name: Set the telemed-intake/zambdas/.env/testing.json
run: cp packages/telemed-intake/zambdas/.env/local.template.json packages/telemed-intake/zambdas/.env/testing.json

- id: get-store-path
run: echo STORE_PATH=$(pnpm store path) >> $GITHUB_OUTPUT

Expand Down
3 changes: 2 additions & 1 deletion packages/telemed-ehr/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"test": "react-scripts test",
"eject": "react-scripts eject",
"deploy:development": " PREFIX=development CLOUDFRONT_ID=E10TA6FN58D1OS ENV=development pnpm run ci-deploy-skeleton",
"deploy:testing": " PREFIX=testing CLOUDFRONT_ID=ETFAEVC5V0490 ENV=testing pnpm run ci-deploy-skeleton",
"ci-deploy-skeleton": "ENV=${ENV} VITE_APP_SHA=${GIT_HEAD:-$(git rev-parse --short HEAD)} VITE_APP_VERSION=$(node -pe 'require(\"./package.json\").version') pnpm run build:${ENV} && aws s3 sync build/ s3://ehr.ottehr.com --region us-east-1 --delete && aws cloudfront create-invalidation --distribution-id ${CLOUDFRONT_ID} --paths '/*' --region us-east-1"
},
"dependencies": {
Expand Down Expand Up @@ -62,4 +63,4 @@
"@types/styled-components": "^5.1.34",
"@types/react-page-visibility": "^6.4.4"
}
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import devConfig from '../.env/development.json';
// import testingConfig from '../.env/testing.json';
import testingConfig from '../.env/testing.json';
import { getAuth0Token } from '../src/shared';
import { ZambdaClient } from '@zapehr/sdk';

Expand Down Expand Up @@ -37,9 +37,9 @@ const main = async (): Promise<void> => {
case 'development':
await setupSecrets(devConfig);
break;
// case 'testing':
// await setupSecrets(testingConfig);
// break;
case 'testing':
await setupSecrets(testingConfig);
break;
default:
throw new Error('¯\\_(ツ)_/¯ environment must match a valid zapEHR environment.');
}
Expand Down
4 changes: 3 additions & 1 deletion packages/telemed-intake/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@
"scripts": {
"start:local": "vite",
"build:development": "tsc && vite build --mode development",
"build:testing": "tsc && vite build --mode testing",
"build": "tsc && vite build",
"deploy:development": "ENV=development PREFIX=development CLOUDFRONT_ID=EIYX001DGGQK8 pnpm run ci-deploy-skeleton",
"deploy:testing": "ENV=testing PREFIX=testing CLOUDFRONT_ID=E2IMNWB48TKHJO pnpm run ci-deploy-skeleton",
"ci-deploy-skeleton": "ENV=${ENV} VITE_APP_SHA=${GIT_HEAD:-$(git rev-parse --short HEAD)} VITE_APP_VERSION=$(node -pe 'require(\"./package.json\").version') pnpm run build:${ENV} && aws s3 sync build/ s3://telemed.ottehr.com --region us-east-1 --delete && aws cloudfront create-invalidation --distribution-id ${CLOUDFRONT_ID} --paths '/*' --region us-east-1"
},
"dependencies": {
Expand All @@ -23,4 +25,4 @@
"devDependencies": {
"@types/styled-components": "^5.1.34"
}
}
}
8 changes: 4 additions & 4 deletions packages/telemed-intake/zambdas/scripts/common.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import devConfig from '../.env/development.json';
// import testingConfig from '../.env/testing.json';
import testingConfig from '../.env/testing.json';
import { FhirClient, ZambdaClient } from '@zapehr/sdk';
import { getM2MClientToken } from '../src/shared';

Expand All @@ -10,9 +10,9 @@ export const performEffectWithEnvFile = async (callback: (config: any) => void)
case 'development':
await callback(devConfig);
break;
// case 'testing':
// await callback(testingConfig);
// break;
case 'testing':
await callback(testingConfig);
break;
default:
throw new Error('¯\\_(ツ)_/¯ environment must match a valid zapEHR environment.');
}
Expand Down
Loading