Skip to content

Commit

Permalink
chore(ci): deploy database (#53)
Browse files Browse the repository at this point in the history
Co-authored-by: Fergus MacConnell WLRS:EX <[email protected]>
  • Loading branch information
DerekRoberts and fergmac authored Sep 10, 2024
1 parent bdd23a9 commit 2bad024
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 57,840 deletions.
35 changes: 28 additions & 7 deletions .github/workflows/.deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,40 @@ on:
type: string

jobs:
frontend:
name: Frontend
# needs: [backend]
environment: ${{ inputs.environment }}
database:
name: Database
# environment: ${{ inputs.environment }}
runs-on: ubuntu-22.04
steps:
- name: Deploy Frontend
# - name: Deploy Frontend
# uses: bcgov-nr/[email protected]
# with:
# oc_namespace: ${{ vars.OC_NAMESPACE }}
# oc_server: ${{ vars.OC_SERVER }}
# oc_token: ${{ secrets.OC_TOKEN }}
# file: frontend/openshift.deploy.yml
# overwrite: true
# parameters:
# -p TAG=${{ inputs.tag }} -p TARGET=${{ inputs.target }}

- name: Database
uses: bcgov-nr/[email protected]
with:
oc_namespace: ${{ vars.OC_NAMESPACE }}
oc_server: ${{ vars.OC_SERVER }}
oc_token: ${{ secrets.OC_TOKEN }}
file: frontend/openshift.deploy.yml
file: database/postgresql.dc.yml
overwrite: true
parameters:
-p TAG=${{ inputs.tag }} -p TARGET=${{ inputs.target }}
-p DATABASE_SERVICE_NAME=nr-gwells-pg12-dev-${{ github.event.number }}
-p IMAGE_STREAM_NAMESPACE=${{ vars.OC_NAMESPACE }}
-p IMAGE_STREAM_NAME=crunchy-postgres-gis
-p NAME_SUFFIX=-dev-${{ github.event.number }}
-p POSTGRESQL_DATABASE=gwells
-p VOLUME_CAPACITY=1Gi
-p STORAGE_CLASS=netapp-file-standard
-p REQUEST_CPU=200m
-p REQUEST_MEMORY=512Mi
-p LIMIT_CPU=500m
-p LIMIT_MEMORY=1Gi
-p POSTGRESQL_PASSWORD=${{ secrets.POSTGRES_PASSWORD }}
16 changes: 8 additions & 8 deletions .github/workflows/merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@ jobs:
uses: bcgov-nr/[email protected]

# https://github.com/bcgov/quickstart-openshift-helpers
deploy-test:
name: Deploy (test)
uses: bcgov/quickstart-openshift-helpers/.github/workflows/[email protected]
secrets:
oc_namespace: ${{ secrets.OC_NAMESPACE }}
oc_token: ${{ secrets.OC_TOKEN }}
with:
environment: test
# deploy-test:
# name: Deploy (test)
# uses: bcgov/quickstart-openshift-helpers/.github/workflows/[email protected]
# secrets:
# oc_namespace: ${{ secrets.OC_NAMESPACE }}
# oc_token: ${{ secrets.OC_TOKEN }}
# with:
# environment: test

# deploy-prod:
# name: Deploy (prod)
Expand Down
21 changes: 8 additions & 13 deletions .github/workflows/pr-open.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,19 +26,6 @@ jobs:
tag_fallback: latest
triggers: ('${{ matrix.package }}/')

# # https://github.com/bcgov/quickstart-openshift-helpers
# deploys:
# name: Deploys
# needs: [builds]
# uses: bcgov/quickstart-openshift-helpers/.github/workflows/[email protected]
# secrets:
# oc_namespace: ${{ secrets.OC_NAMESPACE }}
# oc_token: ${{ secrets.OC_TOKEN }}
# with:
# triggers: ('frontend/')
# params:
# --set global.secrets.persist=false

deploy:
name: Deploy
needs: [builds]
Expand All @@ -60,3 +47,11 @@ jobs:
runs-on: ubuntu-22.04
steps:
- run: echo "Success!"

# dump:
# name: Dump Context
# runs-on: ubuntu-22.04
# env:
# CONTEXT: ${{ toJson(github) }}
# steps:
# - run: echo "${{ env.CONTEXT }}"
9 changes: 0 additions & 9 deletions database/Dockerfile

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,7 @@ parameters:
generate: expression
name: POSTGRESQL_USER
required: true
- description: Password for the PostgreSQL connection user.
displayName: PostgreSQL Connection Password
from: "[a-zA-Z0-9]{16}"
generate: expression
- description: Password for the PostgreSQL connection user
name: POSTGRESQL_PASSWORD
required: true
- description: Name of the PostgreSQL database accessed.
Expand Down
Loading

0 comments on commit 2bad024

Please sign in to comment.