Skip to content

Commit

Permalink
Merge pull request #8009 from jrjohnson/matrix-deploys-and-test
Browse files Browse the repository at this point in the history
Improvements to Deploy
  • Loading branch information
stopfstedt committed Jul 25, 2024
2 parents f40b4ea + f302975 commit 9b21f04
Show file tree
Hide file tree
Showing 8 changed files with 66 additions and 3 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,32 @@ jobs:
- name: Build
run: pnpm --filter ${{matrix.workspace}} run build

test-deploy-build:
name: Test Deploy Build
runs-on: ubuntu-latest
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
node-version: [20]
workspace:
- frontend
- lti-course-manager
- lti-dashboard
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 9
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: pnpm
- name: install dependencies
run: pnpm install
- name: Test ${{matrix.workspace}} Deploy
run: pnpm --filter ${{matrix.workspace}} run deploy:test

sonarqube_scan:
name: Scan with UCSF SonarQube
runs-on: ubuntu-latest
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/deploy-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,14 @@ jobs:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
GITHUB_PR_NUMBER: ${{ github.event.number }}
- uses: act10ns/slack@v2
if: failure()
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_ILIOS_DEPLOYMENT_WEBHOOK_URL }}
with:
status: ${{ job.status }}
message: PR ${{ github.event.number }} Deploy Failed {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/actions/runs/{{ env.GITHUB_RUN_ID }}

comment:
runs-on: ubuntu-latest
needs: deploy
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/deploy-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ jobs:
name: Deploy and Create Sentry Release
runs-on: ubuntu-latest
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
workspace:
- frontend
- lti-dashboard
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
Expand All @@ -27,7 +33,7 @@ jobs:
- run: pnpm install
- name: Ember CLI Deploy
timeout-minutes: 30
run: pnpm -r run --parallel deploy:production
run: pnpm --filter ${{matrix.workspace}} run deploy:production
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
Expand Down
9 changes: 8 additions & 1 deletion .github/workflows/deploy-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,13 @@ jobs:
name: Deploy
runs-on: ubuntu-latest
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
workspace:
- frontend
- lti-course-manager
- lti-dashboard
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
Expand All @@ -25,7 +32,7 @@ jobs:
- run: pnpm install
- name: Ember CLI Deploy
timeout-minutes: 30
run: pnpm -r run --parallel deploy:staging
run: pnpm --filter ${{matrix.workspace}} run deploy:staging
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
Expand Down
7 changes: 7 additions & 0 deletions packages/lti-course-manager/config/deploy.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,13 @@ module.exports = function (deployTarget) {
ENV.s3.bucket = 'ilios-lti-course-manager-app-prod';
ENV.cloudfront.distribution = 'E196RJPG6UDWJ1';
}
if (deployTarget === 'development') {
ENV.build.environment = 'production';
ENV.pipeline.disabled = {
s3: true,
cloudfront: true,
};
}

// Note: if you need to build some configuration asynchronously, you can return
// a promise that resolves with the ENV object instead of returning the
Expand Down
1 change: 1 addition & 0 deletions packages/lti-course-manager/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"lint:js": "eslint . --cache",
"lint:js:fix": "eslint . --fix",
"deploy:staging": "ember deploy staging --activate",
"deploy:test": "ember deploy development",
"preinstall": "npx only-allow pnpm",
"lint:deps": "ember dependency-lint"
},
Expand Down
7 changes: 7 additions & 0 deletions packages/lti-dashboard/config/deploy.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,13 @@ module.exports = function (deployTarget) {
ENV.s3.bucket = 'ilios-lti-app-production';
ENV.cloudfront.distribution = 'E33FMSW7332DVL';
}
if (deployTarget === 'development') {
ENV.build.environment = 'production';
ENV.pipeline.disabled = {
s3: true,
cloudfront: true,
};
}

// Note: if you need to build some configuration asynchronously, you can return
// a promise that resolves with the ENV object instead of returning the
Expand Down
3 changes: 2 additions & 1 deletion packages/lti-dashboard/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"lint:js:fix": "eslint . --fix",
"deploy:production": "ember deploy production --activate",
"deploy:staging": "ember deploy staging --activate",
"deploy:test": "ember deploy development",
"preinstall": "npx only-allow pnpm",
"lint:deps": "ember dependency-lint"
},
Expand Down Expand Up @@ -112,4 +113,4 @@
]
},
"private": true
}
}

0 comments on commit 9b21f04

Please sign in to comment.