Release - Deploy all from v2.3.0-5205 to Staging #282
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: Release - Deploy All | |
run-name: Release - Deploy all from ${{ inputs.gitRef }} to ${{ inputs.environment }} | |
on: | |
workflow_dispatch: | |
inputs: | |
gitRef: | |
description: "Git Ref (e.g. v1.0.0 or v1.0.0-prerelease.1)" | |
required: true | |
default: "" | |
environment: | |
description: "Environment" | |
required: true | |
type: environment | |
deployCamundaDefinitions: | |
description: "Deploy Camunda BPMN/DMN from main" | |
type: boolean | |
default: true | |
deployFormioDefinitions: | |
description: "Deploy Form.io forms from main" | |
type: boolean | |
default: true | |
workflow_call: | |
inputs: | |
gitRef: | |
required: true | |
type: string | |
environment: | |
required: true | |
type: string | |
deployCamundaDefinitions: | |
required: true | |
type: boolean | |
deployFormioDefinitions: | |
required: true | |
type: boolean | |
secrets: | |
SA_TOKEN: | |
required: true | |
OPENSHIFT_ENV_NAMESPACE: | |
required: true | |
HOST_PREFIX: | |
required: true | |
KEYCLOAK_AUTH_URL: | |
required: true | |
BCeID_WEB_SERVICE_WSDL: | |
required: true | |
SITE_MINDER_LOGOUT_URL: | |
required: true | |
ATBC_LOGIN_ENDPOINT: | |
required: true | |
ATBC_ENDPOINT: | |
required: true | |
BYPASS_APPLICATION_SUBMIT_VALIDATIONS: | |
required: true | |
BYPASS_CRA_INCOME_VERIFICATION: | |
required: true | |
OPENSHIFT_SIMS_CREDS_NAME: | |
required: true | |
FORMS_SECRET_NAME: | |
required: true | |
QUEUE_PREFIX: | |
required: true | |
API_PORT: | |
required: true | |
WEB_PORT: | |
required: true | |
env: | |
NAMESPACE: ${{ secrets.OPENSHIFT_ENV_NAMESPACE }} | |
BUILD_REF: ${{ inputs.gitRef }} | |
HOST_PREFIX: ${{ secrets.HOST_PREFIX }} | |
DOMAIN_PREFIX: ${{ vars.DOMAIN_PREFIX }} | |
BUILD_NAMESPACE: ${{ vars.BUILD_NAMESPACE }} | |
KEYCLOAK_REALM: ${{ vars.KEYCLOAK_REALM }} | |
IS_FULLTIME_ALLOWED: ${{ vars.IS_FULLTIME_ALLOWED }} | |
KEYCLOAK_AUTH_URL: ${{ secrets.KEYCLOAK_AUTH_URL }} | |
BCeID_WEB_SERVICE_WSDL: ${{ secrets.BCeID_WEB_SERVICE_WSDL }} | |
SITE_MINDER_LOGOUT_URL: ${{ secrets.SITE_MINDER_LOGOUT_URL }} | |
ATBC_LOGIN_ENDPOINT: ${{ secrets.ATBC_LOGIN_ENDPOINT }} | |
ATBC_ENDPOINT: ${{ secrets.ATBC_ENDPOINT }} | |
SWAGGER_ENABLED: true | |
APPLICATION_ARCHIVE_DAYS: 43 | |
BYPASS_APPLICATION_SUBMIT_VALIDATIONS: ${{ secrets.BYPASS_APPLICATION_SUBMIT_VALIDATIONS }} | |
BYPASS_CRA_INCOME_VERIFICATION: ${{ secrets.BYPASS_CRA_INCOME_VERIFICATION }} | |
API_SECRET_NAME: ${{ secrets.OPENSHIFT_SIMS_CREDS_NAME }} | |
WORKERS_SECRET_NAME: ${{ secrets.OPENSHIFT_SIMS_CREDS_NAME }} | |
QUEUE_CONSUMERS_SECRET_NAME: ${{ secrets.OPENSHIFT_SIMS_CREDS_NAME }} | |
FORMS_SECRET_NAME: ${{ secrets.FORMS_SECRET_NAME }} | |
QUEUE_PREFIX: ${{ secrets.QUEUE_PREFIX }} | |
API_PORT: ${{ secrets.API_PORT }} | |
WEB_PORT: ${{ secrets.WEB_PORT }} | |
MAXIMUM_IDLE_TIME_FOR_WARNING_STUDENT: ${{ vars.MAXIMUM_IDLE_TIME_FOR_WARNING_STUDENT }} | |
MAXIMUM_IDLE_TIME_FOR_WARNING_SUPPORTING_USER: ${{ vars.MAXIMUM_IDLE_TIME_FOR_WARNING_SUPPORTING_USER }} | |
MAXIMUM_IDLE_TIME_FOR_WARNING_INSTITUTION: ${{ vars.MAXIMUM_IDLE_TIME_FOR_WARNING_INSTITUTION }} | |
MAXIMUM_IDLE_TIME_FOR_WARNING_AEST: ${{ vars.MAXIMUM_IDLE_TIME_FOR_WARNING_AEST }} | |
TLS_CERTIFICATE: ${{ secrets.TLS_CERTIFICATE }} | |
TLS_KEY: ${{ secrets.TLS_KEY }} | |
TLS_CA_CERTIFICATE: ${{ secrets.TLS_CA_CERTIFICATE }} | |
ALLOW_BETA_USERS_ONLY: ${{ vars.ALLOW_BETA_USERS_ONLY }} | |
jobs: | |
# Run DB migrations. | |
run-db-migrations: | |
name: Run db-migrations | |
environment: ${{ inputs.environment }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install CLI tools from OpenShift Mirror | |
uses: redhat-actions/openshift-tools-installer@v1 | |
with: | |
oc: "4" | |
- name: Print env | |
run: | | |
echo Deploy Environment: ${{ inputs.environment }} | |
echo GIT REF: ${{ inputs.gitRef }} | |
echo BUILD NAMESPACE: $BUILD_NAMESPACE | |
echo OC CLI Version: $(oc version) | |
- name: Checkout Target Branch | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ inputs.gitRef }} | |
- name: Log in to OpenShift | |
run: | | |
oc login --token=${{ secrets.SA_TOKEN }} --server=${{ vars.OPENSHIFT_CLUSTER_URL }} | |
- name: Run db-migrations | |
working-directory: "./devops/" | |
run: | | |
make oc-run-db-migrations | |
# Deploy SIMS API. | |
deploy-sims-api: | |
name: Deploy SIMS-API | |
environment: ${{ inputs.environment }} | |
runs-on: ubuntu-latest | |
needs: run-db-migrations | |
steps: | |
- name: Install CLI tools from OpenShift Mirror | |
uses: redhat-actions/openshift-tools-installer@v1 | |
with: | |
oc: "4" | |
- name: Print env | |
run: | | |
echo Deploy ENVIRONMENT: ${{ inputs.environment }} | |
echo GIT REF: ${{ inputs.gitRef }} | |
echo BUILD NAMESPACE: $BUILD_NAMESPACE | |
echo OC CLI Version: $(oc version) | |
- name: Checkout Target Branch | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ inputs.gitRef }} | |
- name: Log in to OpenShift | |
run: | | |
oc login --token=${{ secrets.SA_TOKEN }} --server=${{ vars.OPENSHIFT_CLUSTER_URL }} | |
- name: Deploy SIMS-API | |
working-directory: "./devops/" | |
run: | | |
make oc-deploy-api | |
# Deploy workers. | |
deploy-workers: | |
name: Deploy Workers | |
environment: ${{ inputs.environment }} | |
env: | |
DISABLE_ORM_CACHE: true | |
runs-on: ubuntu-latest | |
needs: run-db-migrations | |
steps: | |
- name: Install CLI tools from OpenShift Mirror | |
uses: redhat-actions/openshift-tools-installer@v1 | |
with: | |
oc: "4" | |
- name: Print env | |
run: | | |
echo BUILD ENVIRONMENT: ${{ inputs.environment }} | |
echo GIT REF: ${{ inputs.gitRef }} | |
echo OC CLI Version: $(oc version) | |
- name: Checkout Target Branch | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ inputs.gitRef }} | |
- name: Log in to OpenShift | |
run: | | |
oc login --token=${{ secrets.SA_TOKEN }} --server=${{ vars.OPENSHIFT_CLUSTER_URL }} | |
- name: Deploy Workers | |
working-directory: "./devops/" | |
run: | | |
make oc-deploy-workers | |
# Deploy queue consumers. | |
deploy-queue-consumers: | |
name: Deploy Queue Consumers | |
environment: ${{ inputs.environment }} | |
runs-on: ubuntu-latest | |
needs: run-db-migrations | |
steps: | |
- name: Install CLI tools from OpenShift Mirror | |
uses: redhat-actions/openshift-tools-installer@v1 | |
with: | |
oc: "4" | |
- name: Print env | |
run: | | |
echo Deploy ENVIRONMENT: ${{ inputs.environment }} | |
echo GIT REF: ${{ inputs.gitRef }} | |
echo BUILD NAMESPACE: $BUILD_NAMESPACE | |
echo OC CLI Version: $(oc version) | |
- name: Checkout Target Branch | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ inputs.gitRef }} | |
- name: Log in to OpenShift | |
run: | | |
oc login --token=${{ secrets.SA_TOKEN }} --server=${{ vars.OPENSHIFT_CLUSTER_URL }} | |
- name: Deploy Queue Consumers | |
working-directory: "./devops/" | |
run: | | |
make oc-deploy-queue-consumers | |
# Deploy Web/Frontend. | |
deploy-web-frontend: | |
name: Deploy Web/Frontend | |
environment: ${{ inputs.environment }} | |
runs-on: ubuntu-latest | |
needs: run-db-migrations | |
steps: | |
- name: Install CLI tools from OpenShift Mirror | |
uses: redhat-actions/openshift-tools-installer@v1 | |
with: | |
oc: "4" | |
- name: Print env | |
run: | | |
echo Deploy ENVIRONMENT: ${{ inputs.environment }} | |
echo GIT REF: ${{ inputs.gitRef }} | |
echo BUILD NAMESPACE: $BUILD_NAMESPACE | |
echo OC CLI Version: $(oc version) | |
- name: Checkout Target Branch | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ inputs.gitRef }} | |
- name: Log in to OpenShift | |
run: | | |
oc login --token=${{ secrets.SA_TOKEN }} --server=${{ vars.OPENSHIFT_CLUSTER_URL }} | |
- name: Deploy Web/Frontend | |
working-directory: "./devops/" | |
run: | | |
make oc-deploy-web | |
# Deploy Camunda Definitions | |
deployCamundaDefinitions: | |
if: ${{ inputs.deployCamundaDefinitions }} | |
name: Deploy BPMNs and DMNs to Camunda | |
needs: deploy-sims-api | |
uses: ./.github/workflows/release-deploy-camunda-definitions.yml | |
with: | |
environment: ${{ inputs.environment }} | |
gitRef: ${{ inputs.gitRef }} | |
secrets: inherit | |
# Deploy Formio Definitions | |
deployFormioDefinitions: | |
if: ${{ inputs.deployFormioDefinitions }} | |
name: Deploy Form.io definitions | |
needs: deploy-sims-api | |
uses: ./.github/workflows/release-deploy-formio-definitions.yml | |
with: | |
environment: ${{ inputs.environment }} | |
gitRef: ${{ inputs.gitRef }} | |
secrets: inherit |