-
Notifications
You must be signed in to change notification settings - Fork 0
/
apply.sh
executable file
·52 lines (42 loc) · 1.9 KB
/
apply.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#!/usr/bin/env bash
set -e # Exit if error is detected during pipeline execution
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
PWD=$(pwd)
source "$DIR"/SET
echo "$(basename "$0") BUCKET=$BUCKET"
### crd
cd "$DIR/microservices/crd/kustomize/k8s"
sed 's|__PROJECT_ID__|'"$PROJECT_ID"'|g;
s|__BUCKET__|'"$BUCKET"'|g;
s|__DB__|'"$DB_NAME"'|g;
s|__VSAC_API_KEY__|'"$VSAC_API_KEY"'|g;
s|__CRD_CONFIG__|'"$CRD_CONFIG"'|g;
s|__DTR__|'"$DTR"'|g;
s|__AUTH__|'"$AUTH"'|g;
s|__CRD_REQUEST_GENERATOR__|'"$CRD_REQUEST_GENERATOR"'|g;
s|__TEST_EHR__|'"$TEST_EHR"'|g; ' config.sample.yaml > "$DIR/microservices/crd/kustomize/base/config.yaml"
cd "$PWD" || exit
## crd-request-generator
cd "$DIR/microservices/crd-request-generator/kustomize/k8s"
sed 's|__FHIR_SERVER__|'"$FHIR_SERVER"'|g;
s|__AUTH__|'"$AUTH"'|g;
s|__PUBLIC_KEYS__|'"$PUBLIC_KEYS"'|g;
s|__DTR__|'"$DTR"'|g;
s|__CRD_REQUEST_GENERATOR_CONFIG__|'"$CRD_REQUEST_GENERATOR_CONFIG"'|g;
s|__ORDER_SELECT__|'"$ORDER_SELECT"'|g;
s|__ORDER_SIGN__|'"$ORDER_SIGN"'|g;
s|__CDS_SERVICE__|'"$CDS_SERVICE"'|g;' config.sample.yaml > "$DIR/microservices/crd-request-generator/kustomize/base/config.yaml"
#dtr
cd "$DIR/microservices/dtr/kustomize/k8s"
sed 's|__PRIOR_AUTH__|'"$PRIOR_AUTH"'|g;
s|__TEST_EHR__|'"$TEST_EHR"'|g; ' config.sample.yaml > "$DIR/microservices/dtr/kustomize/base/config.yaml"
cd "$PWD" || exit
#test-ehr
cd "$DIR/microservices/test-ehr/kustomize/k8s"
sed 's|__AUTH__|'"$AUTH"'|g; s|__TEST_EHR__|'"$TEST_EHR"'|g; ' config.sample.yaml > "$DIR/microservices/test-ehr/kustomize/base/config.yaml"
##prior-auth
cd "$DIR/microservices/prior-auth/kustomize/k8s"
sed 's|__PROJECT_ID__|'"$PROJECT_ID"'|g;
s|__BUCKET__|'"$BUCKET_NAME"'|g;
s|__PRIOR_AUTH__|'"$PRIOR_AUTH"'|g;
s|__DB__|'"$DB_NAME"'|g; ' config.sample.yaml > "$DIR/microservices/prior-auth/kustomize/base/config.yaml"