Skip to content

Commit

Permalink
Script updates.
Browse files Browse the repository at this point in the history
  • Loading branch information
weskubo-cgi authored and weskubo-cgi committed Aug 2, 2024
1 parent d10ca55 commit f96cea1
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 14 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/deploy-to-openshift-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,8 @@ jobs:
${{ secrets.D365_DEFAULT_CONTACT_ID }} \
/tmp/recipients \
/tmp/bc_registry_api \
${{ secrets.D365_BCCAS_API_URL }}
${{ secrets.D365_BCCAS_API_URL }} \
${{ secrets.D365_CGI_BATCH_NUMBER }}
# Start rollout (if necessary) and follow it
oc rollout latest dc/${{ env.APP_NAME }}-${{ env.APP_NAME_BACKEND }}-${{ env.APP_ENVIRONMENT }} 2> /dev/null \
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/deploy-to-openshift-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,8 @@ jobs:
${{ secrets.D365_DEFAULT_CONTACT_ID }} \
/tmp/recipients \
/tmp/bc_registry_api \
${{ secrets.D365_BCCAS_API_URL }}
${{ secrets.D365_BCCAS_API_URL }} \
${{ secrets.D365_CGI_BATCH_NUMBER }}
# Start rollout (if necessary) and follow it
oc rollout latest dc/${{ env.APP_NAME }}-${{ env.APP_NAME_BACKEND }}-${{ env.APP_ENVIRONMENT }} 2> /dev/null \
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/deploy-to-openshift-uat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,8 @@ jobs:
${{ secrets.D365_DEFAULT_CONTACT_ID }} \
/tmp/recipients \
/tmp/bc_registry_api \
${{ secrets.D365_BCCAS_API_URL }}
${{ secrets.D365_BCCAS_API_URL }} \
${{ secrets.D365_CGI_BATCH_NUMBER }}
# Start rollout (if necessary) and follow it
oc rollout latest dc/${{ env.APP_NAME }}-${{ env.APP_NAME_BACKEND }}-${{ env.APP_ENVIRONMENT }} 2> /dev/null \
Expand Down
21 changes: 11 additions & 10 deletions tools/config/README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
# D365 Config Map Updater

This readme serves as documentation for what secrets are used for deployment and
what their expected types are. Note that the output of the update script is a
what their expected types are. Note that the output of the update script is a
valid JSON file, so these types should be in JSON.

| Key | Type |
|-------------------------|------------------------|
| D365_API_KEY_SCHEME | `Object` |
| D365_API_AUTH_SETTINGS | `Object` |
| D365_DEFAULT_SENDER_ID | `String` |
| D365_DEFAULT_CONTACT_ID | `String` |
| D365_RECIPIENTS | `Array<String>` |
| D365_BC_REGISTRY_API | `Object` |
| D365_BCCAS_API_URL | `String` |
| Key | Type |
| ----------------------- | --------------- |
| D365_API_KEY_SCHEME | `Object` |
| D365_API_AUTH_SETTINGS | `Object` |
| D365_DEFAULT_SENDER_ID | `String` |
| D365_DEFAULT_CONTACT_ID | `String` |
| D365_RECIPIENTS | `Array<String>` |
| D365_BC_REGISTRY_API | `Object` |
| D365_BCCAS_API_URL | `String` |
| D365_CGI_BATCH_NUMBER | `String` |

Each of these keys are environment specific, so make sure you update each
environment where applicable.
3 changes: 2 additions & 1 deletion tools/config/update-configmap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ readonly D365_DEFAULT_CONTACT_ID=$7
readonly D365_RECIPIENTS=$8
readonly D365_BC_REGISTRY_API=$9
readonly D365_BCCAS_API_URL=${10}
readonly D365_CGI_BATCH_NUMBER=$11

SERVER_FRONTEND="https://ofm-frontend-$ENV_VAL-$OPENSHIFT_NAMESPACE.apps.silver.devops.gov.bc.ca"
if [ "$ENV_VAL" = "prod" ]; then
Expand Down Expand Up @@ -276,7 +277,7 @@ D365_CONFIGURATION=$(jq << JSON
"PayableInDays": 5,
"transactionCount": 250,
"clientCode": "62",
"cGIBatchNumber": "623540001",
"cGIBatchNumber": "$D365_CGI_BATCH_NUMBER",
"oracleBatchNumber": "001",
"batchType": "AP",
"delimiter": "\u001d",
Expand Down

0 comments on commit f96cea1

Please sign in to comment.