open shift rename #3
Workflow file for this run
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
name: .Deploys | ||
on: | ||
workflow_call: | ||
inputs: | ||
environment: | ||
description: GitHub environment; e.g. PR number (omit), TEST or PROD | ||
required: false | ||
type: string | ||
tag: | ||
description: Image tag; e.g. PR number or latest | ||
default: ${{ github.event.number }} | ||
required: false | ||
type: string | ||
target: | ||
description: Deployment target; e.g. PR number (omit), test or prod | ||
default: ${{ github.event.number }} | ||
required: false | ||
type: string | ||
jobs: | ||
# init: | ||
# name: Initialize | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# - name: Initialize | ||
# uses: bcgov-nr/[email protected] | ||
# with: | ||
# oc_namespace: ${{ vars.OC_NAMESPACE }} | ||
# oc_server: ${{ vars.OC_SERVER }} | ||
# oc_token: ${{ secrets.OC_TOKEN }} | ||
# oc_version: "4.14.37" | ||
# file: common/openshift.init.yml | ||
# overwrite: true | ||
# parameters: | ||
# -p NAME_SUFFIX=-dev-${{ github.event.number }} | ||
# -p POSTGRESQL_PASSWORD=${{ secrets.POSTGRES_PASSWORD }} | ||
# -p FDW_DATABASE_PASSWORD=${{ secrets.FDW_DATABASE_PASSWORD }} | ||
# -p DJANGO_ADMIN_PASSWORD=${{ secrets.DJANGO_ADMIN_PASSWORD }} | ||
# -p DJANGO_ADMIN_URL=${{ secrets.DJANGO_ADMIN_URL }} | ||
# -p DJANGO_ADMIN_USER=${{ secrets.DJANGO_ADMIN_USER }} | ||
# -p DJANGO_SECRET_KEY=${{ secrets.DJANGO_SECRET_KEY }} | ||
# -p E_LICENSING_AUTH_USERNAME=${{ secrets.E_LICENSING_AUTH_USERNAME }} | ||
# -p E_LICENSING_AUTH_PASSWORD=${{ secrets.E_LICENSING_AUTH_PASSWORD }} | ||
# -p PG_MODE=${{ vars.PG_MODE }} | ||
# -p PG_PRIMARY_PASSWORD=${{ secrets.PG_PRIMARY_PASSWORD }} | ||
# -p PG_PRIMARY_USER=${{ secrets.PG_PRIMARY_USER }} | ||
# -p PG_ROOT_PASSWORD=${{ secrets.PG_ROOT_PASSWORD }} | ||
# # -p S3_PUBLIC_ACCESS_KEY=${{ secrets.S3_PUBLIC_ACCESS_KEY }} | ||
# # -p S3_PUBLIC_SECRET_KEY=${{ secrets.S3_PUBLIC_SECRET_KEY }} | ||
# # -p S3_HOST=${{ secrets.S3_HOST }} | ||
# # -p S3_ROOT_BUCKET=${{ secrets.S3_ROOT_BUCKET }} | ||
# # -p MINIO_ACCESS_KEY=${{ secrets.MINIO_ACCESS_KEY }} | ||
# # -p MINIO_SECRET_KEY=${{ secrets.MINIO_SECRET_KEY }} | ||
# database: | ||
# name: Database | ||
# needs: init | ||
# # environment: ${{ inputs.environment }} | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# - name: Database | ||
# uses: bcgov-nr/[email protected] | ||
# with: | ||
# oc_namespace: ${{ vars.OC_NAMESPACE }} | ||
# oc_server: ${{ vars.OC_SERVER }} | ||
# oc_token: ${{ secrets.OC_TOKEN }} | ||
# oc_version: "4.14.37" | ||
# file: database/openshift.deploy.yml | ||
# overwrite: true | ||
# parameters: | ||
# -p DATABASE_SERVICE_NAME=gwells-pg12-dev-${{ github.event.number }} | ||
# -p IMAGE_STREAM_NAMESPACE=${{ vars.OC_NAMESPACE }} | ||
# -p IMAGE_STREAM_NAME=crunchy-postgres-gis | ||
# -p IMAGE_TAG=${{ github.event.number }} | ||
# -p NAME_SUFFIX=-dev-${{ github.event.number }} | ||
# -p VOLUME_CAPACITY=512Mi | ||
# -p STORAGE_CLASS=netapp-file-standard | ||
# -p REQUEST_CPU=200m | ||
# -p REQUEST_MEMORY=512Mi | ||
# -p LIMIT_CPU=500m | ||
# -p LIMIT_MEMORY=1Gi | ||
# backend: | ||
# name: Backend | ||
# needs: [ init, database ] | ||
# # environment: ${{ inputs.environment }} | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# - name: Deploy Backend | ||
# uses: bcgov-nr/[email protected] | ||
# with: | ||
# oc_namespace: ${{ vars.OC_NAMESPACE }} | ||
# oc_server: ${{ vars.OC_SERVER }} | ||
# oc_token: ${{ secrets.OC_TOKEN }} | ||
# oc_version: "4.14.37" | ||
# file: backend/openshift.deploy.yml | ||
# parameters: | ||
# -p NAME_SUFFIX=-dev-${{ github.event.number }} | ||
# -p IMAGE_TAG=${{ github.event.number }} | ||
# -p ENV_NAME=dev | ||
# -p E_LICENSING_URL=${{ vars.E_LICENSING_URL }} | ||
# -p DB_REPLICATE=${{ vars.DB_REPLICATE }} | ||
# -p DJANGO_DEBUG=${{ vars.DJANGO_DEBUG }} | ||
# -p ENABLE_ADDITIONAL_DOCUMENTS=${{ vars.ENABLE_ADDITIONAL_DOCUMENTS }} | ||
# -p S3_PRIVATE_BUCKET=${{ vars.S3_PRIVATE_BUCKET }} | ||
# -p S3_PRIVATE_HOST=${{ vars.S3_PRIVATE_HOST }} | ||
# -p S3_WELL_EXPORT_BUCKET=${{ vars.S3_WELL_EXPORT_BUCKET }} | ||
# -p SSO_AUDIENCE=${{ vars.SSO_AUDIENCE }} | ||
# -p SSO_AUTH_HOST=${{ vars.SSO_AUTH_HOST }} | ||
# -p SSO_CLIENT=${{ vars.SSO_CLIENT }} | ||
# -p SSO_IDP_HINT=${{ vars.SSO_IDP_HINT }} | ||
# -p SSO_PORT=${{ vars.SSO_PORT }} | ||
# -p SSO_PUBKEY=${{ vars.SSO_PUBKEY }} | ||
# -p SSO_REALM=${{ vars.SSO_REALM }} | ||
# -p SSO_TEST_AUDIENCE=${{ vars.SSO_TEST_AUDIENCE }} | ||
# -p SSO_TEST_CLIENT=${{ vars.SSO_TEST_CLIENT }} | ||
# -p GDAL_LIBRARY_PATH=${{ vars.GDAL_LIBRARY_PATH }} | ||
# -p GEOS_LIBRARY_PATH=${{ vars.GEOS_LIBRARY_PATH }} | ||
# -p S3_AQUIFER_BUCKET=${{ vars.S3_AQUIFER_BUCKET }} | ||
# -p S3_REGISTRANT_BUCKET=${{ vars.S3_REGISTRANT_BUCKET }} | ||
# -p S3_PRIVATE_ROOT_BUCKET=${{ vars.S3_PRIVATE_ROOT_BUCKET }} | ||
# -p S3_PRIVATE_AQUIFER_BUCKET=${{ vars.S3_PRIVATE_AQUIFER_BUCKET }} | ||
# -p S3_PRIVATE_REGISTRANT_BUCKET=${{ vars.S3_PRIVATE_REGISTRANT_BUCKET }} | ||
# -p S3_PRIVATE_WELL_BUCKET=${{ vars.S3_PRIVATE_WELL_BUCKET }} | ||
# -p ENABLE_AQUIFERS_SEARCH=${{ vars.ENABLE_AQUIFERS_SEARCH }} | ||
# -p EMAIL_NOTIFICATION_RECIPIENT=${{ vars.EMAIL_NOTIFICATION_RECIPIENT }} | ||
# -p GEOCODER_ADDRESS_API_BASE=${{ vars.GEOCODER_ADDRESS_API_BASE }} | ||
# frontend: | ||
# name: Frontend | ||
# needs: [ init, database, backend ] | ||
# # environment: ${{ inputs.environment }} | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# - name: Deploy Frontend | ||
# uses: bcgov-nr/[email protected] | ||
# with: | ||
# oc_namespace: ${{ vars.OC_NAMESPACE }} | ||
# oc_server: ${{ vars.OC_SERVER }} | ||
# oc_token: ${{ secrets.OC_TOKEN }} | ||
# oc_version: "4.14.37" | ||
# file: frontend/openshift.deploy.yml | ||
# parameters: | ||
# -p NAME_SUFFIX=-dev-${{ github.event.number }} | ||
# -p IMAGE_TAG=${{ github.event.number }} | ||
# -p ENV_NAME=dev | ||
minio: | ||
name: Minio | ||
#needs: [ init, database, backend, frontend ] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Deploy Minio | ||
uses: bcgov-nr/[email protected] | ||
with: | ||
oc_namespace: ${{ vars.OC_NAMESPACE }} | ||
oc_server: ${{ vars.OC_SERVER }} | ||
oc_token: ${{ secrets.OC_TOKEN }} | ||
oc_version: "4.14.37" | ||
file: minio/openshift.deploy.yml | ||
parameters: | ||
# -p NAME_SUFFIX=-dev-${{ github.event.number }} | ||
-p IMAGE_TAG=${{ github.event.number }} | ||
# -p ENV_NAME=dev | ||
-p MINIO_ACCESS_KEY=${{ secrets.MINIO_ACCESS_KEY }} | ||
-p MINIO_SECRET_KEY=${{ secrets.MINIO_SECRET_KEY }} | ||
-p MINIO_DATA_DIR=/data | ||