Skip to content

Commit

Permalink
Upgrade GCP CD pipeline. (#1625)
Browse files Browse the repository at this point in the history
  • Loading branch information
pwei1018 authored Jul 17, 2024
1 parent 65ba727 commit 8cd67a3
Show file tree
Hide file tree
Showing 12 changed files with 326 additions and 410 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pay-admin-cd-gcp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ on:

jobs:
pay-admin-cd:
uses: bcgov/bcregistry-sre/.github/workflows/cloud-run-service-cd.yaml@main
uses: bcgov/bcregistry-sre/.github/workflows/backend-cd.yaml@main
with:
target: ${{ inputs.target }}
app_name: "pay-admin"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pay-api-cd-gcp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ on:

jobs:
pay-api-cd:
uses: bcgov/bcregistry-sre/.github/workflows/cloud-run-service-cd.yaml@main
uses: bcgov/bcregistry-sre/.github/workflows/backend-cd.yaml@main
with:
target: ${{ inputs.target }}
app_name: "pay-api"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pay-queue-gcp-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ on:

jobs:
pay-queue-cd:
uses: bcgov/bcregistry-sre/.github/workflows/cloud-run-service-cd.yaml@main
uses: bcgov/bcregistry-sre/.github/workflows/backend-cd.yaml@main
with:
target: ${{ inputs.target }}
app_name: "pay-queue"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/payment-jobs-cd-gcp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ on:

jobs:
payment-jobs-cd:
uses: bcgov/bcregistry-sre/.github/workflows/cloud-run-job-cd.yaml@main
uses: bcgov/bcregistry-sre/.github/workflows/backend-job-cd.yaml@main
with:
target: ${{ inputs.target }}
app_name: "payment-jobs"
Expand Down
94 changes: 0 additions & 94 deletions jobs/payment-jobs/devops/gcp/clouddeploy-targets.yaml

This file was deleted.

73 changes: 73 additions & 0 deletions jobs/payment-jobs/devops/gcp/clouddeploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# Copyright 2022 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

apiVersion: deploy.cloud.google.com/v1
kind: DeliveryPipeline
metadata:
name: payment-jobs-pipeline
description: Deployment pipeline
serialPipeline:
stages:
- targetId: gtksf3-dev
profiles: [dev]
strategy:
standard:
verify: false
deployParameters:
- values:
deploy-env: "development"
deploy-project-id: "gtksf3-dev"
job-name: "payment-jobs-dev"
cloudsql-instances: "gtksf3-dev:northamerica-northeast1:pay-db-dev"
run-command: "./run.sh"
service-account: "[email protected]"
- targetId: gtksf3-test
profiles: [test]
strategy:
standard:
verify: false
deployParameters:
- values:
deploy-env: "development"
deploy-project-id: "gtksf3-test"
job-name: "payment-jobs-test"
cloudsql-instances: "gtksf3-test:northamerica-northeast1:pay-db-test"
run-command: "./run.sh"
service-account: "[email protected]"
- targetId: gtksf3-sandbox
profiles: [sandbox]
strategy:
standard:
verify: false
deployParameters:
- values:
deploy-env: "sandbox"
deploy-project-id: "gtksf3-tools"
job-name: "payment-jobs-sandbox"
cloudsql-instances: "gtksf3-tools:northamerica-northeast1:pay-db-sandbox"
run-command: "./run.sh"
service-account: "[email protected]"
- targetId: gtksf3-prod
profiles: [prod]
strategy:
standard:
verify: false
deployParameters:
- values:
deploy-env: "production"
deploy-project-id: "gtksf3-prod"
job-name: "payment-jobs-prod"
cloudsql-instances: "gtksf3-prod:northamerica-northeast1:pay-db-prod"
run-command: "./run.sh"
service-account: "[email protected]"
104 changes: 0 additions & 104 deletions pay-admin/devops/gcp/clouddeploy-targets.yaml

This file was deleted.

83 changes: 83 additions & 0 deletions pay-admin/devops/gcp/clouddeploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
# Copyright 2022 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

apiVersion: deploy.cloud.google.com/v1
kind: DeliveryPipeline
metadata:
name: pay-admin-pipeline
description: Deployment pipeline
serialPipeline:
stages:
- targetId: gtksf3-dev
profiles: [dev]
strategy:
standard:
verify: false
deployParameters:
- values:
deploy-env: "development"
deploy-project-id: "gtksf3-dev"
service-name: "pay-admin-dev"
container-name: "pay-admin-dev"
cloudsql-instances: "gtksf3-dev:northamerica-northeast1:pay-db-dev"
service-account: "[email protected]"
- targetId: gtksf3-test
profiles: [test]
strategy:
standard:
verify: false
deployParameters:
- values:
deploy-env: "test"
deploy-project-id: "gtksf3-test"
service-name: "pay-admin-test"
container-name: "pay-admin-test"
cloudsql-instances: "gtksf3-test:northamerica-northeast1:pay-db-test"
service-account: "[email protected]"
- targetId: gtksf3-sandbox
profiles: [sandbox]
strategy:
standard:
verify: false
deployParameters:
- values:
deploy-env: "sandbox"
deploy-project-id: "gtksf3-tools"
service-name: "pay-admin-sandbox"
container-name: "pay-admin-sandbox"
cloudsql-instances: "gtksf3-tools:northamerica-northeast1:pay-db-sandbox"
service-account: "[email protected]"
max-scale: "50"
container-concurrency: "20"
container-port: "8080"
resources-cpu: 4000m
resources-memory: 8Gi
- targetId: gtksf3-prod
profiles: [prod]
strategy:
standard:
verify: false
deployParameters:
- values:
deploy-env: "production"
deploy-project-id: "gtksf3-prod"
service-name: "pay-admin-prod"
container-name: "pay-admin-prod"
cloudsql-instances: "gtksf3-prod:northamerica-northeast1:pay-db-prod"
service-account: "[email protected]"
max-scale: "50"
container-concurrency: "20"
container-port: "8080"
resources-cpu: 4000m
resources-memory: 8Gi
Loading

0 comments on commit 8cd67a3

Please sign in to comment.