Skip to content
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
21 changes: 10 additions & 11 deletions .github/workflows/_deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ on:

jobs:
lint: #TODO: add linter for csharp / dotnet
# if: github.ref_name == 'main' || github.ref_name == 'develop'
runs-on: 'ubuntu-latest'
timeout-minutes: 360
steps:
Expand Down Expand Up @@ -153,14 +152,14 @@ jobs:
export CLOUD_RUN_SA="${{ inputs.cloud_run_sa }}"
envsubst < ./service-yaml/container-${{ inputs.environment }}.yaml > container-${{ inputs.environment }}.yaml

- name: Deploy Cloud Run
run: |-
gcloud run services replace --project=${{inputs.gcp_project_id}} --region=${{ inputs.region }} container-${{ inputs.environment }}.yaml
# - name: Deploy Cloud Run
# run: |-
# gcloud run services replace --project=${{inputs.gcp_project_id}} --region=${{ inputs.region }} container-${{ inputs.environment }}.yaml

# - name: Deploy to Cloud Run
# id: deploy
# uses: google-github-actions/deploy-cloudrun@v0
# with:
# service: ${{ inputs.service_name }}
# region: ${{ inputs.region }}
# metadata: container-${{ inputs.environment }}.yaml
- name: Deploy to Cloud Run
id: deploy
uses: google-github-actions/deploy-cloudrun@v0
with:
service: ${{ inputs.service_name }}
region: ${{ inputs.region }}
metadata: container-${{ inputs.environment }}.yaml
27 changes: 23 additions & 4 deletions .github/workflows/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ jobs:
with:
environment: dev
ref: ${{ github.sha }}
gcp_project_id: arched-inkwell-368821
gcp_project_id: hca-demo-dev
artifact_registry_repo: reference-architectures
region: us-east4
service_name: scan-test
service_name: sample-service
code_directory: ./code/hello-python
cloud_run_sa: cloud-run-sa
language: python
Expand All @@ -47,10 +47,29 @@ jobs:
with:
environment: qa
ref: ${{ github.sha }}
gcp_project_id: arched-inkwell-368821
gcp_project_id: hca-demo-qa
artifact_registry_repo: reference-architectures
region: us-east4
service_name: pods
service_name: sample-service
code_directory: ./code/hello-python
language: python
secrets: inherit

prod:
if: inputs.environment == 'prod'
uses: ./.github/workflows/_deployment.yaml
permissions:
id-token: write
contents: read
actions: read
security-events: write
with:
environment: prod
ref: ${{ github.sha }}
gcp_project_id: hca-demo-prod
artifact_registry_repo: reference-architectures
region: us-east4
service_name: sample-service
code_directory: ./code/hello-python
language: python
secrets: inherit
45 changes: 0 additions & 45 deletions code/service-yaml/container-dev.yaml

This file was deleted.

41 changes: 0 additions & 41 deletions code/service-yaml/container-prod.yaml

This file was deleted.

3 changes: 1 addition & 2 deletions service-yaml/container-prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,4 @@ spec:
value: ${PROJECT_ID}
traffic:
- latestRevision: true
percent: 100

percent: 100 #TODO: provide as inputs for use with workflow dispatch
File renamed without changes.