Skip to content

Commit

Permalink
Merge pull request #74 from bcgov/dev
Browse files Browse the repository at this point in the history
Dev -> test
  • Loading branch information
hannah-macdonald1 authored Jan 24, 2025
2 parents e84c9d1 + 01ba893 commit 0120378
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 3 deletions.
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
NODE_ENV=production
VPI_APP_ENV='dev/test/prod'

RECORD_CACHE_MS = 60000

Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/build-and-push-ghcr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,14 @@ jobs:
value: ${{ secrets.APS_NAMESPACE }}
commitChange: false

- name: 'YAML poke: Set App Environment'
uses: fjogeleit/yaml-update-action@v0.15.0
with:
valueFile: 'helm/values.yaml'
propertyPath: 'vpiAppEnv'
value: ${{ vars.VPI_APP_ENV }}
commitChange: false

- name: 'YAML poke: Set build number'
uses: fjogeleit/yaml-update-action@v0.15.0
with:
Expand Down
2 changes: 2 additions & 0 deletions helm/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -216,4 +216,6 @@ spec:
key: INCIDENT_RESTRICTED_FIELD
- name: VPI_APP_LABEL
value: {{ .Values.vpiAppBuildLabel.version }}
- name: VPI_APP_ENV
value: {{ .Values.vpiAppEnv }}
restartPolicy: Always
2 changes: 2 additions & 0 deletions helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ tolerations: []

affinity: {}

vpiAppEnv: '<set by CI/CD>'

aps:
namespace: '<set by CI/CD>'

Expand Down
2 changes: 1 addition & 1 deletion src/common/constants/parameter-constants.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const VIEW_MODE = 'Catalog';
const VIEW_MODE = 'Organization';
const CHILD_LINKS = 'None';
const CONTENT_TYPE = 'application/json';
const UNIFORM_RESPONSE = 'y';
Expand Down
10 changes: 8 additions & 2 deletions src/configuration/configuration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,14 @@ export default () => ({
cases: process.env.CASE_SINCE_FIELD ?? undefined,
incidents: process.env.INCIDENT_SINCE_FIELD ?? undefined,
},
skipAuthGuard: process.env.SKIP_AUTH_GUARD === 'true',
skipJWTCache: process.env.SKIP_JWT_CACHE === 'true',
skipAuthGuard:
process.env.VPI_APP_ENV === 'prod'
? false
: process.env.SKIP_AUTH_GUARD === 'true',
skipJWTCache:
process.env.VPI_APP_ENV === 'prod'
? false
: process.env.SKIP_JWT_CACHE === 'true',
endpointUrls: {
baseUrl: process.env.UPSTREAM_BASE_URL ?? ' ',
supportNetwork: process.env.SUPPORT_NETWORK_ENDPOINT ?? ' ',
Expand Down

0 comments on commit 0120378

Please sign in to comment.