Skip to content

Commit

Permalink
fix: CE-1078 persist secret content changes between rollouts (#698)
Browse files Browse the repository at this point in the history
Co-authored-by: afwilcox <alecwilcox@gmail.com>
  • Loading branch information
jon-funk and afwilcox authored Oct 17, 2024
1 parent 02d58eb commit 9df80c5
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 3 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/pr-close.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,12 @@ jobs:
with:
cleanup: helm
packages: backend frontend migrations

cleanup-labeled:
name: Cleanup Labeled Resources
uses: bcgov/quickstart-openshift-helpers/.github/workflows/.pr-close.yml@v0.5.0
secrets:
oc_namespace: ${{ secrets.OC_NAMESPACE }}
oc_token: ${{ secrets.OC_TOKEN }}
with:
cleanup: label
1 change: 0 additions & 1 deletion .github/workflows/pr-open.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ jobs:
oc_token: ${{ secrets.OC_TOKEN }}
with:
triggers: ('backend/' 'frontend/' 'webeoc/' 'migrations/')
params: --set global.secrets.persist=false

tests:
name: Tests
Expand Down
7 changes: 5 additions & 2 deletions charts/app/Chart.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,8 @@ dependencies:
- name: postgresql
repository: https://charts.bitnami.com/bitnami
version: 15.5.13
digest: sha256:e29db8b50c7ad4e611c43b4590506d2172ac278b08f015fe0240ba123f2166ec
generated: "2024-07-03T12:48:59.269045601Z"
- name: nats
repository: https://nats-io.github.io/k8s/helm/charts/
version: 1.1.12
digest: sha256:daadb6fa80ea04bc755dfeae1b823ce70b60f7bc3326ab9c40b3768bb2d5d9aa
generated: "2024-10-08T14:08:20.367635823-07:00"
1 change: 1 addition & 0 deletions charts/app/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,6 @@ Selector labels
{{- define "selectorLabels" -}}
app.kubernetes.io/name: {{ include "fullname" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app: {{ .Release.Name }}
{{- end }}

10 changes: 10 additions & 0 deletions migrations/migrations/R__Create-Test-Data.sql
Original file line number Diff line number Diff line change
Expand Up @@ -1953,6 +1953,16 @@ VALUES
'f896cbb2d5254e54a4ad581dc80681d1'::uuid
) ON CONFLICT
DO NOTHING;
-- Fix keycloak name
UPDATE
public.officer
SET
user_id = 'JONFUNK'
WHERE
(
officer_guid = 'b17ee2c1-a26b-4911-ac6f-810b8fdfaab3'
AND user_id = 'JFUNK'
);

INSERT INTO
public.officer (
Expand Down
2 changes: 2 additions & 0 deletions migrations/test-only-migrations/R__Test-Data-Creation.sql
Original file line number Diff line number Diff line change
Expand Up @@ -476,6 +476,8 @@ INSERT INTO public.officer
(officer_guid, user_id, create_user_id, create_utc_timestamp, update_user_id, update_utc_timestamp, person_guid, office_guid, auth_user_guid)
VALUES('b17ee2c1-a26b-4911-ac6f-810b8fdfaab3'::uuid, 'JFUNK', 'FLYWAY', '2024-01-22 22:16:16.754', 'FLYWAY', '2024-01-22 22:20:48.186', '97f3cee5-6f4a-410f-810f-d431595fccee'::uuid, '4a5a94b1-bd47-4611-a577-861d97089903'::uuid, 'f896cbb2d5254e54a4ad581dc80681d1'::uuid)
ON CONFLICT DO NOTHING;
-- Fix keycloak name
UPDATE public.officer SET user_id = 'JONFUNK' WHERE (officer_guid = 'b17ee2c1-a26b-4911-ac6f-810b8fdfaab3' AND user_id = 'JFUNK');
INSERT INTO public.officer
(officer_guid, user_id, create_user_id, create_utc_timestamp, update_user_id, update_utc_timestamp, person_guid, office_guid, auth_user_guid)
VALUES('06ff894b-3895-4d32-8a4a-1fcc0be23e47'::uuid, 'RRONDEAU', 'FLYWAY', '2024-01-22 22:16:16.754', 'FLYWAY', '2024-01-22 22:20:48.186', '0667495f-61a5-4d3b-b756-1ee58cb38e23'::uuid, '4a5a94b1-bd47-4611-a577-861d97089903'::uuid, '77c6040d69b74757903f1cba37404db4'::uuid)
Expand Down

0 comments on commit 9df80c5

Please sign in to comment.