Skip to content

Commit

Permalink
Updated root config CI/CD (EPDDS-270) (#454)
Browse files Browse the repository at this point in the history
* Updated root config CI/CD

* Updated root-config buildconfig

* Revert to default to dev

* Updated prod deploy to also tag the microfrontends
  • Loading branch information
acoard-aot authored Aug 15, 2023
1 parent b4cb0bc commit 9245ed8
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 33 deletions.
16 changes: 2 additions & 14 deletions .github/workflows/cd-forms-flow-web-root-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ on:
- dev
- main
- epdds-270 # Remove in future, just to verify this works
- epdds-270-fix # Remove in future, just to verify this works
paths:
- "forms-flow-ai/forms-flow-ai-ee/forms-flow-web-root-config"
- ".github/workflows/cd-forms-flow-web-root-config.yaml"
Expand Down Expand Up @@ -64,20 +65,7 @@ jobs:
run: |
oc project ${{ secrets.OC_NAMESPACE_NAMEPLATE }}-tools
# Build from either dev or main branch as appropriate
- name: Build from ${{ env.BRANCH_NAME }} branch
shell: bash
run: |
oc patch bc/${{ env.APP_NAME }}-dev-build -p '{"spec":{"source":{"git":{"ref":"${{ env.BRANCH_NAME }}"}}}}'
- name: Start Build Openshift
shell: bash
run: |
oc start-build ${{ env.APP_NAME }}-dev-build --wait
- name: Tag+Deploy for ${{ env.TAG_NAME }}
shell: bash
run: |
oc tag ${{ env.APP_NAME }}:latest ${{ env.APP_NAME }}:${{ env.TAG_NAME }}
oc start-build ${{ env.APP_NAME }}-${{ env.TAG_NAME }}-build --wait
42 changes: 42 additions & 0 deletions .github/workflows/cd-openshift-prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -111,3 +111,45 @@ jobs:
# with:
# tag: "release/${{ inputs.RELEASE_VERSION }}"
# message: "Release version ${{ inputs.RELEASE_VERSION }}"


forms-flow-root-config-and-microfrontends:
runs-on: ubuntu-20.04

if: github.repository == 'bcgov/nr-epd-digital-services'
steps:
- uses: actions/checkout@v2
- name: Set ENV variables
id: set-variable
# make sure to update the TOOLS_NAME once all the environment for forms-flow-ai-web is ready
run: |
echo "For ${{ github.ref_name }} branch for PROD"
echo "TOOLS_NAME=${{secrets.OC_NAMESPACE_NAMEPLATE}}" >> $GITHUB_ENV
echo "TAG_NAME="prod"" >> $GITHUB_ENV
echo "BRANCH_NAME="main"" >> $GITHUB_ENV
echo "ENV_NAME="prod"" >> $GITHUB_ENV
shell: bash

- name: Login Openshift
shell: bash
run: |
oc login --server=${{secrets.OC_SERVER}} --token=${{secrets.OC_TOKEN}}
- name: Tools project
shell: bash
run: |
oc project ${{ secrets.OC_NAMESPACE_NAMEPLATE }}-tools
- name: Tag Microfrontends from Test
shell: bash
run: |
oc tag forms-flow-nav:test forms-flow-nav:prod
oc tag forms-flow-theme:test forms-flow-theme:prod
oc tag forms-flow-web-ee:test forms-flow-web-ee:prod
- name: Start Build Openshift
shell: bash
run: |
oc start-build ${{ env.APP_NAME }}-prod-build --wait
Original file line number Diff line number Diff line change
Expand Up @@ -46,36 +46,30 @@ objects:
secretKeyRef:
name: ff-ee-deploy-key-pub
key: ssh-privatekey

# ARC: TODO IN URLS USE ${ENV_TAG}
- name: MF_FORMSFLOW_WEB_URL
value: "https://forms-flow-web-ee-latest.apps.silver.devops.gov.bc.ca/forms-flow-web.js"
value: "https://forms-flow-web-ee-${ENV_TAG}.apps.silver.devops.gov.bc.ca/forms-flow-web.js"
- name: MF_FORMSFLOW_SERVICE_URL
value: "https://forms-flow-microfrontends.aot-technologies.com/[email protected]/forms-flow-service.gz.js"
- name: MF_FORMSFLOW_ADMIN_URL
value: "https://forms-flow-microfrontends.aot-technologies.com/[email protected]/forms-flow-admin.gz.js"
- name: MF_FORMSFLOW_NAV_URL
value: "https://forms-flow-nav-dev.apps.silver.devops.gov.bc.ca/forms-flow-nav.js"
value: "https://forms-flow-nav-${ENV_TAG}.apps.silver.devops.gov.bc.ca/forms-flow-nav.js"
- name: MF_FORMSFLOW_THEME_URL
value: "https://forms-flow-theme-dev.apps.silver.devops.gov.bc.ca/forms-flow-theme.js"
value: "https://forms-flow-theme-${ENV_TAG}.apps.silver.devops.gov.bc.ca/forms-flow-theme.js"
- name: FORMIO_DEFAULT_PROJECT_URL
value: "https://forms-flow-forms-e38158-dev.apps.silver.devops.gov.bc.ca"
value: "https://forms-flow-forms-e38158-${ENV_TAG}.apps.silver.devops.gov.bc.ca"
- name: KEYCLOAK_URL
value: "https://epd-keycloak-dev.apps.silver.devops.gov.bc.ca"
value: "https://epd-keycloak-${ENV_TAG}.apps.silver.devops.gov.bc.ca"
- name: FORMSFLOW_API_URL
value: "https://forms-flow-api-e38158-dev.apps.silver.devops.gov.bc.ca"
value: "https://forms-flow-api-e38158-${ENV_TAG}.apps.silver.devops.gov.bc.ca"
- name: BPM_API_URL
value: "https://forms-flow-bpm-e38158-dev.apps.silver.devops.gov.bc.ca/camunda"
value: "https://forms-flow-bpm-e38158-${ENV_TAG}.apps.silver.devops.gov.bc.ca/camunda"
- name: APPLICATION_NAME
value: "formsflow.ai"
- name: ENABLE_APPLICATION_ACCESS_PERMISSION_CHECK
value: "false"
- name: CUSTOM_SUBMISSION_URL
value: "TODO"
- name: CUSTOM_SUBMISSION_ENABLED
value: "false"
- name: EPD_IDP_LOGOUT_URL
value: "https://logontest7.gov.bc.ca/clp-cgi/logoff.cgi?retnow=1&returl=https://epd-keycloak-dev.apps.silver.devops.gov.bc.ca/auth/realms/forms-flow-ai/protocol/openid-connect/logout?post_logout_redirect_uri=https://epd-frontend-dev.apps.silver.devops.gov.bc.ca/"
value: "EPD"
- name: EPD_CUSTOM_MAP_URL
value: "https://epd-frontend-dev.apps.silver.devops.gov.bc.ca/map"
value: "https://epd-frontend-${ENV_TAG}.apps.silver.devops.gov.bc.ca/map"
output:
to:
kind: ImageStreamTag
Expand All @@ -90,7 +84,7 @@ parameters:
displayName: Environment name
description: The name of the environment, in build names and image stream tags
required: true
value: dev
value: prod
- name: GIT_REPO_URL
displayName: Git Repo URL
description: The URL to your GIT repo.
Expand All @@ -100,7 +94,7 @@ parameters:
displayName: Git Reference
description: The git reference or branch.
required: true
value: dev
value: main
- name: SOURCE_CONTEXT_DIR
displayName: Source Context Directory
description: The source context directory.
Expand Down

0 comments on commit 9245ed8

Please sign in to comment.