-
Notifications
You must be signed in to change notification settings - Fork 20
/
cloudbuild.models.yaml
44 lines (40 loc) · 1.26 KB
/
cloudbuild.models.yaml
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
# gcloud builds submit --config=cloudbuild.yaml .
steps:
- name: gcr.io/cloud-builders/gcloud
script: |
#!/usr/bin/env bash
declare -a _WORKER_POOL_OPTIONS
if [[ -n "${_WORKER_POOL_NAME}" ]]; then
_WORKER_POOL_OPTIONS+=(--worker-pool-name "${_WORKER_POOL_NAME}")
fi
if [[ -n "${_CLOUD_BUILD_REGION}" ]]; then
_WORKER_POOL_OPTIONS+=(--region "${_CLOUD_BUILD_REGION}")
fi
./deploy.sh \
--source-project "${_PJID_SRC}" \
--target-project "${_PJID_TGT}" \
--cdc-processed-dataset "${_DS_CDC}" \
--raw-landing-dataset "${_DS_RAW}" \
--target-reporting-dataset "${_DS_REPORTING}" \
--target-models-dataset "${_DS_MODELS}" \
--location "${_LOCATION}" \
--mandt "${_MANDT}" \
--sql-flavour "${_SQL_FLAVOUR}" \
--gcs-bucket ${_GCS_BUCKET} \
"${_WORKER_POOL_OPTIONS[@]}" \
${_VIEWS_DIR}
logsBucket: "gs://${_GCS_BUCKET}"
serviceAccount: "${_BUILD_ACCOUNT}"
timeout: 7200s
substitutions:
_VIEWS_DIR: src/views
_MANDT: "100"
_LOCATION: "US"
_DS_REPORTING: "REPORTING"
_DS_MODELS: "ML_MODELS"
_SQL_FLAVOUR: "ECC"
options:
substitution_option: "ALLOW_LOOSE"
automapSubstitutions: true
pool:
name: "${_WORKER_POOL_NAME}"