-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2296 from pwei1018/feature-legal-name
Update CD flow for GCP migration.
- Loading branch information
Showing
99 changed files
with
2,113 additions
and
2,209 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: Business API CD | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- "legal-api/**" | ||
workflow_dispatch: | ||
inputs: | ||
target: | ||
description: "Deploy To" | ||
required: true | ||
type: choice | ||
options: | ||
- dev | ||
- test | ||
- sandbox | ||
- prod | ||
|
||
jobs: | ||
business-api-cd: | ||
uses: pwei1018/bcregistry-sre/.github/workflows/cloud-run-service-cd.yaml@main | ||
with: | ||
target: ${{ inputs.target }} | ||
app_name: "business-api" | ||
working_directory: "./legal-api" | ||
secrets: | ||
WORKLOAD_IDENTIFY_POOLS_PROVIDER: ${{ secrets.WORKLOAD_IDENTIFY_POOLS_PROVIDER }} | ||
GCP_SERVICE_ACCOUNT: ${{ secrets.GCP_SERVICE_ACCOUNT }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: Business Auth CD | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- "queue_services/entity-auth/**" | ||
- "queue_services/common/**" | ||
workflow_dispatch: | ||
inputs: | ||
target: | ||
description: "Deploy To" | ||
required: true | ||
type: choice | ||
options: | ||
- dev | ||
- test | ||
- sandbox | ||
- prod | ||
|
||
jobs: | ||
business-auth-cd: | ||
uses: pwei1018/bcregistry-sre/.github/workflows/cloud-run-service-cd.yaml@main | ||
with: | ||
target: ${{ inputs.target }} | ||
app_name: "business-auth" | ||
working_directory: "./queue_services/entity-auth" | ||
secrets: | ||
WORKLOAD_IDENTIFY_POOLS_PROVIDER: ${{ secrets.WORKLOAD_IDENTIFY_POOLS_PROVIDER }} | ||
GCP_SERVICE_ACCOUNT: ${{ secrets.GCP_SERVICE_ACCOUNT }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,121 @@ | ||
name: Business Auth CI | ||
|
||
on: | ||
pull_request: | ||
types: [assigned, synchronize] | ||
paths: | ||
- "queue_services/entity-auth/**" | ||
- "queue_services/common/**" | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
working-directory: ./queue_services/entity-auth | ||
|
||
jobs: | ||
setup-job: | ||
runs-on: ubuntu-20.04 | ||
|
||
if: github.repository == 'bcgov/lear' | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- run: "true" | ||
|
||
linting: | ||
needs: setup-job | ||
runs-on: ubuntu-20.04 | ||
|
||
strategy: | ||
matrix: | ||
python-version: [3.8] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
make setup | ||
- name: Lint with pylint | ||
id: pylint | ||
run: | | ||
make pylint | ||
- name: Lint with flake8 | ||
id: flake8 | ||
run: | | ||
make flake8 | ||
testing: | ||
needs: setup-job | ||
env: | ||
DATABASE_TEST_USERNAME: postgres | ||
DATABASE_TEST_PASSWORD: postgres | ||
DATABASE_TEST_NAME: postgres | ||
DATABASE_TEST_HOST: localhost | ||
DATABASE_HOST: localhost | ||
DATABASE_PASSWORD: postgres | ||
NATS_SERVERS: "nats://nats:4222" | ||
NATS_CLIENT_NAME: entity.legal_api | ||
NATS_CLUSTER_ID: test-cluster | ||
NATS_FILER_SUBJECT: entity.filing.filer | ||
NATS_QUEUE: entity-auth-worker | ||
TEST_NATS_DOCKER: True | ||
STAN_CLUSTER_NAME: test-cluster | ||
JWT_OIDC_JWKS_CACHE_TIMEOUT: 300 | ||
GO_LIVE_DATE: 2019-08-12 | ||
LEGAL_API_URL: https://mock_legal_api_url | ||
ACCOUNT_SVC_ENTITY_URL: https://mock_account_svc_entity_url | ||
COLIN_API: https://mock_colin_api_url | ||
ACCOUNT_SVC_AUTH_URL: https://mock_account_svc_auth_url | ||
ACCOUNT_SVC_CLIENT_ID: account_svc_client_id | ||
ACCOUNT_SVC_CLIENT_SECRET: account_svc_client_secret | ||
|
||
|
||
runs-on: ubuntu-20.04 | ||
|
||
services: | ||
postgres: | ||
image: postgres:12 | ||
env: | ||
POSTGRES_USER: postgres | ||
POSTGRES_PASSWORD: postgres | ||
POSTGRES_DB: postgres | ||
ports: | ||
- 5432:5432 | ||
# needed because the postgres container does not provide a healthcheck | ||
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
make setup | ||
- name: Test with pytest | ||
id: test | ||
run: | | ||
make test | ||
- name: Upload coverage to Codecov | ||
uses: codecov/codecov-action@v3 | ||
with: | ||
file: ./queue_services/entity-auth/coverage.xml | ||
flags: entityfiler | ||
name: codecov-entity-auth | ||
fail_ci_if_error: true | ||
|
||
build-check: | ||
needs: setup-job | ||
runs-on: ubuntu-20.04 | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: build to check strictness | ||
id: build | ||
run: | | ||
make build-nc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: Business BN CD | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- "queue_services/entity-bn/**" | ||
- "queue_services/common/**" | ||
workflow_dispatch: | ||
inputs: | ||
target: | ||
description: "Deploy To" | ||
required: true | ||
type: choice | ||
options: | ||
- dev | ||
- test | ||
- sandbox | ||
- prod | ||
|
||
jobs: | ||
business-bn-cd: | ||
uses: pwei1018/bcregistry-sre/.github/workflows/cloud-run-service-cd.yaml@main | ||
with: | ||
target: ${{ inputs.target }} | ||
app_name: "business-bn" | ||
working_directory: "./queue_services/entity-bn" | ||
secrets: | ||
WORKLOAD_IDENTIFY_POOLS_PROVIDER: ${{ secrets.WORKLOAD_IDENTIFY_POOLS_PROVIDER }} | ||
GCP_SERVICE_ACCOUNT: ${{ secrets.GCP_SERVICE_ACCOUNT }} |
2 changes: 1 addition & 1 deletion
2
.github/workflows/entity-bn-ci.yml → .github/workflows/business-bn-ci.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: Entity BN CI | ||
name: Business BN CI | ||
|
||
on: | ||
pull_request: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: Business Email Reminder Job CD | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- "./jobs/email-reminder/**" | ||
workflow_dispatch: | ||
inputs: | ||
target: | ||
description: "Deploy To" | ||
required: true | ||
type: choice | ||
options: | ||
- dev | ||
- test | ||
- sandbox | ||
- prod | ||
|
||
jobs: | ||
business-email-reminder-cd: | ||
uses: pwei1018/bcregistry-sre/.github/workflows/cloud-run-job-cd.yaml@main | ||
with: | ||
target: ${{ inputs.target }} | ||
app_name: "business-email-reminder" | ||
working_directory: "./jobs/email-reminder" | ||
secrets: | ||
WORKLOAD_IDENTIFY_POOLS_PROVIDER: ${{ secrets.WORKLOAD_IDENTIFY_POOLS_PROVIDER }} | ||
GCP_SERVICE_ACCOUNT: ${{ secrets.GCP_SERVICE_ACCOUNT }} |
2 changes: 1 addition & 1 deletion
2
.github/workflows/email-reminder-ci.yml → .../workflows/business-email-reminder-ci.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: Email Reminder Job CI | ||
name: Business Email Reminder Job CI | ||
|
||
on: | ||
pull_request: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: Business Emailer CD | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- "queue_services/entity-emailer/**" | ||
- "queue_services/common/**" | ||
workflow_dispatch: | ||
inputs: | ||
target: | ||
description: "Deploy To" | ||
required: true | ||
type: choice | ||
options: | ||
- dev | ||
- test | ||
- sandbox | ||
- prod | ||
|
||
jobs: | ||
business-emailer-cd: | ||
uses: pwei1018/bcregistry-sre/.github/workflows/cloud-run-service-cd.yaml@main | ||
with: | ||
target: ${{ inputs.target }} | ||
app_name: "business-emailer" | ||
working_directory: "./queue_services/entity-emailer" | ||
secrets: | ||
WORKLOAD_IDENTIFY_POOLS_PROVIDER: ${{ secrets.WORKLOAD_IDENTIFY_POOLS_PROVIDER }} | ||
GCP_SERVICE_ACCOUNT: ${{ secrets.GCP_SERVICE_ACCOUNT }} |
2 changes: 1 addition & 1 deletion
2
.github/workflows/entity-emailer-ci.yml → .github/workflows/business-emailer-ci.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: Entity Emailer CI | ||
name: Business Emailer CI | ||
|
||
on: | ||
pull_request: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: Business Filer CD | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- "queue_services/entity-filer/**" | ||
- "queue_services/common/**" | ||
workflow_dispatch: | ||
inputs: | ||
target: | ||
description: "Deploy To" | ||
required: true | ||
type: choice | ||
options: | ||
- dev | ||
- test | ||
- sandbox | ||
- prod | ||
|
||
jobs: | ||
business-filer-cd: | ||
uses: pwei1018/bcregistry-sre/.github/workflows/cloud-run-service-cd.yaml@main | ||
with: | ||
target: ${{ inputs.target }} | ||
app_name: "business-filer" | ||
working_directory: "./queue_services/entity-filer" | ||
secrets: | ||
WORKLOAD_IDENTIFY_POOLS_PROVIDER: ${{ secrets.WORKLOAD_IDENTIFY_POOLS_PROVIDER }} | ||
GCP_SERVICE_ACCOUNT: ${{ secrets.GCP_SERVICE_ACCOUNT }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.