Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: oracle legacy database #1087

Merged
merged 150 commits into from
Aug 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
150 commits
Select commit Hold shift + click to select a range
7f619e0
Steal Paulo's work for this PR
DerekRoberts Jun 18, 2024
c2b2442
Drop ImageStream and PROMOTE param
DerekRoberts Jun 18, 2024
0af3c9e
Replace DeploymentConfig with Deployment
DerekRoberts Jun 18, 2024
e40c60e
Restore deployment strategy - recreate
DerekRoberts Jun 18, 2024
d88bbcf
Use local Dockerfile and non-root user for Compose
DerekRoberts Jun 18, 2024
e8542c2
Merge branch 'main' into feat/ci/legacydb
mamartinezmejia Jun 25, 2024
22b5071
chore(deps:Snyk): Upgrade aws-amplify from 6.3.3 to 6.3.5 (#1020)
bcgov-devops Jun 27, 2024
f7405de
chore(deps:Snyk): Upgrade sass from 1.77.1 to 1.77.4 (#1024)
bcgov-devops Jun 27, 2024
d8059c3
chore(deps:Snyk): Upgrade cypress from 13.8.1 to 13.11.0 (#1023)
bcgov-devops Jun 27, 2024
4206a3d
feat(be:FSADT1-1324): Changes in email templates (#1025)
mamartinezmejia Jun 28, 2024
a0ffa86
feat(be:FSADT1-1324): Changes in email templates (#1026)
mamartinezmejia Jun 28, 2024
2adaacd
feat(FSADT1-1365): backend fuzzy match for locations (#1013)
paulushcgcj Jun 29, 2024
d33118c
chore(deps:Snyk): Upgrade @carbon/icons-vue from 10.90.0 to 10.92.0 (…
bcgov-devops Jul 2, 2024
33f85f8
feat(FSADT1-1342): Display why and who rejected a submission (#1027)
mamartinezmejia Jul 3, 2024
ca4794e
feat(FSADT1-1364): backend fuzzy match for contacts (#1028)
paulushcgcj Jul 3, 2024
c80fd01
fix(fe:FSADT1-1406): Changed the logic when the good standing indicat…
mamartinezmejia Jul 4, 2024
8e0e9cf
feat(FSADT1-1356): Create client for staff Step 2 - Locations (#1029)
fterra-encora Jul 4, 2024
938628a
feat(fe:FSADT1-1382): Added code for the dashboard empty state (#1032)
mamartinezmejia Jul 4, 2024
57eff19
feat(FSADT1-1405): added feature flag config on deployment (#1031)
paulushcgcj Jul 4, 2024
3978a37
chore(deps:Snyk): Upgrade @carbon/styles from 1.57.0 to 1.59.0 (#1021)
bcgov-devops Jul 4, 2024
b955305
feat(fe:FSADT1-1382): Added code for the dashboard empty state (#1033)
mamartinezmejia Jul 4, 2024
66b0d4c
feat(FSADT1-1401): Create Textarea input component (#1034)
fterra-encora Jul 5, 2024
4aeac6a
feat: added user identification to logs (#1036)
paulushcgcj Jul 8, 2024
3750ed5
feat(FSADT1-1404): first nations api (#1035)
paulushcgcj Jul 8, 2024
2dcf3e1
fix(FSADT1-1382): limited empty state to loaded (#1037)
paulushcgcj Jul 9, 2024
a4156d6
chore(deps): update github actions all dependencies
renovate[bot] Jul 10, 2024
810d507
feat(FSADT1-1383): Load ID types from the backend API (#1038)
mamartinezmejia Jul 12, 2024
97e5aca
feat(FSADT1-1347): create client for staff Step 3 - Contacts (#1040)
paulushcgcj Jul 12, 2024
a983339
feat(FSADT1-1347): create client for staff Step 3 - Contacts (#1041)
mamartinezmejia Jul 12, 2024
f93661e
fix(fe): Aligned FE validation with BE validation as per agreement (#…
mamartinezmejia Jul 12, 2024
5415676
feat(FSADT1-1347): create client for staff Step 3 - Contacts (#1043)
mamartinezmejia Jul 15, 2024
4f2d440
feat(fe:FSADT1-1350): Create client for staff Step 4 - Review (#1044)
mamartinezmejia Jul 17, 2024
1b38752
feat(fe:FSADT1-1385): Create the "Client created" page for staff (#1045)
mamartinezmejia Jul 18, 2024
f10a446
feat(fe:FSADT1-1389): Create client for staff - no selection (#1046)
mamartinezmejia Jul 19, 2024
c3f1c4a
feat(FSADT1-1366): Process Staff Submission (#1047)
paulushcgcj Jul 22, 2024
d878946
feat(fe:FSADT1-1402): Create client for staff Step 1 - Individuals - …
mamartinezmejia Jul 23, 2024
16cac23
feat(FSADT1-1384): Submit data to create client by staff user (#1050)
paulushcgcj Jul 25, 2024
e0e2579
fix: small adjustments (#1051)
paulushcgcj Jul 26, 2024
5927ea7
fix(be): Removed logic from Legacy and placed it in the Processor (#1…
mamartinezmejia Jul 26, 2024
0f9a83c
fix(fe:FSADT1-1414): Left menu active status (#1053)
mamartinezmejia Jul 29, 2024
3d9a010
fix(be:FSADT1-1419): Client ID is not being saved (#1054)
mamartinezmejia Jul 30, 2024
0b6f382
fix: staff contact validation (#1055)
fterra-encora Jul 30, 2024
0151fb5
fix(fe:FSADT1-1423): Hide left menu when the user is at the confirmat…
mamartinezmejia Jul 30, 2024
feab586
fix(FSADT1-1422): added the missing middle name (#1058)
paulushcgcj Jul 30, 2024
b39b2af
fix(FSADT1-1425): fixed mapping issues for external (#1059)
paulushcgcj Jul 31, 2024
34eb3fb
feat: add fuzzy matching notification (#1060)
fterra-encora Aug 1, 2024
7065df5
fix: removing fuzzy match (#1063)
paulushcgcj Aug 6, 2024
764f3eb
fix(FSADT1-1428): fixed email not beint sent (#1064)
paulushcgcj Aug 6, 2024
f935f0c
fix(fe): Commenting this for now until the API for fuzzy match is don…
mamartinezmejia Aug 6, 2024
f905361
chore: removing validation (#1067)
paulushcgcj Aug 6, 2024
a5e3204
fix(FSADT1-1363): added missing headers for cors (#1068)
paulushcgcj Aug 6, 2024
981854b
fix(FSADT1-1426): fixed multi-address issue (#1061)
paulushcgcj Aug 7, 2024
7fc42a7
fix: fixing feature flag (#1069)
paulushcgcj Aug 7, 2024
505bea4
feat(FSADT1-1388): Create client for staff Step 1 - BC Registered Bus…
paulushcgcj Aug 7, 2024
cb3ed6f
feat(FSADT1-1397): Backend Fuzzy matching on Business Information for…
paulushcgcj Aug 7, 2024
08119a3
feat(FSADT1-1390): First Nation, Government, Ministry of Forests, and…
mamartinezmejia Aug 11, 2024
399e36a
feat(FSADT1-1399): Backend Fuzzy matching for Business Information fo…
paulushcgcj Aug 11, 2024
ca4fde9
fix(be:FSADT1-1430): Fix submission list filter (#1072)
mamartinezmejia Aug 12, 2024
db4c1ef
fix: fixing missing dto for native reflection (#1074)
paulushcgcj Aug 12, 2024
6f26a25
fix(fe): Added missing client types and made code reviews (#1075)
mamartinezmejia Aug 12, 2024
7003bd1
test: re-adding test files (#1076)
paulushcgcj Aug 12, 2024
db5f494
feat(FSADT1-1353): add Frontend Fuzzy matching on Business informatio…
fterra-encora Aug 13, 2024
f174f47
fix(FSADT1-1431): added security role for districts (#1077)
paulushcgcj Aug 13, 2024
e85cffd
fix(FSADT1-1415): reordering the client type for staff (#1078)
paulushcgcj Aug 13, 2024
9bf0f53
fix(FSADT1-1435): fixing bug when different countries are on list (#1…
paulushcgcj Aug 14, 2024
a9e23d1
feat(FSADT1-1429): Unregistered business client type is only viewed b…
mamartinezmejia Aug 14, 2024
7f15d9b
fix(be:FSADT1-1446): Wrong main address being persisted in Oracle (#1…
mamartinezmejia Aug 15, 2024
b138599
fix(fe): Added missing masks (#1083)
mamartinezmejia Aug 15, 2024
2d6221f
feat(FSADT1-1396|FSADT1-1398): added frontend fuzzy match for remaini…
paulushcgcj Aug 15, 2024
50d0baf
fix(be:FSADT1-1449): Fixed order of business search by name (#1084)
mamartinezmejia Aug 15, 2024
9a19a0c
feat: testing deploy of legacy db
paulushcgcj Aug 16, 2024
b79232f
Merge branch 'main' into feat/ci/legacydb
paulushcgcj Aug 16, 2024
53c4135
chore: updating legacy deployment
paulushcgcj Aug 16, 2024
20e6af2
chore: changing db to legacy oracle
paulushcgcj Aug 16, 2024
1aa1443
chore: removing volume
paulushcgcj Aug 16, 2024
744cb28
chore: changing permission of scripts
paulushcgcj Aug 16, 2024
ae3a1a2
chore: updating legacydb file
paulushcgcj Aug 16, 2024
ecf8951
chore: updated oracle user
paulushcgcj Aug 16, 2024
8dd3ddb
chore: updated image
paulushcgcj Aug 16, 2024
309302e
chore: run as
paulushcgcj Aug 16, 2024
04098f6
chore: image build
paulushcgcj Aug 16, 2024
26b73d5
chore: updating oracle
paulushcgcj Aug 16, 2024
7261d4b
chore: test
paulushcgcj Aug 16, 2024
f741319
chore: building legacy image
paulushcgcj Aug 17, 2024
87da5e2
chore: deploying os
paulushcgcj Aug 17, 2024
43b994f
chore: image update
paulushcgcj Aug 17, 2024
595d46b
feat: updated deployment for oracle legacy
paulushcgcj Aug 19, 2024
d826116
chore: changing deployment to tools env
paulushcgcj Aug 19, 2024
8d9da58
chore: token test
paulushcgcj Aug 19, 2024
59af17a
chore: moving to tools
paulushcgcj Aug 19, 2024
58b92fc
Merge branch 'main' into feat/ci/legacydb
paulushcgcj Aug 19, 2024
b183fd6
chore: removing temp token
paulushcgcj Aug 19, 2024
fbb73d0
chore: fixing image
paulushcgcj Aug 19, 2024
4f9b449
chore: forcing all files to be 777
paulushcgcj Aug 19, 2024
c320fd4
chore: forcing all files to be 777
paulushcgcj Aug 19, 2024
d066c0e
chore: changing the oracle user id
paulushcgcj Aug 19, 2024
0bd4b05
Merge branch 'main' into feat/ci/legacydb
paulushcgcj Aug 19, 2024
0c12798
chore: removing files
paulushcgcj Aug 19, 2024
c55bb77
Merge branch 'main' into feat/ci/legacydb
paulushcgcj Aug 20, 2024
fb0d155
Merge branch 'main' into feat/ci/legacydb
paulushcgcj Aug 26, 2024
eccf6e4
Merge branch 'main' into feat/ci/legacydb
paulushcgcj Aug 26, 2024
f6e8ef5
Merge branch 'main' into feat/ci/legacydb
paulushcgcj Aug 26, 2024
4880343
chore: updating legacy database deploy
paulushcgcj Aug 27, 2024
162d9db
chore: updating image
paulushcgcj Aug 27, 2024
be3ae16
chore: updated init container
paulushcgcj Aug 27, 2024
1b84365
chore: updated compose
paulushcgcj Aug 27, 2024
5dbf49a
chore: legacydb test
paulushcgcj Aug 27, 2024
fc8c8b1
Merge branch 'main' into feat/ci/legacydb
paulushcgcj Aug 27, 2024
59e5c0c
chore: removed pvc
paulushcgcj Aug 27, 2024
d5d63cf
chore: setting db creation
paulushcgcj Aug 27, 2024
41ca0e0
chore: fixing job
paulushcgcj Aug 27, 2024
729942c
chore: fixing deploy
paulushcgcj Aug 27, 2024
3bec554
feat: adding legacydb to pr-open
paulushcgcj Aug 27, 2024
7e401f9
chore: changing deploy order
paulushcgcj Aug 27, 2024
eb793e5
chore: split the pr process into two
paulushcgcj Aug 27, 2024
2fef896
chore: job renamed
paulushcgcj Aug 27, 2024
7f07992
feat: enabled legacy to use flyway
paulushcgcj Aug 28, 2024
ee8000c
Merge branch 'main' into feat/ci/legacydb
paulushcgcj Aug 28, 2024
c9db771
fix: fixed flyway for test
paulushcgcj Aug 28, 2024
c33373c
chore: changing parameter to string
paulushcgcj Aug 28, 2024
6389185
fix: fixed parameter value
paulushcgcj Aug 28, 2024
6f1593c
chore: changing profiles origin on legacy
paulushcgcj Aug 28, 2024
3e5618d
ci: fixed deployment of legacy
paulushcgcj Aug 28, 2024
de61b38
ci: aligned deployment to allow connection
paulushcgcj Aug 28, 2024
05cdb43
ci: updated cert extractor
paulushcgcj Aug 28, 2024
02b1f5a
Merge branch 'main' into feat/ci/legacydb
paulushcgcj Aug 28, 2024
2ffa75c
chore: fixing the host of the database
paulushcgcj Aug 28, 2024
d6ba1cf
chore: fixing host name of oracle
paulushcgcj Aug 28, 2024
d061052
chore: updating network policies
paulushcgcj Aug 28, 2024
a864473
chore: updating configurations
paulushcgcj Aug 28, 2024
31930f4
chore: updating configurations
paulushcgcj Aug 28, 2024
23f3ccd
chore: updating configurations
paulushcgcj Aug 28, 2024
e8f057c
chore: updating configurations
paulushcgcj Aug 28, 2024
d669656
chore: updating configurations
paulushcgcj Aug 28, 2024
f765555
chore: converting from deploymentconfig to deployment
paulushcgcj Aug 28, 2024
1f4374a
chore: fixing deployment
paulushcgcj Aug 28, 2024
dae1db2
chore: opening the policy
paulushcgcj Aug 28, 2024
e4a9537
chore(deps): updated deployer for legacydb
paulushcgcj Aug 29, 2024
1ea354f
chore: increasing resources
paulushcgcj Aug 29, 2024
d01bf2b
feat: adding cron for migration
paulushcgcj Aug 29, 2024
7ac619a
chore: renaming action
paulushcgcj Aug 29, 2024
37d5b4c
chore: renamed user for legacy due to schema issues
paulushcgcj Aug 29, 2024
126a63c
chore: name change
paulushcgcj Aug 29, 2024
64a6ad8
chore: adding migration call
paulushcgcj Aug 29, 2024
1d4ccde
chore: updated resource for oracle
paulushcgcj Aug 29, 2024
38635b3
chore: updating deployment
paulushcgcj Aug 29, 2024
a984f55
chore: fixing tools migrations
paulushcgcj Aug 29, 2024
51c57ed
Merge branch 'main' into feat/ci/legacydb
paulushcgcj Aug 29, 2024
4f4c925
chore: adding close/remove database cleanup
paulushcgcj Aug 29, 2024
12e875c
Merge branch 'main' into feat/ci/legacydb
mamartinezmejia Aug 29, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ jobs:
parameters:
-p ZONE=${{ env.ZONE }} -p NAME=${{ github.event.repository.name }}
-p PROMOTE=${{ github.repository }}/legacy:${{ env.ZONE }}
-p ENVIRONMENT=${{ secrets.OC_NAMESPACE }}

- name: Deploy Processor
uses: bcgov-nr/[email protected]
Expand Down Expand Up @@ -356,7 +357,8 @@ jobs:
verification_path: health
parameters:
-p ZONE=${{ env.ZONE }} -p NAME=${{ github.event.repository.name }}
-p PROMOTE=${{ github.repository }}/legacy:${{ env.PREV }}
-p PROMOTE=${{ github.repository }}/legacy:${{ env.PREV }}
-p ENVIRONMENT=${{ secrets.OC_NAMESPACE }}

- name: Deploy Processor
uses: bcgov-nr/[email protected]
Expand Down
28 changes: 28 additions & 0 deletions .github/workflows/pr-close.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,31 @@ jobs:
with:
cleanup: label
packages: backend common database frontend legacy processor

tools-cleanup:
name: Cleanup tools environment
needs: [cleanup]
environment: tools
runs-on: ubuntu-22.04
steps:
- name: Remove the PR database
continue-on-error: true
run: |
oc login --token=${{ secrets.OC_TOKEN }} --server=${{ secrets.OC_SERVER }}
oc project ${{ secrets.OC_NAMESPACE }} # Safeguard!
# This removes a new pluggable database, user and service for the PR
for i in {1..5}; do
POD_NAME=$(oc get pods -l app=nr-forest-client-tools -l deployment=nr-forest-client-tools-legacydb -o jsonpath='{.items[0].metadata.name}' 2>/dev/null)
if [ -n "$POD_NAME" ]; then
echo "Pod found: $POD_NAME"
oc exec $POD_NAME -- /opt/oracle/removeDatabase "THE" "PR_${{ github.event.number }}"
break
else
echo "Pod not found, retrying in 10 seconds... ($i/5)"
sleep 10
fi
done

if [ -z "$POD_NAME" ]; then
echo "Failed to find the pod after 5 attempts."
fi
114 changes: 106 additions & 8 deletions .github/workflows/pr-open.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
packages: write
strategy:
matrix:
package: [backend, common, database, frontend, legacy, processor]
package: [backend, database, frontend, legacy, processor]
steps:
- uses: actions/checkout@v4

Expand All @@ -63,9 +63,107 @@ jobs:
build_args: |
APP_VERSION=${{ needs.vars.outputs.semver }}-${{ github.event.number }}

build-legacydb:
name: Builds (legacydb)
runs-on: ubuntu-22.04
needs: [vars]
permissions:
packages: write
steps:
- uses: actions/checkout@v4

- uses: bcgov-nr/[email protected]
name: Build (Legacy db)
with:
package: legacydb
tag: latest
tag_fallback: test
triggers: ('legacydb/')
build_args: |
APP_VERSION=${{ needs.vars.outputs.semver }}-${{ github.event.number }}

deploy-tools:
name: Deploy Tools
needs: [build-legacydb, vars]
environment: tools
env:
DOMAIN: apps.silver.devops.gov.bc.ca
PREFIX: ${{ needs.vars.outputs.url }}
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4

- name: Initializing Deployment
uses: bcgov-nr/[email protected]
with:
file: legacydb/openshift.deploy.yml
oc_namespace: ${{ secrets.OC_NAMESPACE }}
oc_server: ${{ secrets.OC_SERVER }}
oc_token: ${{ secrets.OC_TOKEN }}
overwrite: false
parameters:
-p ZONE=tools
-p ORACLEDB_USER_W=THE
-p ORACLEDB_PASSWORD_W=${{ secrets.ORACLEDB_PASSWORD_W }}
-p TAG=latest

- name: Create the PR database
continue-on-error: true
run: |
oc login --token=${{ secrets.OC_TOKEN }} --server=${{ secrets.OC_SERVER }}
oc project ${{ secrets.OC_NAMESPACE }} # Safeguard!
# This creates a new pluggable database for the PR
for i in {1..5}; do
POD_NAME=$(oc get pods -l app=nr-forest-client-tools -l deployment=nr-forest-client-tools-legacydb -o jsonpath='{.items[0].metadata.name}' 2>/dev/null)
if [ -n "$POD_NAME" ]; then
echo "Pod found: $POD_NAME"
oc exec $POD_NAME -- /opt/oracle/createDatabase PR_${{ github.event.number }}
break
else
echo "Pod not found, retrying in 10 seconds... ($i/5)"
sleep 10
fi
done

if [ -z "$POD_NAME" ]; then
echo "Failed to find the pod after 5 attempts."
fi

- name: Create the PR user
continue-on-error: true
run: |
oc login --token=${{ secrets.OC_TOKEN }} --server=${{ secrets.OC_SERVER }}
oc project ${{ secrets.OC_NAMESPACE }} # Safeguard!
# This creates a new pluggable database for the PR
for i in {1..5}; do
POD_NAME=$(oc get pods -l app=nr-forest-client-tools -l deployment=nr-forest-client-tools-legacydb -o jsonpath='{.items[0].metadata.name}' 2>/dev/null)
if [ -n "$POD_NAME" ]; then
echo "Pod found: $POD_NAME"
oc exec $POD_NAME -- /opt/oracle/createAppUser "THE" "${{ secrets.ORACLEDB_PASSWORD_W }}_${{ github.event.number }}" "PR_${{ github.event.number }}"
break
else
echo "Pod not found, retrying in 10 seconds... ($i/5)"
sleep 10
fi
done

if [ -z "$POD_NAME" ]; then
echo "Failed to find the pod after 5 attempts."
fi

- name: Migrate the PR database
continue-on-error: true
run: |
BRANCH_NAME="${{ github.head_ref }}"
# Escape slashes and other special characters
ESCAPED_BRANCH_NAME=$(echo "$BRANCH_NAME" | sed 's/[\/&]/\\&/g')
oc login --token=${{ secrets.OC_TOKEN }} --server=${{ secrets.OC_SERVER }}
oc project ${{ secrets.OC_NAMESPACE }} # Safeguard!
oc create job --from=cronjob/nr-forest-client-tools-migratedb migrate-$(date +%s) --dry-run=client -o yaml | sed "s/value: main/value: ${ESCAPED_BRANCH_NAME}/" | sed "s/value: \"0\"/value: \"${{ github.event.number }}\"/" | oc apply -f -

deploy:
name: Deploy Application
needs: [builds, vars]
needs: [deploy-tools, builds, vars]
environment: dev
env:
DOMAIN: apps.silver.devops.gov.bc.ca
Expand All @@ -86,11 +184,11 @@ jobs:
-p ZONE=${{ github.event.number }}
-p ORACLEDB_USER=${{ secrets.ORACLEDB_USERNAME }}
-p ORACLEDB_PASSWORD=${{ secrets.ORACLEDB_PASSWORD }}
-p ORACLEDB_USER_W=${{ secrets.ORACLEDB_USERNAME_W }}
-p ORACLEDB_PASSWORD_W=${{ secrets.ORACLEDB_PASSWORD_W }}
-p ORACLEDB_USER_W=THE
-p ORACLEDB_PASSWORD_W=${{ secrets.ORACLEDB_PASSWORD_W }}_${{ github.event.number }}
-p ORACLEDB_DATABASE=${{ secrets.ORACLEDB_DATABASE }}
-p ORACLEDB_HOST=${{ secrets.ORACLEDB_HOST }}
-p ORACLEDB_SERVICENAME=${{ secrets.ORACLEDB_SERVICENAME }}
-p ORACLEDB_HOST="nr-forest-client-tools-legacydb.d2723f-tools.svc.cluster.local"
-p ORACLEDB_SERVICENAME=PR_${{ github.event.number }}
-p ORACLEDB_SECRET=${{ secrets.ORACLEDB_SECRET }}
-p BCREGISTRY_KEY=${{ secrets.BCREGISTRY_KEY }}
-p BCREGISTRY_ACCOUNT=${{ secrets.BCREGISTRY_ACCOUNT }}
Expand Down Expand Up @@ -148,6 +246,8 @@ jobs:
parameters:
-p ZONE=${{ github.event.number }}
-p PROMOTE=${{ github.repository }}/legacy:${{ github.event.number }}
-p ENVIRONMENT=${{ secrets.OC_NAMESPACE }}
-p ORACLEDB_PORT=1521

- name: Deploy Processor
uses: bcgov-nr/[email protected]
Expand Down Expand Up @@ -235,8 +335,6 @@ jobs:
-p LANDING_URL=${{ needs.vars.outputs.url }}
-p FRONTEND_URL=${{ needs.vars.outputs.url }}



cypress-run:
name: "User flow test"
runs-on: ubuntu-22.04
Expand Down
26 changes: 0 additions & 26 deletions common/openshift.init.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,29 +132,3 @@ objects:
- podSelector: {}
policyTypes:
- Ingress
- kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: ${NAME}-${ZONE}-index
labels:
app: ${NAME}-${ZONE}
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: ${IDX_PVC_SIZE}
storageClassName: netapp-file-standard
- kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: ${NAME}-${ZONE}-index-backup
labels:
app: ${NAME}-${ZONE}
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: ${IDX_BKP_PVC_SIZE}
storageClassName: netapp-file-standard
19 changes: 16 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ services:
POSTGRES_USER: *POSTGRES_USER
POSTGRES_PASSWORD: *POSTGRES_PASSWORD
POSTGRES_DB: *POSTGRES_DATABASE
image: postgres:15
build:
context: database
dockerfile: Dockerfile
ports: [5432:5432]
volumes: ["/pgdata"]
healthcheck:
Expand All @@ -34,17 +36,28 @@ services:

legacydb:
container_name: oracle
#build:
# context: legacydb
# dockerfile: Dockerfile
environment:
APP_USER_PASSWORD: default
APP_USER: THE
ORACLE_RANDOM_PASSWORD: yes
platform: "linux/amd64"
image: gvenzl/oracle-xe:21.3.0-slim-faststart
image: gvenzl/oracle-free:23.3-slim-faststart
ports: [1521:1521]
volumes: [/opt/oracle/oradata gvenzl/oracle-xe]
volumes: [/opt/oracle/oradata]
healthcheck:
test: [ "CMD-SHELL", "healthcheck.sh" ]
interval: 5s
timeout: 10s
retries: 10
<<: *defaults

legacyflyway:
container_name: flyway
image: flyway/flyway
command: -url=jdbc:oracle:thin:@legacydb:1521/FREEPDB1 -user=THE -password=default -connectRetries=60 migrate
volumes: [./legacy/src/test/resources/db/migration:/flyway/sql]
depends_on: [legacydb]
<<: *defaults
4 changes: 3 additions & 1 deletion legacy/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,7 @@ USER 1001
EXPOSE ${PORT}
HEALTHCHECK CMD curl -f http://localhost:${PORT}/actuator/health | grep '"status":"UP"'

ENV SPRING_PROFILES_ACTIVE=container

# Startup
ENTRYPOINT ["/app/nr-forest-client-legacy", "--spring.profiles.active=container"]
ENTRYPOINT ["/app/nr-forest-client-legacy"]
33 changes: 21 additions & 12 deletions legacy/openshift.deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ parameters:
- name: ZONE
description: Deployment zone, e.g. pr-### or prod
required: true
- name: ENVIRONMENT
description: Environment name used by the application
value: prod
- name: IMAGE_TAG
description: Image tag to use
value: latest
Expand All @@ -25,7 +28,10 @@ parameters:
description: Image (namespace/name:tag) to promote/import
value: bcgov/nr-forest-client-legacy:prod
- name: ORACLEDB_KEYSTORE
description: Oracle database keystore file
description: Oracle database keystore file
- name: ORACLEDB_PORT
description: Oracle database port
value: "1543"
- name: CPU_REQUEST
value: 75m
- name: CPU_LIMIT
Expand All @@ -38,8 +44,8 @@ parameters:
description: The amount of storage the cert PVC should have
value: 25Mi
objects:
- apiVersion: v1
kind: ImageStream
- kind: ImageStream
apiVersion: v1
metadata:
labels:
app: ${NAME}-${ZONE}
Expand All @@ -54,8 +60,8 @@ objects:
name: ${REGISTRY}/${PROMOTE}
referencePolicy:
type: Local
- apiVersion: v1
kind: PersistentVolumeClaim
- kind: PersistentVolumeClaim
apiVersion: v1
metadata:
labels:
app: ${NAME}-${ZONE}
Expand All @@ -67,11 +73,12 @@ objects:
requests:
storage: ${CERT_PVC_SIZE}
storageClassName: netapp-file-standard
- apiVersion: v1
kind: DeploymentConfig
- kind: DeploymentConfig
apiVersion: v1
metadata:
labels:
app: ${NAME}-${ZONE}
appkind: ${COMPONENT}
name: ${NAME}-${ZONE}-${COMPONENT}
spec:
replicas: 1
Expand Down Expand Up @@ -105,7 +112,7 @@ objects:
claimName: ${NAME}-${ZONE}-${COMPONENT}
initContainers:
- name: ${NAME}-init
image: ${REGISTRY}/bcgov/${NAME}/common:${ZONE}
image: ${REGISTRY}/bcgov/nr-forest-client-commons/certextractor:0.2.0
imagePullPolicy: Always
env:
- name: ORACLEDB_HOST
Expand All @@ -119,7 +126,7 @@ objects:
name: ${NAME}-${ZONE}
key: oracle-secret
- name: ORACLEDB_PORT
value: "1543"
value: ${ORACLEDB_PORT}
volumeMounts:
- name: ${NAME}-${ZONE}-certs
mountPath: /cert
Expand Down Expand Up @@ -161,7 +168,9 @@ objects:
name: ${NAME}-${ZONE}
key: oracle-service
- name: ORACLEDB_PORT
value: "1543"
value: ${ORACLEDB_PORT}
- name: SPRING_PROFILES_ACTIVE
value: "container,${ENVIRONMENT}"
- name: ORACLEDB_SECRET
valueFrom:
secretKeyRef:
Expand Down Expand Up @@ -204,8 +213,8 @@ objects:
volumeMounts:
- mountPath: /cert
name: ${NAME}-${ZONE}-certs
- apiVersion: v1
kind: Service
- kind: Service
apiVersion: v1
metadata:
labels:
app: ${NAME}-${ZONE}
Expand Down
Loading
Loading