Skip to content

Commit

Permalink
chore: changing deployment to tools env
Browse files Browse the repository at this point in the history
  • Loading branch information
paulushcgcj committed Aug 19, 2024
1 parent 595d46b commit d826116
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 31 deletions.
36 changes: 5 additions & 31 deletions .github/workflows/legacy-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
with:
package: legacydb
build_file: ./database/Dockerfile.legacy
tag: ${{ github.event.number }}
tag: latest
tag_fallback: test
triggers: ('database/')
build_args: |
Expand All @@ -73,41 +73,15 @@ jobs:
- uses: actions/checkout@v4

- name: Initializing Deployment
uses: bcgov-nr/[email protected]
with:
file: common/openshift.init.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 ORACLEDB_USER=${{ secrets.ORACLEDB_USERNAME }}
-p ORACLEDB_PASSWORD=${{ secrets.ORACLEDB_PASSWORD }}
-p ORACLEDB_USER_W=${{ secrets.ORACLEDB_USERNAME_W }}
-p ORACLEDB_PASSWORD_W=${{ secrets.ORACLEDB_PASSWORD_W }}
-p ORACLEDB_DATABASE=${{ secrets.ORACLEDB_DATABASE }}
-p ORACLEDB_HOST=${{ secrets.ORACLEDB_HOST }}
-p ORACLEDB_SERVICENAME=${{ secrets.ORACLEDB_SERVICENAME }}
-p ORACLEDB_SECRET=${{ secrets.ORACLEDB_SECRET }}
-p BCREGISTRY_KEY=${{ secrets.BCREGISTRY_KEY }}
-p BCREGISTRY_ACCOUNT=${{ secrets.BCREGISTRY_ACCOUNT }}
-p CHES_CLIENT_ID=${{ secrets.CHES_CLIENT_ID }}
-p CHES_CLIENT_SECRET=${{ secrets.CHES_CLIENT_SECRET }}
-p ADDRESS_COMPLETE_KEY=${{ secrets.ADDRESS_COMPLETE_KEY }}
-p DB_PASSWORD=$(echo ${{github.ref}}${{github.event.number}}|md5sum|cut -d' ' -f1)
-p COGNITO_USER_POOL=${{ secrets.COGNITO_USER_POOL }}
-p COGNITO_ENVIRONMENT=DEV
-p CHES_MAIL_COPY=${{ secrets.CHES_MAIL_COPY }}

- name: Deploy Database Legacy
uses: bcgov-nr/[email protected]
with:
file: database/openshift.legacy.yml
oc_namespace: ${{ secrets.OC_NAMESPACE }}
oc_namespace: ${{ secrets.OC_TOOLS_NAMESPACE }}
oc_server: ${{ secrets.OC_SERVER }}
oc_token: ${{ secrets.OC_TOKEN }}
overwrite: false
parameters:
-p ZONE=${{ github.event.number }}
-p ZONE=tools
-p ORACLEDB_USER_W=${{ secrets.ORACLEDB_USERNAME_W }}
-p ORACLEDB_PASSWORD_W=${{ secrets.ORACLEDB_PASSWORD_W }}
-p PROMOTE=${{ github.repository }}/legacydb:${{ github.event.number }}
15 changes: 15 additions & 0 deletions database/openshift.legacy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ parameters:
- name: PROMOTE
description: Image (namespace/name:tag) to promote/import
required: true
- name: ORACLEDB_USER_W
description: Oracle database user name with write permission
required: true
- name: ORACLEDB_PASSWORD_W
description: Oracle database password with write permission
required: true
- name: CPU_REQUEST
value: 500m
- name: CPU_LIMIT
Expand All @@ -34,6 +40,15 @@ parameters:
- name: MEMORY_LIMIT
value: 2Gi
objects:
- kind: Secret
apiVersion: v1
metadata:
name: ${NAME}-${ZONE}
labels:
app: ${NAME}-${ZONE}
stringData:
oracle-user-write: ${ORACLEDB_USER_W}
oracle-password-write: ${ORACLEDB_PASSWORD_W}
- kind: ImageStream
apiVersion: v1
metadata:
Expand Down

0 comments on commit d826116

Please sign in to comment.