Skip to content

Commit

Permalink
ci: prod now deploys by release-name, not pr number; ci: inject RELEA…
Browse files Browse the repository at this point in the history
…SE_NUM instead of *_PR_NUM
  • Loading branch information
cberg-aot committed Jan 20, 2025
1 parent d6ead6d commit 26b4044
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/demo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ jobs:
--set-string global.zone='test' \
--set-string global.vault.role='nonprod' \
--set-string global.vault.zone='demo' \
--set-string global.pr_num='${{ inputs.tag }}' \
--set-string global.release_num='${{ inputs.tag }}' \
2 changes: 1 addition & 1 deletion .github/workflows/dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
--set-string global.zone='dev' \
--set-string global.vault.role='nonprod' \
--set-string global.vault.zone='dev' \
--set-string global.pr_num='${{ inputs.tag }}' \
--set-string global.release_num='${{ inputs.tag }}' \
--set-json dops.containers[0].resources='{"limits": {"cpu": "1000m", "memory": "2000Mi"}, "requests": {"cpu": "25m", "memory": "50Mi"}}' \
--set-json frontend.containers[0].resources='{"limits": {"cpu": "75m", "memory": "150Mi"}, "requests": {"cpu": "25m", "memory": "50Mi"}}' \
--set-json scheduler.containers[0].resources='{"limits": {"cpu": "75m", "memory": "150Mi"}, "requests": {"cpu": "25m", "memory": "50Mi"}}' \
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ jobs:
--set-string global.zone='prod' \
--set-string global.vault.role='prod' \
--set-string global.vault.zone='prod' \
--set-string global.pr_num='${{ inputs.tag }}' \
--set-string global.release_num='${{ inputs.tag }}' \
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ jobs:
uses: ./.github/workflows/prod.yml
secrets: inherit
with:
tag: ${{ needs.vars.outputs.pr }}
tag: ${{ needs.vars.outputs.release-name }}

promote-images-prod:
name: Promote Images - Prod
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ jobs:
--set-string global.zone='test' \
--set-string global.vault.role='nonprod' \
--set-string global.vault.zone='test' \
--set-string global.pr_num='${{ inputs.tag }}' \
--set-string global.release_num='${{ inputs.tag }}' \
2 changes: 1 addition & 1 deletion .github/workflows/uat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ jobs:
--set-string global.zone='test' \
--set-string global.vault.role='nonprod' \
--set-string global.vault.zone='uat' \
--set-string global.pr_num='${{ inputs.tag }}' \
--set-string global.release_num='${{ inputs.tag }}' \
22 changes: 10 additions & 12 deletions charts/onroutebc/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ frontend:
ACCESS_API_URL: "https://{{.Release.Name}}-vehicles.apps.silver.devops.gov.bc.ca"
POLICY_URL: "https://{{.Release.Name}}-policy.apps.silver.devops.gov.bc.ca"
DEPLOY_ENVIRONMENT: "{{.Values.global.vault.zone}}"
FRONTEND_PR_NUM: "{{.Values.global.pr_num}}"
config.js.template: |-
const envConfig = (() => { return {
"VITE_DEPLOY_ENVIRONMENT":"$DEPLOY_ENVIRONMENT",
Expand All @@ -43,7 +42,6 @@ frontend:
"VITE_KEYCLOAK_ISSUER_URL":"$KEYCLOAK_ISSUER_URL",
"VITE_KEYCLOAK_AUDIENCE":"$KEYCLOAK_AUDIENCE",
"VITE_SITEMINDER_LOG_OFF_URL":"$SITEMINDER_LOG_OFF_URL",
"VITE_FRONTEND_PR_NUM":"$FRONTEND_PR_NUM",
};
})();
containers:
Expand All @@ -64,9 +62,9 @@ frontend:
key: POLICY_URL
- name: DEPLOY_ENVIRONMENT
key: DEPLOY_ENVIRONMENT
- name: FRONTEND_PR_NUM
key: FRONTEND_PR_NUM
fromValues:
- name: RELEASE_NUM
value: "{{.Values.global.release_num}}"
- name: TIMESTAMP
value: "{{ now | toString }}"
ports:
Expand Down Expand Up @@ -203,8 +201,8 @@ vehicles:
fromValues:
- name: TIMESTAMP
value: "{{ now | toString }}"
- name: VEHICLES_PR_NUM
value: '{{.Values.global.pr_num}}'
- name: RELEASE_NUM
value: '{{.Values.global.release_num}}'
ports:
- name: vehicles-api
containerPort: 5000
Expand Down Expand Up @@ -340,8 +338,8 @@ dops:
- name: ACCESS_API_URL
key: ACCESS_API_URL
fromValues:
- name: DOPS_PR_NUM
value: '{{.Values.global.pr_num}}'
- name: RELEASE_NUM
value: '{{.Values.global.release_num}}'
- name: TIMESTAMP
value: "{{ now | toString }}"
ports:
Expand Down Expand Up @@ -474,8 +472,8 @@ scheduler:
- name: ACCESS_API_URL
key: ACCESS_API_URL
fromValues:
- name: SCHEDULER_PR_NUM
value: '{{.Values.global.pr_num}}'
- name: RELEASE_NUM
value: '{{.Values.global.release_num}}'
- name: TIMESTAMP
value: "{{ now | toString }}"
ports:
Expand Down Expand Up @@ -581,8 +579,8 @@ policy:
- name: FRONTEND_URL
key: FRONTEND_URL
fromValues:
- name: POLICY_PR_NUM
value: '{{.Values.global.pr_num}}'
- name: RELEASE_NUM
value: '{{.Values.global.release_num}}'
- name: TIMESTAMP
value: "{{ now | toString }}"
ports:
Expand Down

0 comments on commit 26b4044

Please sign in to comment.