Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(ci): deploy database #53

Merged
merged 4 commits into from
Sep 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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/action-deployer-openshift@v3.0.0
# 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/action-deployer-openshift@v3.0.0
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/action-get-pr@v0.0.1

# https://github.com/bcgov/quickstart-openshift-helpers
deploy-test:
name: Deploy (test)
uses: bcgov/quickstart-openshift-helpers/.github/workflows/.deployer.yml@v0.6.1
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/.deployer.yml@v0.6.1
# 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/.deployer.yml@v0.6.1
# 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
Loading