-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(FSADT1-1196): adding deployment to update division email (#799)
* chore: renaming method * fix(FSADT1-1196): adding deployment to update division email * ci: fixing dev deployment * ci: fixing it * ci: fixing ci * ci: updating command * ci: updating command arg * ci: moving to job
- Loading branch information
1 parent
f883118
commit 4c356aa
Showing
4 changed files
with
86 additions
and
2 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 |
---|---|---|
|
@@ -282,6 +282,16 @@ jobs: | |
-p COGNITO_COOKIE_DOMAIN=gov.bc.ca | ||
-p URL_ZONE=${{ env.ZONE }} | ||
|
||
- name: Dev data replacement | ||
uses: bcgov-nr/[email protected] | ||
with: | ||
file: database/openshift.dev.yml | ||
oc_namespace: ${{ secrets.OC_NAMESPACE }} | ||
oc_server: ${{ secrets.OC_SERVER }} | ||
oc_token: ${{ secrets.OC_TOKEN }} | ||
overwrite: true | ||
parameters: -p ZONE=${{ github.event.number }} -p NAME=${{ github.event.repository.name }} | ||
|
||
- name: Deploy Legacy | ||
uses: bcgov-nr/[email protected] | ||
with: | ||
|
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 |
---|---|---|
|
@@ -233,6 +233,16 @@ jobs: | |
-p COGNITO_COOKIE_DOMAIN=gov.bc.ca | ||
-p URL_ZONE=${{ needs.pr-validation.outputs.url_zone }} | ||
|
||
- name: Dev data replacement | ||
uses: bcgov-nr/[email protected] | ||
with: | ||
file: database/openshift.dev.yml | ||
oc_namespace: ${{ secrets.OC_NAMESPACE }} | ||
oc_server: ${{ secrets.OC_SERVER }} | ||
oc_token: ${{ secrets.OC_TOKEN }} | ||
overwrite: true | ||
parameters: -p ZONE=${{ github.event.number }} -p NAME=${{ github.event.repository.name }} | ||
|
||
- name: Deploy Legacy | ||
uses: bcgov-nr/[email protected] | ||
with: | ||
|
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,64 @@ | ||
apiVersion: template.openshift.io/v1 | ||
kind: Template | ||
labels: | ||
app: ${NAME}-${ZONE} | ||
app.kubernetes.io/part-of: ${NAME}-${ZONE} | ||
parameters: | ||
- name: NAME | ||
description: Product name | ||
value: nr-forest-client | ||
- name: COMPONENT | ||
description: Component name | ||
value: database-data | ||
- name: ZONE | ||
description: Deployment zone, e.g. pr-### or prod | ||
required: true | ||
objects: | ||
- kind: Job | ||
apiVersion: batch/v1 | ||
metadata: | ||
name: ${NAME}-${ZONE}-${COMPONENT} | ||
labels: | ||
app: ${NAME}-${ZONE} | ||
spec: | ||
template: | ||
metadata: | ||
name: ${NAME}-${ZONE}-${COMPONENT} | ||
labels: | ||
app: ${NAME}-${ZONE} | ||
deploymentconfig: ${NAME}-${ZONE}-${COMPONENT} | ||
spec: | ||
containers: | ||
- name: ${NAME} | ||
image: "postgres" | ||
command: ["/bin/sh", "-c"] | ||
args: | ||
- | | ||
psql -U "${POSTGRES_USER}" -h "${NAME}-${ZONE}-database" -d "${POSTGRES_DB}" -p 5432 -c "UPDATE nrfc.district_code SET email_address = '[email protected]';" | ||
env: | ||
- name: NAME | ||
value: ${NAME} | ||
- name: ZONE | ||
value: ${ZONE} | ||
- name: POSTGRES_DB | ||
valueFrom: | ||
secretKeyRef: | ||
name: ${NAME}-${ZONE} | ||
key: database-name | ||
- name: POSTGRES_PASSWORD | ||
valueFrom: | ||
secretKeyRef: | ||
name: ${NAME}-${ZONE} | ||
key: database-password | ||
- name: POSTGRES_USER | ||
valueFrom: | ||
secretKeyRef: | ||
name: ${NAME}-${ZONE} | ||
key: database-user | ||
- name: PGPASSWORD | ||
valueFrom: | ||
secretKeyRef: | ||
name: ${NAME}-${ZONE} | ||
key: "database-password" | ||
imagePullPolicy: Always | ||
restartPolicy: Never |
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