Skip to content

Commit 9645b3a

Browse files
authored
chore: Update configuration for test & prod (#11)
1 parent 77741ae commit 9645b3a

File tree

4 files changed

+43
-48
lines changed

4 files changed

+43
-48
lines changed

.github/workflows/merge.yml

Lines changed: 36 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -42,15 +42,12 @@ jobs:
4242
# environment: test
4343
# # https://github.com/bcgov/quickstart-openshift-helpers
4444

45-
# deploy-test:
46-
# name: Deploy (test)
47-
# uses: ./.github/workflows/.deployer.yml
48-
# secrets:
49-
# oc_namespace: ${{ secrets.OC_NAMESPACE }}
50-
# oc_token: ${{ secrets.OC_TOKEN }}
51-
# with:
52-
# environment: test
53-
# db_user: app
45+
deploy-test:
46+
name: Deploy (test)
47+
uses: ./.github/workflows/.deployer.yml
48+
secrets: inherit
49+
with:
50+
environment: test
5451

5552
# deploy_db_prod:
5653
# name: Deploys Database PROD
@@ -60,36 +57,33 @@ jobs:
6057
# oc_token: ${{ secrets.OC_TOKEN }}
6158
# with:
6259
# environment: prod
63-
# deploy-prod:
64-
# name: Deploy (prod)
65-
# needs: [deploy-test, vars]
66-
# uses: ./.github/workflows/.deployer.yml
67-
# secrets:
68-
# oc_namespace: ${{ secrets.OC_NAMESPACE }}
69-
# oc_token: ${{ secrets.OC_TOKEN }}
70-
# with:
71-
# environment: prod
72-
# db_user: app
73-
# params:
74-
# --set cms.deploymentStrategy=RollingUpdate
75-
# --set frontend.deploymentStrategy=RollingUpdate
76-
# --set global.autoscaling=true
77-
# --set frontend.pdb.enabled=true
78-
# --set cms.pdb.enabled=true
79-
# promote:
80-
# name: Promote Images
81-
# needs: [deploy-prod, vars]
82-
# runs-on: ubuntu-24.04
83-
# permissions:
84-
# packages: write
85-
# strategy:
86-
# matrix:
87-
# package: [cms, frontend]
88-
# timeout-minutes: 1
89-
# steps:
90-
# - uses: shrink/actions-docker-registry-tag@v4
91-
# with:
92-
# registry: ghcr.io
93-
# repository: ${{ github.repository }}/${{ matrix.package }}
94-
# target: ${{ needs.vars.outputs.pr }}
95-
# tags: prod
60+
deploy-prod:
61+
name: Deploy (prod)
62+
needs: [deploy-test, vars]
63+
uses: ./.github/workflows/.deployer.yml
64+
secrets: inherit
65+
with:
66+
environment: prod
67+
params:
68+
--set cms.deploymentStrategy=RollingUpdate
69+
--set frontend.deploymentStrategy=RollingUpdate
70+
--set global.autoscaling=true
71+
--set frontend.pdb.enabled=true
72+
--set cms.pdb.enabled=true
73+
promote:
74+
name: Promote Images
75+
needs: [deploy-prod, vars]
76+
runs-on: ubuntu-24.04
77+
permissions:
78+
packages: write
79+
strategy:
80+
matrix:
81+
package: [cms, frontend]
82+
timeout-minutes: 1
83+
steps:
84+
- uses: shrink/actions-docker-registry-tag@v4
85+
with:
86+
registry: ghcr.io
87+
repository: ${{ github.repository }}/${{ matrix.package }}
88+
target: ${{ needs.vars.outputs.pr }}
89+
tags: prod

.github/workflows/pr-open.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ jobs:
3333
secrets: inherit
3434
with:
3535
triggers: ('cms/' 'frontend/' 'charts/')
36-
db_user: app-${{github.event.number}}
3736
params: --set global.secrets.persist=false
3837

3938
# tests:

charts/app/values.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@ cms:
4848
#-- enable or disable autoscaling.
4949
enabled: false
5050
#-- the minimum number of replicas.
51-
minReplicas: 3
51+
minReplicas: 1
5252
#-- the maximum number of replicas.
53-
maxReplicas: 7
53+
maxReplicas: 1
5454
#-- the target cpu utilization percentage, is from request cpu and NOT LIMIT CPU.
5555
targetCPUUtilizationPercentage: 80
5656
#-- vault, for injecting secrets from vault. it is optional and is an object. it creates an initContainer which reads from vault and app container can source those secrets. for referring to a working example with vault follow this link: https://github.com/bcgov/onroutebc/blob/main/charts/onroutebc/values.yaml#L171-L186
@@ -99,9 +99,9 @@ frontend:
9999
#-- enable or disable autoscaling.
100100
enabled: false
101101
#-- the minimum number of replicas.
102-
minReplicas: 3
102+
minReplicas: 1
103103
#-- the maximum number of replicas.
104-
maxReplicas: 7
104+
maxReplicas: 2
105105
#-- the target cpu utilization percentage, is from request cpu and NOT LIMIT CPU.
106106
targetCPUUtilizationPercentage: 80
107107
#-- the service for the component. for inter namespace communication, use the service name as the hostname.

frontend/src/app/projects/projects-routing.module.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ const routes: Routes = [
1818
project: ProjectDetailResolver
1919
},
2020
children: TAB_NAV_ROUTES // each tab within the page navigates to a separate route; e.g. /p/:code/(overview|compliance|docs)
21-
}
21+
},
22+
{path: 'projects', redirectTo: '/mines', pathMatch: 'full'},
23+
{path: 'p/:code', redirectTo: '/mines'}
2224
];
2325

2426
@NgModule({

0 commit comments

Comments
 (0)