Skip to content

Commit 2a21e2b

Browse files
sakthi-aotRyanBirtch-aotmidhun-aotnikhila-aotacoard-aot
authored
PR to merge dev to main- Test deployment (#430)
* 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 <ryan.birtch@aot-technologies.com> Co-authored-by: midhun-aot <midhun.murali@aot-technologies.com> Co-authored-by: nikhila-aot <38471389+nikhila-aot@users.noreply.github.com> Co-authored-by: Adam Coard <adam.coard@aot-technologies.com> Co-authored-by: nikhila-aot <nikhila.pankaj@aot-technologies.com> Co-authored-by: midhun-aot <105463561+midhun-aot@users.noreply.github.com> Co-authored-by: acoard-aot <61285798+acoard-aot@users.noreply.github.com>
1 parent 6a1e152 commit 2a21e2b

82 files changed

Lines changed: 1297 additions & 181 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
name: forms-flow-web Custom
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
START_BUILD:
7+
required: true
8+
type: boolean
9+
description: This value is ignored, just to trigger dispatch.
10+
push:
11+
branches:
12+
- dev
13+
- main
14+
- epdds-270 # Remove in future, just to verify this works
15+
paths:
16+
- "forms-flow-ai/forms-flow-ai-micro-front-ends/forms-flow-nav"
17+
- ".github/workflows/cd-forms-flow-nav.yaml"
18+
19+
defaults:
20+
run:
21+
shell: bash
22+
working-directory: ./forms-flow-ai/forms-flow-ai-micro-front-ends/forms-flow-nav
23+
env:
24+
APP_NAME: "forms-flow-nav"
25+
26+
jobs:
27+
forms-flow-ai-nav-cd-by-push:
28+
runs-on: ubuntu-20.04
29+
30+
if: github.repository == 'bcgov/nr-epd-digital-services'
31+
steps:
32+
- uses: actions/checkout@v2
33+
- name: Set ENV variables
34+
id: set-variable
35+
# make sure to update the TOOLS_NAME once all the environment for forms-flow-ai-web is ready
36+
run: |
37+
if [ '${{ github.ref_name }}' == 'dev' ]; then
38+
echo "For ${{ github.ref_name }} branch"
39+
echo "TOOLS_NAME=${{secrets.OC_NAMESPACE_NAMEPLATE}}" >> $GITHUB_ENV
40+
echo "TAG_NAME="dev"" >> $GITHUB_ENV
41+
echo "BRANCH_NAME="dev"" >> $GITHUB_ENV
42+
echo "ENV_NAME="dev"" >> $GITHUB_ENV
43+
elif [ '${{ github.ref_name }}' == 'main' ]; then
44+
echo "For ${{ github.ref_name }} branch"
45+
echo "TOOLS_NAME=${{secrets.OC_NAMESPACE_NAMEPLATE}}" >> $GITHUB_ENV
46+
echo "TAG_NAME="test"" >> $GITHUB_ENV
47+
echo "BRANCH_NAME="main"" >> $GITHUB_ENV
48+
echo "ENV_NAME="test"" >> $GITHUB_ENV
49+
else
50+
echo "For ${{ github.ref_name }} branch, defaulting to dev values"
51+
echo "TOOLS_NAME=${{secrets.OC_NAMESPACE_NAMEPLATE}}" >> $GITHUB_ENV
52+
echo "TAG_NAME="dev"" >> $GITHUB_ENV
53+
echo "BRANCH_NAME="dev"" >> $GITHUB_ENV
54+
fi
55+
shell: bash
56+
57+
- name: Login Openshift
58+
shell: bash
59+
run: |
60+
oc login --server=${{secrets.OC_SERVER}} --token=${{secrets.OC_TOKEN}}
61+
62+
- name: Tools project
63+
shell: bash
64+
run: |
65+
oc project ${{ secrets.OC_NAMESPACE_NAMEPLATE }}-tools
66+
67+
# Build from either dev or main branch as appropriate
68+
- name: Build from ${{ env.BRANCH_NAME }} branch
69+
shell: bash
70+
run: |
71+
oc patch bc/${{ env.APP_NAME }}-build -p '{"spec":{"source":{"git":{"ref":"${{ env.BRANCH_NAME }}"}}}}'
72+
73+
- name: Start Build Openshift
74+
shell: bash
75+
run: |
76+
oc start-build ${{ env.APP_NAME }}-build --wait
77+
78+
- name: Tag+Deploy for ${{ env.TAG_NAME }}
79+
shell: bash
80+
run: |
81+
oc tag ${{ env.APP_NAME }}:latest ${{ env.APP_NAME }}:${{ env.TAG_NAME }}
82+
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
name: forms-flow-web Custom
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
START_BUILD:
7+
required: true
8+
type: boolean
9+
description: This value is ignored, just to trigger dispatch.
10+
push:
11+
branches:
12+
- dev
13+
- main
14+
- epdds-270 # Remove in future, just to verify this works
15+
paths:
16+
- "forms-flow-ai/forms-flow-ai-micro-front-ends/forms-flow-theme"
17+
- ".github/workflows/cd-forms-flow-theme.yaml"
18+
19+
defaults:
20+
run:
21+
shell: bash
22+
working-directory: ./forms-flow-ai/forms-flow-ai-micro-front-ends/forms-flow-theme
23+
env:
24+
APP_NAME: "forms-flow-theme"
25+
26+
jobs:
27+
forms-flow-ai-theme-cd-by-push:
28+
runs-on: ubuntu-20.04
29+
30+
if: github.repository == 'bcgov/nr-epd-digital-services'
31+
steps:
32+
- uses: actions/checkout@v2
33+
- name: Set ENV variables
34+
id: set-variable
35+
# make sure to update the TOOLS_NAME once all the environment for forms-flow-ai-web is ready
36+
run: |
37+
if [ '${{ github.ref_name }}' == 'dev' ]; then
38+
echo "For ${{ github.ref_name }} branch"
39+
echo "TOOLS_NAME=${{secrets.OC_NAMESPACE_NAMEPLATE}}" >> $GITHUB_ENV
40+
echo "TAG_NAME="dev"" >> $GITHUB_ENV
41+
echo "BRANCH_NAME="dev"" >> $GITHUB_ENV
42+
echo "ENV_NAME="dev"" >> $GITHUB_ENV
43+
elif [ '${{ github.ref_name }}' == 'main' ]; then
44+
echo "For ${{ github.ref_name }} branch"
45+
echo "TOOLS_NAME=${{secrets.OC_NAMESPACE_NAMEPLATE}}" >> $GITHUB_ENV
46+
echo "TAG_NAME="test"" >> $GITHUB_ENV
47+
echo "BRANCH_NAME="main"" >> $GITHUB_ENV
48+
echo "ENV_NAME="test"" >> $GITHUB_ENV
49+
else
50+
echo "For ${{ github.ref_name }} branch, defaulting to dev values"
51+
echo "TOOLS_NAME=${{secrets.OC_NAMESPACE_NAMEPLATE}}" >> $GITHUB_ENV
52+
echo "TAG_NAME="dev"" >> $GITHUB_ENV
53+
echo "BRANCH_NAME="dev"" >> $GITHUB_ENV
54+
fi
55+
shell: bash
56+
57+
- name: Login Openshift
58+
shell: bash
59+
run: |
60+
oc login --server=${{secrets.OC_SERVER}} --token=${{secrets.OC_TOKEN}}
61+
62+
- name: Tools project
63+
shell: bash
64+
run: |
65+
oc project ${{ secrets.OC_NAMESPACE_NAMEPLATE }}-tools
66+
67+
# Build from either dev or main branch as appropriate
68+
- name: Build from ${{ env.BRANCH_NAME }} branch
69+
shell: bash
70+
run: |
71+
oc patch bc/${{ env.APP_NAME }}-build -p '{"spec":{"source":{"git":{"ref":"${{ env.BRANCH_NAME }}"}}}}'
72+
73+
- name: Start Build Openshift
74+
shell: bash
75+
run: |
76+
oc start-build ${{ env.APP_NAME }}-build --wait
77+
78+
79+
- name: Tag+Deploy for ${{ env.TAG_NAME }}
80+
shell: bash
81+
run: |
82+
oc tag ${{ env.APP_NAME }}:latest ${{ env.APP_NAME }}:${{ env.TAG_NAME }}
83+
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
name: forms-flow-web Custom
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
START_BUILD:
7+
required: true
8+
type: boolean
9+
description: This value is ignored, just to trigger dispatch.
10+
push:
11+
branches:
12+
- dev
13+
- main
14+
- epdds-270 # Remove in future, just to verify this works
15+
paths:
16+
- "forms-flow-ai/forms-flow-ai-ee/forms-flow-web"
17+
- ".github/workflows/cd-forms-flow-web-ee.yaml"
18+
19+
defaults:
20+
run:
21+
shell: bash
22+
working-directory: ./forms-flow-ai/forms-flow-ai-ee/forms-flow-web
23+
env:
24+
APP_NAME: "forms-flow-web-ee"
25+
26+
jobs:
27+
forms-flow-ai-web-ee-cd-by-push:
28+
runs-on: ubuntu-20.04
29+
30+
if: github.repository == 'bcgov/nr-epd-digital-services'
31+
steps:
32+
- uses: actions/checkout@v2
33+
- name: Set ENV variables
34+
id: set-variable
35+
# make sure to update the TOOLS_NAME once all the environment for forms-flow-ai-web is ready
36+
run: |
37+
if [ '${{ github.ref_name }}' == 'dev' ]; then
38+
echo "For ${{ github.ref_name }} branch"
39+
echo "TOOLS_NAME=${{secrets.OC_NAMESPACE_NAMEPLATE}}" >> $GITHUB_ENV
40+
echo "TAG_NAME="dev"" >> $GITHUB_ENV
41+
echo "BRANCH_NAME="dev"" >> $GITHUB_ENV
42+
echo "ENV_NAME="dev"" >> $GITHUB_ENV
43+
elif [ '${{ github.ref_name }}' == 'main' ]; then
44+
echo "For ${{ github.ref_name }} branch"
45+
echo "TOOLS_NAME=${{secrets.OC_NAMESPACE_NAMEPLATE}}" >> $GITHUB_ENV
46+
echo "TAG_NAME="test"" >> $GITHUB_ENV
47+
echo "BRANCH_NAME="main"" >> $GITHUB_ENV
48+
echo "ENV_NAME="test"" >> $GITHUB_ENV
49+
else
50+
echo "For ${{ github.ref_name }} branch, defaulting to dev values"
51+
echo "TOOLS_NAME=${{secrets.OC_NAMESPACE_NAMEPLATE}}" >> $GITHUB_ENV
52+
echo "TAG_NAME="dev"" >> $GITHUB_ENV
53+
echo "BRANCH_NAME="dev"" >> $GITHUB_ENV
54+
fi
55+
shell: bash
56+
57+
- name: Login Openshift
58+
shell: bash
59+
run: |
60+
oc login --server=${{secrets.OC_SERVER}} --token=${{secrets.OC_TOKEN}}
61+
62+
- name: Tools project
63+
shell: bash
64+
run: |
65+
oc project ${{ secrets.OC_NAMESPACE_NAMEPLATE }}-tools
66+
67+
# Build from either dev or main branch as appropriate
68+
- name: Build from ${{ env.BRANCH_NAME }} branch
69+
shell: bash
70+
run: |
71+
oc patch bc/${{ env.APP_NAME }}-build -p '{"spec":{"source":{"git":{"ref":"${{ env.BRANCH_NAME }}"}}}}'
72+
73+
- name: Start Build Openshift
74+
shell: bash
75+
run: |
76+
oc start-build ${{ env.APP_NAME }}-build --wait
77+
78+
79+
- name: Tag+Deploy for ${{ env.TAG_NAME }}
80+
shell: bash
81+
run: |
82+
oc tag ${{ env.APP_NAME }}:latest ${{ env.APP_NAME }}:${{ env.TAG_NAME }}
83+
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
name: forms-flow-web Custom
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
START_BUILD:
7+
required: true
8+
type: boolean
9+
description: This value is ignored, just to trigger dispatch.
10+
push:
11+
branches:
12+
- dev
13+
- main
14+
- epdds-270 # Remove in future, just to verify this works
15+
paths:
16+
- "forms-flow-ai/forms-flow-ai-ee/forms-flow-web-root-config"
17+
- ".github/workflows/cd-forms-flow-web-root-config.yaml"
18+
19+
defaults:
20+
run:
21+
shell: bash
22+
working-directory: ./forms-flow-ai/forms-flow-ai-ee/forms-flow-web-root-config
23+
env:
24+
APP_NAME: "forms-flow-web-root-config"
25+
26+
jobs:
27+
forms-flow-ai-web-root-config-cd-by-push:
28+
runs-on: ubuntu-20.04
29+
30+
if: github.repository == 'bcgov/nr-epd-digital-services'
31+
steps:
32+
- uses: actions/checkout@v2
33+
- name: Set ENV variables
34+
id: set-variable
35+
# make sure to update the TOOLS_NAME once all the environment for forms-flow-ai-web is ready
36+
run: |
37+
if [ '${{ github.ref_name }}' == 'dev' ]; then
38+
echo "For ${{ github.ref_name }} branch"
39+
echo "TOOLS_NAME=${{secrets.OC_NAMESPACE_NAMEPLATE}}" >> $GITHUB_ENV
40+
echo "TAG_NAME="dev"" >> $GITHUB_ENV
41+
echo "BRANCH_NAME="dev"" >> $GITHUB_ENV
42+
echo "ENV_NAME="dev"" >> $GITHUB_ENV
43+
elif [ '${{ github.ref_name }}' == 'main' ]; then
44+
echo "For ${{ github.ref_name }} branch"
45+
echo "TOOLS_NAME=${{secrets.OC_NAMESPACE_NAMEPLATE}}" >> $GITHUB_ENV
46+
echo "TAG_NAME="test"" >> $GITHUB_ENV
47+
echo "BRANCH_NAME="main"" >> $GITHUB_ENV
48+
echo "ENV_NAME="test"" >> $GITHUB_ENV
49+
else
50+
echo "For ${{ github.ref_name }} branch, defaulting to dev values"
51+
echo "TOOLS_NAME=${{secrets.OC_NAMESPACE_NAMEPLATE}}" >> $GITHUB_ENV
52+
echo "TAG_NAME="dev"" >> $GITHUB_ENV
53+
echo "BRANCH_NAME="dev"" >> $GITHUB_ENV
54+
fi
55+
shell: bash
56+
57+
- name: Login Openshift
58+
shell: bash
59+
run: |
60+
oc login --server=${{secrets.OC_SERVER}} --token=${{secrets.OC_TOKEN}}
61+
62+
- name: Tools project
63+
shell: bash
64+
run: |
65+
oc project ${{ secrets.OC_NAMESPACE_NAMEPLATE }}-tools
66+
67+
# Build from either dev or main branch as appropriate
68+
- name: Build from ${{ env.BRANCH_NAME }} branch
69+
shell: bash
70+
run: |
71+
oc patch bc/${{ env.APP_NAME }}-dev-build -p '{"spec":{"source":{"git":{"ref":"${{ env.BRANCH_NAME }}"}}}}'
72+
73+
- name: Start Build Openshift
74+
shell: bash
75+
run: |
76+
oc start-build ${{ env.APP_NAME }}-dev-build --wait
77+
78+
79+
- name: Tag+Deploy for ${{ env.TAG_NAME }}
80+
shell: bash
81+
run: |
82+
oc tag ${{ env.APP_NAME }}:latest ${{ env.APP_NAME }}:${{ env.TAG_NAME }}
83+

forms-flow-ai/epd-forms/Contaminated Sites Services Application Form.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

forms-flow-ai/epd-forms/Site Disclosure Statements.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

forms-flow-ai/epd-forms/Site Risk Classification Report.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

forms-flow-ai/epd-forms/bundling/Contaminated Sites Services Application Form.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

forms-flow-ai/epd-forms/bundling/Site Risk Classification Report.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

forms-flow-ai/forms-flow-ai-ee/forms-flow-web/src/components/PrivateRoute.jsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,13 @@ const PrivateRoute = React.memo((props) => {
230230
{isAuth ? (
231231
<Suspense fallback={<Loading />}>
232232
<Switch>
233-
{ENABLE_FORMS_MODULE && (
233+
{ENABLE_FORMS_MODULE && userRoles.includes(CLIENT_REVIEWER) && (
234+
<Route
235+
path={[`${BASE_ROUTE}form`, `${BASE_ROUTE}bundle`]}
236+
component={Form}
237+
/>
238+
)}
239+
{ENABLE_FORMS_MODULE && !userRoles.includes(STAFF_REVIEWER) && (
234240
<Route
235241
path={[`${BASE_ROUTE}form`, `${BASE_ROUTE}bundle`]}
236242
component={Form}

0 commit comments

Comments
 (0)