-
Notifications
You must be signed in to change notification settings - Fork 2
/
build-and-deploy-cloud-functions.sh
executable file
·45 lines (35 loc) · 1.86 KB
/
build-and-deploy-cloud-functions.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
PROJECT_ID=$1
STUDY_MANAGER_SCHEMA=$2
STUDY_SERVER_SCHEMA=$3
echo "Will deploy to ${PROJECT_ID} using schemas ${STUDY_MANAGER_SCHEMA} and ${STUDY_SERVER_SCHEMA}"
mvn -Pcloud-function -DskipTests clean install package
echo "Deploying kit dispatcher to ${PROJECT_ID}"
gcloud --project=${PROJECT_ID} functions deploy \
tbos-kit-tracking-id-finder \
--entry-point=org.broadinstitute.dsm.cf.TestBostonKitTrackerDispatcher \
--runtime=java11 \
--trigger-topic=cron-topic \
--timeout=540\
--source=target/deployment \
--set-env-vars="PROJECT_ID=${PROJECT_ID},SECRET_ID=cf-kit-tracker,STUDY_MANAGER_SCHEMA=${STUDY_MANAGER_SCHEMA},STUDY_SERVER_SCHEMA=${STUDY_SERVER_SCHEMA}" \
--vpc-connector=projects/${PROJECT_ID}/locations/us-central1/connectors/appengine-default-connect
echo "Deploying kit boston tracking to ${PROJECT_ID}"
gcloud --project=${PROJECT_ID} functions deploy \
tbos-kit-ups-tracker \
--entry-point=org.broadinstitute.dsm.jobs.TestBostonUPSTrackingJob \
--runtime=java11 \
--trigger-topic=cf-kit-tracking \
--timeout=540\
--source=target/deployment \
--set-env-vars="PROJECT_ID=${PROJECT_ID},SECRET_ID=cf-kit-tracker,STUDY_MANAGER_SCHEMA=${STUDY_MANAGER_SCHEMA},STUDY_SERVER_SCHEMA=${STUDY_SERVER_SCHEMA}" \
--vpc-connector=projects/${PROJECT_ID}/locations/us-central1/connectors/appengine-default-connect
#echo "Deploying covid order registrar to ${PROJECT_ID}"
#gcloud --project=${PROJECT_ID} functions deploy \
# order-in-care-evolve \
# --entry-point=org.broadinstitute.dsm.cf.Covid19OrderRegistrarFunction \
# --runtime=java11 \
# --trigger-topic=tbos-ce-orders \
# --source=target/deployment \
# --memory=1024MB \
# --set-env-vars="PROJECT_ID=${PROJECT_ID},SECRET_ID=study-manager-config" \
# --vpc-connector=projects/broad-ddp-dev/locations/us-central1/connectors/appengine-default-connect