diff --git a/.env.production b/.env.production index 5d6953e..d914e33 100644 --- a/.env.production +++ b/.env.production @@ -3,3 +3,4 @@ REACT_APP_SSO_REALM_NAME= REACT_APP_SSO_CLIENT_ID= REACT_APP_SSO_BASE_URL= REACT_APP_API_BASE_URL= +REACT_APP_ROCKETCHAT_URL diff --git a/.pipeline/lib/deploy.js b/.pipeline/lib/deploy.js index 676979d..ed53b13 100755 --- a/.pipeline/lib/deploy.js +++ b/.pipeline/lib/deploy.js @@ -20,6 +20,10 @@ module.exports = () => { oc.options.env === 'prod' ? 'https://reggie-api-prod-devhub-prod.pathfinder.gov.bc.ca' : 'https://reggie-api-test-devhub-test.pathfinder.gov.bc.ca', + REACT_APP_ROCKETCHAT_URL_VALUE: + oc.options.env === 'prod' + ? 'https://chat-pilot.pathfinder.gov.bc.ca/' + : 'https://chat-dev.pathfinder.gov.bc.ca/', }; const objects = oc.process(oc.toFileUrl(templateFile), { diff --git a/openshift/dc.yaml b/openshift/dc.yaml index ba761b8..50988d9 100644 --- a/openshift/dc.yaml +++ b/openshift/dc.yaml @@ -66,6 +66,8 @@ objects: key: SSO_CLIENT_ID - name: REACT_APP_API_BASE_URL value: ${REACT_APP_API_BASE_URL_VALUE} + - name: REACT_APP_ROCKETCHAT_URL + value: ${REACT_APP_ROCKETCHAT_URL_VALUE} volumeMounts: - name: ${VOLUMN_NAME} mountPath: /etc/Caddyfile @@ -143,6 +145,11 @@ parameters: name: REACT_APP_API_BASE_URL_VALUE required: false value: '' +- description: A url of rc app + displayName: website of rc + name: REACT_APP_ROCKETCHAT_URL_VALUE + required: false + value: '' - description: A volumn used for the caddy from config map displayName: volumn name name: VOLUMN_NAME diff --git a/src/config.json b/src/config.json index 5618bf1..138fa26 100644 --- a/src/config.json +++ b/src/config.json @@ -2,5 +2,6 @@ "ssoRealmName": "{{.Env.REACT_APP_SSO_REALM_NAME}}", "ssoClientId": "{{.Env.REACT_APP_SSO_CLIENT_ID}}", "ssoBaseUrl": "{{.Env.REACT_APP_SSO_BASE_URL}}", - "apiBaseUrl": "{{.Env.REACT_APP_API_BASE_URL}}" + "apiBaseUrl": "{{.Env.REACT_APP_API_BASE_URL}}", + "rocketchatUrl": "{{.Env.REACT_APP_ROCKETCHAT_URL}}" } diff --git a/src/constants.js b/src/constants.js index 7cdf04b..3b593fe 100644 --- a/src/constants.js +++ b/src/constants.js @@ -46,7 +46,7 @@ export const SSO_IDP = { export const SELF_SERVER_APP = { ROCKETCHAT: { - URL: 'https://chat-pilot.pathfinder.gov.bc.ca/', + URL: process.env.REACT_APP_ROCKETCHAT_URL || config.rocketchatUrl, NAME: 'rc', INVITATION_CODE: 'rc', },