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

[TM-1448] Create a new workflow that deploys all services at once. #13

Merged
merged 2 commits into from
Nov 13, 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
8 changes: 8 additions & 0 deletions .github/workflows/deploy-service.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@ name: Service Deploy
run-name: 'Service Deploy [service: ${{ inputs.service }}, env: ${{ inputs.env }}]'

on:
workflow_call:
inputs:
service:
required: true
type: string
env:
required: true
type: string
workflow_dispatch:
inputs:
service:
Expand Down
43 changes: 43 additions & 0 deletions .github/workflows/deploy-services.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Services Deploy (all)
run-name: 'Services Deploy (all) [env: ${{ inputs.env }}]'

on:
workflow_dispatch:
inputs:
env:
description: 'Deployment target environment'
type: choice
required: true
options:
- dev
- test
- staging
- prod

permissions:
id-token: write
contents: read

jobs:
job-service:
uses: ./.github/workflows/deploy-service.yml
with:
env: ${{ inputs.env }}
service: job-service
secrets: inherit

user-service:
uses: ./.github/workflows/deploy-service.yml
with:
env: ${{ inputs.env }}
service: user-service
secrets: inherit

research-service:
uses: ./.github/workflows/deploy-service.yml
with:
env: ${{ inputs.env }}
service: research-service
secrets: inherit


1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ and main branches.
* For deployment to AWS:
* Add a Dockerfile in the new app directory. A simple copy and modify from user-service is sufficient
* Add the new service name to the "service" workflow input options in `deploy-service.yml`
* Add a new job to `deploy-services.yml` to include the new services in the "all" service deployment workflow.
* In AWS:
* Add ECR repositories for each env (follow the naming scheme from user-service, e.g. `terramatch-microservices/foo-service-staging`, etc)
* Set the repo to Immutable
Expand Down