Skip to content

Commit

Permalink
PR to merge dev to main- Test deployment (#430)
Browse files Browse the repository at this point in the history
* Added disclosure in CSSA, and collection notice in CSSA and SRCR

* hide forms for reviewre

* Made changes to non bundled forms

* Further changes to homepage after discussion with Haley

* Update ff changes to dev-5.2.0 (#407)

* test imagetsream

* update the formsflow-ai-charts folder with 5.2.0v

* commiting new ff changes

* merge comments resolved

* removing the secrets

* removing the secrets

* removing code owners

* deleting the file

* added a javascript login to handle approving authority validations

* corrected format

* changes to support form adapter

* updated name for SDS form

* updated name & path for sds form

* GitHub Actions for nav/theme/web-ee/root-config

* updating notes column width

* Added hiding logic for signature field

* Configure CI/CD scripts to trigger on temp dev branch to experiment

* Update CI scripts to trigger build on the script change

* Update namespace env name to use existing secret

* Fix secret -> secrets typo

* Update env setter for non-dev branch during active development

* fixed site owner actons and notes section displayed for new forms

* Fix env var for nav/theme/ee for non dev branch

* Matched names

---------

Co-authored-by: RyanBirtch-aot <[email protected]>
Co-authored-by: midhun-aot <[email protected]>
Co-authored-by: nikhila-aot <[email protected]>
Co-authored-by: Adam Coard <[email protected]>
Co-authored-by: nikhila-aot <[email protected]>
Co-authored-by: midhun-aot <[email protected]>
Co-authored-by: acoard-aot <[email protected]>
  • Loading branch information
8 people authored Aug 3, 2023
1 parent 6a1e152 commit 2a21e2b
Show file tree
Hide file tree
Showing 82 changed files with 1,297 additions and 181 deletions.
82 changes: 82 additions & 0 deletions .github/workflows/cd-forms-flow-nav.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
name: forms-flow-web Custom

on:
workflow_dispatch:
inputs:
START_BUILD:
required: true
type: boolean
description: This value is ignored, just to trigger dispatch.
push:
branches:
- dev
- main
- epdds-270 # Remove in future, just to verify this works
paths:
- "forms-flow-ai/forms-flow-ai-micro-front-ends/forms-flow-nav"
- ".github/workflows/cd-forms-flow-nav.yaml"

defaults:
run:
shell: bash
working-directory: ./forms-flow-ai/forms-flow-ai-micro-front-ends/forms-flow-nav
env:
APP_NAME: "forms-flow-nav"

jobs:
forms-flow-ai-nav-cd-by-push:
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: |
if [ '${{ github.ref_name }}' == 'dev' ]; then
echo "For ${{ github.ref_name }} branch"
echo "TOOLS_NAME=${{secrets.OC_NAMESPACE_NAMEPLATE}}" >> $GITHUB_ENV
echo "TAG_NAME="dev"" >> $GITHUB_ENV
echo "BRANCH_NAME="dev"" >> $GITHUB_ENV
echo "ENV_NAME="dev"" >> $GITHUB_ENV
elif [ '${{ github.ref_name }}' == 'main' ]; then
echo "For ${{ github.ref_name }} branch"
echo "TOOLS_NAME=${{secrets.OC_NAMESPACE_NAMEPLATE}}" >> $GITHUB_ENV
echo "TAG_NAME="test"" >> $GITHUB_ENV
echo "BRANCH_NAME="main"" >> $GITHUB_ENV
echo "ENV_NAME="test"" >> $GITHUB_ENV
else
echo "For ${{ github.ref_name }} branch, defaulting to dev values"
echo "TOOLS_NAME=${{secrets.OC_NAMESPACE_NAMEPLATE}}" >> $GITHUB_ENV
echo "TAG_NAME="dev"" >> $GITHUB_ENV
echo "BRANCH_NAME="dev"" >> $GITHUB_ENV
fi
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
# 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 }}-build -p '{"spec":{"source":{"git":{"ref":"${{ env.BRANCH_NAME }}"}}}}'
- name: Start Build Openshift
shell: bash
run: |
oc start-build ${{ env.APP_NAME }}-build --wait
- name: Tag+Deploy for ${{ env.TAG_NAME }}
shell: bash
run: |
oc tag ${{ env.APP_NAME }}:latest ${{ env.APP_NAME }}:${{ env.TAG_NAME }}
83 changes: 83 additions & 0 deletions .github/workflows/cd-forms-flow-theme.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
name: forms-flow-web Custom

on:
workflow_dispatch:
inputs:
START_BUILD:
required: true
type: boolean
description: This value is ignored, just to trigger dispatch.
push:
branches:
- dev
- main
- epdds-270 # Remove in future, just to verify this works
paths:
- "forms-flow-ai/forms-flow-ai-micro-front-ends/forms-flow-theme"
- ".github/workflows/cd-forms-flow-theme.yaml"

defaults:
run:
shell: bash
working-directory: ./forms-flow-ai/forms-flow-ai-micro-front-ends/forms-flow-theme
env:
APP_NAME: "forms-flow-theme"

jobs:
forms-flow-ai-theme-cd-by-push:
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: |
if [ '${{ github.ref_name }}' == 'dev' ]; then
echo "For ${{ github.ref_name }} branch"
echo "TOOLS_NAME=${{secrets.OC_NAMESPACE_NAMEPLATE}}" >> $GITHUB_ENV
echo "TAG_NAME="dev"" >> $GITHUB_ENV
echo "BRANCH_NAME="dev"" >> $GITHUB_ENV
echo "ENV_NAME="dev"" >> $GITHUB_ENV
elif [ '${{ github.ref_name }}' == 'main' ]; then
echo "For ${{ github.ref_name }} branch"
echo "TOOLS_NAME=${{secrets.OC_NAMESPACE_NAMEPLATE}}" >> $GITHUB_ENV
echo "TAG_NAME="test"" >> $GITHUB_ENV
echo "BRANCH_NAME="main"" >> $GITHUB_ENV
echo "ENV_NAME="test"" >> $GITHUB_ENV
else
echo "For ${{ github.ref_name }} branch, defaulting to dev values"
echo "TOOLS_NAME=${{secrets.OC_NAMESPACE_NAMEPLATE}}" >> $GITHUB_ENV
echo "TAG_NAME="dev"" >> $GITHUB_ENV
echo "BRANCH_NAME="dev"" >> $GITHUB_ENV
fi
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
# 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 }}-build -p '{"spec":{"source":{"git":{"ref":"${{ env.BRANCH_NAME }}"}}}}'
- name: Start Build Openshift
shell: bash
run: |
oc start-build ${{ env.APP_NAME }}-build --wait
- name: Tag+Deploy for ${{ env.TAG_NAME }}
shell: bash
run: |
oc tag ${{ env.APP_NAME }}:latest ${{ env.APP_NAME }}:${{ env.TAG_NAME }}
83 changes: 83 additions & 0 deletions .github/workflows/cd-forms-flow-web-ee.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
name: forms-flow-web Custom

on:
workflow_dispatch:
inputs:
START_BUILD:
required: true
type: boolean
description: This value is ignored, just to trigger dispatch.
push:
branches:
- dev
- main
- epdds-270 # Remove in future, just to verify this works
paths:
- "forms-flow-ai/forms-flow-ai-ee/forms-flow-web"
- ".github/workflows/cd-forms-flow-web-ee.yaml"

defaults:
run:
shell: bash
working-directory: ./forms-flow-ai/forms-flow-ai-ee/forms-flow-web
env:
APP_NAME: "forms-flow-web-ee"

jobs:
forms-flow-ai-web-ee-cd-by-push:
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: |
if [ '${{ github.ref_name }}' == 'dev' ]; then
echo "For ${{ github.ref_name }} branch"
echo "TOOLS_NAME=${{secrets.OC_NAMESPACE_NAMEPLATE}}" >> $GITHUB_ENV
echo "TAG_NAME="dev"" >> $GITHUB_ENV
echo "BRANCH_NAME="dev"" >> $GITHUB_ENV
echo "ENV_NAME="dev"" >> $GITHUB_ENV
elif [ '${{ github.ref_name }}' == 'main' ]; then
echo "For ${{ github.ref_name }} branch"
echo "TOOLS_NAME=${{secrets.OC_NAMESPACE_NAMEPLATE}}" >> $GITHUB_ENV
echo "TAG_NAME="test"" >> $GITHUB_ENV
echo "BRANCH_NAME="main"" >> $GITHUB_ENV
echo "ENV_NAME="test"" >> $GITHUB_ENV
else
echo "For ${{ github.ref_name }} branch, defaulting to dev values"
echo "TOOLS_NAME=${{secrets.OC_NAMESPACE_NAMEPLATE}}" >> $GITHUB_ENV
echo "TAG_NAME="dev"" >> $GITHUB_ENV
echo "BRANCH_NAME="dev"" >> $GITHUB_ENV
fi
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
# 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 }}-build -p '{"spec":{"source":{"git":{"ref":"${{ env.BRANCH_NAME }}"}}}}'
- name: Start Build Openshift
shell: bash
run: |
oc start-build ${{ env.APP_NAME }}-build --wait
- name: Tag+Deploy for ${{ env.TAG_NAME }}
shell: bash
run: |
oc tag ${{ env.APP_NAME }}:latest ${{ env.APP_NAME }}:${{ env.TAG_NAME }}
83 changes: 83 additions & 0 deletions .github/workflows/cd-forms-flow-web-root-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
name: forms-flow-web Custom

on:
workflow_dispatch:
inputs:
START_BUILD:
required: true
type: boolean
description: This value is ignored, just to trigger dispatch.
push:
branches:
- dev
- main
- epdds-270 # 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"

defaults:
run:
shell: bash
working-directory: ./forms-flow-ai/forms-flow-ai-ee/forms-flow-web-root-config
env:
APP_NAME: "forms-flow-web-root-config"

jobs:
forms-flow-ai-web-root-config-cd-by-push:
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: |
if [ '${{ github.ref_name }}' == 'dev' ]; then
echo "For ${{ github.ref_name }} branch"
echo "TOOLS_NAME=${{secrets.OC_NAMESPACE_NAMEPLATE}}" >> $GITHUB_ENV
echo "TAG_NAME="dev"" >> $GITHUB_ENV
echo "BRANCH_NAME="dev"" >> $GITHUB_ENV
echo "ENV_NAME="dev"" >> $GITHUB_ENV
elif [ '${{ github.ref_name }}' == 'main' ]; then
echo "For ${{ github.ref_name }} branch"
echo "TOOLS_NAME=${{secrets.OC_NAMESPACE_NAMEPLATE}}" >> $GITHUB_ENV
echo "TAG_NAME="test"" >> $GITHUB_ENV
echo "BRANCH_NAME="main"" >> $GITHUB_ENV
echo "ENV_NAME="test"" >> $GITHUB_ENV
else
echo "For ${{ github.ref_name }} branch, defaulting to dev values"
echo "TOOLS_NAME=${{secrets.OC_NAMESPACE_NAMEPLATE}}" >> $GITHUB_ENV
echo "TAG_NAME="dev"" >> $GITHUB_ENV
echo "BRANCH_NAME="dev"" >> $GITHUB_ENV
fi
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
# 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 }}

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion forms-flow-ai/epd-forms/Site Disclosure Statements.json

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,13 @@ const PrivateRoute = React.memo((props) => {
{isAuth ? (
<Suspense fallback={<Loading />}>
<Switch>
{ENABLE_FORMS_MODULE && (
{ENABLE_FORMS_MODULE && userRoles.includes(CLIENT_REVIEWER) && (
<Route
path={[`${BASE_ROUTE}form`, `${BASE_ROUTE}bundle`]}
component={Form}
/>
)}
{ENABLE_FORMS_MODULE && !userRoles.includes(STAFF_REVIEWER) && (
<Route
path={[`${BASE_ROUTE}form`, `${BASE_ROUTE}bundle`]}
component={Form}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ const NavBar = React.memo(({ props }) => {
id="main-menu-nav"
className="active align-items-lg-center"
>
{ENABLE_FORMS_MODULE && (
{(getUserRolePermission(userRoles, CLIENT_REVIEWER) || !getUserRolePermission(userRoles, STAFF_REVIEWER)) ? ENABLE_FORMS_MODULE && (
<Nav.Link
as={Link}
to={`${baseUrl}form`}
Expand All @@ -205,7 +205,7 @@ const NavBar = React.memo(({ props }) => {
<i className="fa fa-wpforms fa-fw fa-lg mr-2" />
{t("Forms")}
</Nav.Link>
)}
):null}

{getUserRolePermission(userRoles, ADMIN_ROLE) ? (
<Nav.Link
Expand Down
6 changes: 1 addition & 5 deletions frontend/src/app/features/landing/Landing.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,7 @@ const Landing = () =>{
<li>Site Risk Classification Report</li>
</ul>

<p>These, as well as all other forms can be completed using the Site Remediation Forms</p>

<p>Site remediation forms - Province of British Columbia</p>

<p>Forms for site remediation procedures for land, air and water in B.C.</p>
<p>These, as well as all other forms can be completed using the <a href="https://www2.gov.bc.ca/gov/content/environment/air-land-water/site-remediation/guidance-resources/forms">Site Remediation Forms</a></p>
</Col>


Expand Down
Loading

0 comments on commit 2a21e2b

Please sign in to comment.