Skip to content

Commit cc146cd

Browse files
authored
Release 6.0 - Hello Oracle EBS, YouTube, GA4! (#82)
And goodbye submodules. One repository to rule them all! 👑
1 parent 067d0ae commit cc146cd

File tree

759 files changed

+37013
-13569
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

759 files changed

+37013
-13569
lines changed

1_click.sh

-3
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,5 @@
1919
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
2020

2121
pushd "${SCRIPT_DIR}" 1> /dev/null
22-
echo -n "Please wait..."
23-
git submodule update --init --recursive &> /dev/null || true
24-
echo -e -n "\r \r"
2522
src/utils/interactive/interactive.sh "${1}" "${2}"
2623
popd 1> /dev/null

README.md

+94-687
Large diffs are not rendered by default.

cloudbuild.yaml

+108-43
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,21 @@ steps:
2020
script: |
2121
#!/usr/bin/env bash
2222
set -e
23+
24+
# Save absolute config file path to .env file
25+
# that can be accessed by all Cloud Build steps since exported env
26+
# variables do not persist between steps.
27+
28+
realpath "${_CONFIG_FILE}" > /workspace/config_file_full_path.env
29+
2330
echo "Initial configuration ${_CONFIG_FILE}:"
24-
cat ${_CONFIG_FILE}
31+
cat "${_CONFIG_FILE}"
2532
2633
python3 src/common/init_deployment_config.py --config-file ${_CONFIG_FILE} \
2734
--sub-validator "src/SAP/SAP_REPORTING" \
2835
--sub-validator "src/SFDC/src" \
29-
--sub-validator "src/marketing/src"
36+
--sub-validator "src/marketing/src" \
37+
--sub-validator "src/OracleEBS/src"
3038
3139
echo "Processed configuration:"
3240
cat ${_CONFIG_FILE}
@@ -38,10 +46,25 @@ steps:
3846
script: |
3947
#!/usr/bin/env bash
4048
export PYTHONPATH=${PYTHONPATH}:src/:.
49+
declare -a _WORKER_POOL_OPTIONS
50+
51+
if [[ -n "${_WORKER_POOL_NAME}" ]]; then
52+
_WORKER_POOL_OPTIONS+=(--worker-pool-name "${_WORKER_POOL_NAME}")
53+
fi
54+
55+
if [[ -n "${_CLOUD_BUILD_REGION}" ]]; then
56+
_WORKER_POOL_OPTIONS+=(--region "${_CLOUD_BUILD_REGION}")
57+
fi
58+
59+
if [[ -n "${_BUILD_ACCOUNT}" ]]; then
60+
_WORKER_POOL_OPTIONS+=(--build-account "${_BUILD_ACCOUNT}")
61+
fi
62+
4163
python3 src/k9/src/deploy_k9.py \
42-
--config-file ${_CONFIG_FILE} \
43-
--stage pre \
44-
--logs-bucket ${_GCS_BUCKET}
64+
--config-file "${_CONFIG_FILE}" \
65+
--stage pre \
66+
--logs-bucket "${_GCS_BUCKET}" \
67+
"${_WORKER_POOL_OPTIONS[@]}"
4568
4669
- name: gcr.io/kittycorn-public/deploy-kittycorn:v2.0
4770
id: 'sap-test-harness'
@@ -84,7 +107,8 @@ steps:
84107
cp -f ${_CONFIG_FILE} src/SAP/SAP_CDC/config/config.json
85108
gcloud builds submit ./src/SAP/SAP_CDC \
86109
--config=./src/SAP/SAP_CDC/cloudbuild.cdc.yaml \
87-
--substitutions=_GCS_BUCKET=${_GCS_BUCKET}
110+
--substitutions=_GCS_BUCKET="${_GCS_BUCKET}",_WORKER_POOL_NAME="${_WORKER_POOL_NAME}",_CLOUD_BUILD_REGION="${_CLOUD_BUILD_REGION}",_BUILD_ACCOUNT="${_BUILD_ACCOUNT}" \
111+
--region="${_CLOUD_BUILD_REGION}"
88112
else
89113
echo "==Skipping CDC for SAP=="
90114
fi
@@ -95,11 +119,12 @@ steps:
95119
script: |
96120
#!/usr/bin/env bash
97121
_DEPLOY_SAP_=$(jq -r ."deploySAP" ${_CONFIG_FILE})
98-
if [[ ${_DEPLOY_SAP_} == "true" ]]; then
99-
cp -f ${_CONFIG_FILE} src/SAP/SAP_REPORTING/config/config.json
122+
if [[ "${_DEPLOY_SAP_}" == "true" ]]; then
123+
cp -f "${_CONFIG_FILE}" src/SAP/SAP_REPORTING/config/config.json
100124
gcloud builds submit ./src/SAP/SAP_REPORTING \
101125
--config=./src/SAP/SAP_REPORTING/cloudbuild.reporting.yaml \
102-
--substitutions=_GCS_BUCKET=${_GCS_BUCKET}
126+
--substitutions=_GCS_BUCKET="${_GCS_BUCKET}",_WORKER_POOL_NAME="${_WORKER_POOL_NAME}",_CLOUD_BUILD_REGION="${_CLOUD_BUILD_REGION}",_BUILD_ACCOUNT="${_BUILD_ACCOUNT}" \
127+
--region="${_CLOUD_BUILD_REGION}"
103128
else
104129
echo "==Skipping Reporting for SAP=="
105130
fi
@@ -109,6 +134,7 @@ steps:
109134
waitFor: ['sap-reporting']
110135
script: |
111136
#!/usr/bin/env bash
137+
_DEPLOY_SAP_ML_MODELS=$(jq -r ."deploySAPMLModels" ${_CONFIG_FILE})
112138
if [[ ${_DEPLOY_SAP_ML_MODELS} == "true" ]]
113139
then
114140
_DEPLOY_SAP_=$(jq -r ."deploySAP" ${_CONFIG_FILE})
@@ -122,10 +148,10 @@ steps:
122148
_DS_RAW_=$(jq -r ."SAP.datasets.raw" ${_CONFIG_FILE})
123149
_DS_CDC_=$(jq -r ."SAP.datasets.cdc" ${_CONFIG_FILE})
124150
125-
if [[ ${_DEPLOY_SAP_} == "true" && ${_SQL_FLAVOUR_} != "union" ]]; then
151+
if [[ "${_DEPLOY_SAP_}" == "true" && "${_SQL_FLAVOUR_}" != "union" ]]; then
126152
gcloud builds submit ./src/SAP/SAP_ML_MODELS \
127153
--config=./src/SAP/SAP_ML_MODELS/cloudbuild.models.yaml \
128-
--substitutions=_PJID_SRC=${_PJID_SRC_},_PJID_TGT=${_PJID_TGT_},_DS_RAW=${_DS_RAW_},_DS_CDC=${_DS_CDC_},_DS_REPORTING=${_DS_REPORTING_},_DS_MODELS=${_DS_MODELS_},_SQL_FLAVOUR=${_SQL_FLAVOUR_},_LOCATION=${_LOCATION_},_MANDT=${_MANDT_},_GCS_BUCKET=${_GCS_BUCKET}
154+
--substitutions=_PJID_SRC="${_PJID_SRC_}",_PJID_TGT="${_PJID_TGT_}",_DS_RAW="${_DS_RAW_}",_DS_CDC="${_DS_CDC_}",_DS_REPORTING="${_DS_REPORTING_}",_DS_MODELS="${_DS_MODELS_}",_SQL_FLAVOUR="${_SQL_FLAVOUR_}",_LOCATION="${_LOCATION_}",_MANDT="${_MANDT_}",_GCS_BUCKET="${_GCS_BUCKET}",_WORKER_POOL_NAME="${_WORKER_POOL_NAME}",_CLOUD_BUILD_REGION="${_CLOUD_BUILD_REGION}",_BUILD_ACCOUNT="${_BUILD_ACCOUNT}" --region="${_CLOUD_BUILD_REGION}"
129155
else
130156
echo "==Skipping ML for SAP=="
131157
fi
@@ -138,12 +164,13 @@ steps:
138164
waitFor: ['sfdc-test-harness', 'k9-pre']
139165
script: |
140166
#!/usr/bin/env bash
141-
_DEPLOY_SFDC_=$(jq -r ."deploySFDC" ${_CONFIG_FILE})
142-
if [[ ${_DEPLOY_SFDC_} == "true" ]]; then
143-
cp -f ${_CONFIG_FILE} src/SFDC/config/config.json
167+
_DEPLOY_SFDC_="$(jq -r ."deploySFDC" "${_CONFIG_FILE}")"
168+
if [[ "${_DEPLOY_SFDC_}" == "true" ]]; then
169+
cp -f "${_CONFIG_FILE}" src/SFDC/config/config.json
144170
gcloud builds submit ./src/SFDC \
145171
--config=./src/SFDC/cloudbuild.sfdc.yaml \
146-
--substitutions=_GCS_BUCKET=${_GCS_BUCKET}
172+
--substitutions=_GCS_BUCKET="${_GCS_BUCKET}",_WORKER_POOL_NAME="${_WORKER_POOL_NAME}",_CLOUD_BUILD_REGION="${_CLOUD_BUILD_REGION}",_BUILD_ACCOUNT="${_BUILD_ACCOUNT}" \
173+
--region="${_CLOUD_BUILD_REGION}"
147174
else
148175
echo "==Skipping SFDC=="
149176
fi
@@ -162,6 +189,8 @@ steps:
162189
_DEPLOY_LIVERAMP_=$(jq -r ."marketing.deployLiveRamp" ${_CONFIG_FILE})
163190
_DEPLOY_META_=$(jq -r ."marketing.deployMeta" ${_CONFIG_FILE})
164191
_DEPLOY_SFMC_=$(jq -r ."marketing.deploySFMC" ${_CONFIG_FILE})
192+
_DEPLOY_DV360_=$(jq -r ."marketing.deployDV360" ${_CONFIG_FILE})
193+
_DEPLOY_GA4_=$(jq -r ."marketing.deployGA4" ${_CONFIG_FILE})
165194
if [[ ${_DEPLOY_ADS_} == "true" ]]; then
166195
echo "Deploying Google Ads Test Harness."
167196
python3 src/common/create_test_harness.py --workload "marketing.GoogleAds" --dataset "raw"
@@ -186,6 +215,14 @@ steps:
186215
echo "Deploying SFMC Test Harness."
187216
python3 src/common/create_test_harness.py --workload "marketing.SFMC" --dataset "raw"
188217
fi
218+
if [[ ${_DEPLOY_DV360_} == "true" ]]; then
219+
echo "Deploying DV360 Test Harness."
220+
python3 src/common/create_test_harness.py --workload "marketing.DV360" --dataset "raw"
221+
fi
222+
if [[ ${_DEPLOY_GA4_} == "true" ]]; then
223+
echo "Deploying Google Analytics 4 Test Harness."
224+
python3 src/common/create_test_harness.py --workload "marketing.GA4" --dataset "cdc"
225+
fi
189226
else
190227
echo "==Skipping Test Harness for Marketing=="
191228
fi
@@ -195,55 +232,83 @@ steps:
195232
waitFor: ['k9-pre', 'marketing-test-harness']
196233
script: |
197234
#!/usr/bin/env bash
198-
_DEPLOY_MARKETING_=$(jq -r ."deployMarketing" ${_CONFIG_FILE})
199-
if [[ ${_DEPLOY_MARKETING_} == "true" ]]; then
200-
cp -f ${_CONFIG_FILE} src/marketing/config/config.json
235+
_DEPLOY_MARKETING_="$(jq -r ."deployMarketing" "${_CONFIG_FILE}")"
236+
if [[ "${_DEPLOY_MARKETING_}" == "true" ]]; then
237+
cp -f "${_CONFIG_FILE}" src/marketing/config/config.json
201238
gcloud builds submit ./src/marketing \
202239
--config=./src/marketing/cloudbuild.marketing.yaml \
203-
--substitutions=_GCS_LOGS_BUCKET=${_GCS_BUCKET}
240+
--substitutions=_GCS_LOGS_BUCKET="${_GCS_BUCKET}",_WORKER_POOL_NAME="${_WORKER_POOL_NAME}",_CLOUD_BUILD_REGION="${_CLOUD_BUILD_REGION}",_BUILD_ACCOUNT="${_BUILD_ACCOUNT}" \
241+
--region="${_CLOUD_BUILD_REGION}"
204242
else
205243
echo "==Skipping Marketing=="
206244
fi
207245
208246
- name: gcr.io/kittycorn-public/deploy-kittycorn:v2.0
209-
id: 'k9-post'
210-
waitFor: ['k9-pre', 'sap-reporting', 'sfdc-deploy', 'marketing-deploy']
247+
id: 'oracle-ebs-test-harness'
248+
waitFor: ['init_deploy_config']
211249
script: |
212250
#!/usr/bin/env bash
213-
export PYTHONPATH=${PYTHONPATH}:src/:.
214-
python3 src/k9/src/deploy_k9.py \
215-
--config-file ${_CONFIG_FILE} \
216-
--stage post \
217-
--logs-bucket ${_GCS_BUCKET}
251+
_DEPLOY_EBS_=$(jq -r ."deployOracleEBS" ${_CONFIG_FILE})
252+
_TEST_DATA_=$(jq -r ."testData" ${_CONFIG_FILE})
218253
219-
- name: gcr.io/kittycorn-public/credly:latest
220-
id: 'credly-badge'
221-
waitFor: ['k9-pre', 'sap-reporting', 'sfdc-deploy']
254+
if [[ ${_NO_TEST_DATA} != "true" && ${_TEST_DATA_} == "true" && ${_DEPLOY_EBS_} == "true" ]]; then
255+
echo "Deploying Oracle EBS Test Harness."
256+
python3 src/common/create_test_harness.py --workload "OracleEBS" --dataset "cdc"
257+
else
258+
echo "==Skipping Test Harness for Oracle=="
259+
fi
260+
261+
- name: gcr.io/kittycorn-public/deploy-kittycorn:v2.0
262+
id: 'oracle-ebs-deploy'
263+
waitFor: ['k9-pre', 'oracle-ebs-test-harness']
222264
script: |
223265
#!/usr/bin/env bash
224-
_FLAG_=$(jq -r ."shareWithCredly" ${_CONFIG_FILE})
225-
if [[ ${_FLAG_} != "true" ]]; then
226-
echo "===Skipping assigning a badge==="
266+
_DEPLOY_EBS_=$(jq -r ."deployOracleEBS" ${_CONFIG_FILE})
267+
if [[ ${_DEPLOY_EBS_} == "true" ]]; then
268+
cp -f ${_CONFIG_FILE} src/OracleEBS/config/config.json
269+
gcloud builds submit ./src/OracleEBS \
270+
--config=./src/OracleEBS/cloudbuild.oracle_ebs.yaml \
271+
--substitutions=_GCS_LOGS_BUCKET="${_GCS_BUCKET}",_WORKER_POOL_NAME="${_WORKER_POOL_NAME}",_CLOUD_BUILD_REGION="${_CLOUD_BUILD_REGION}",_BUILD_ACCOUNT="${_BUILD_ACCOUNT}" \
272+
--region="${_CLOUD_BUILD_REGION}"
227273
else
228-
_EMAIL_=$(jq -r ."userInfo.email" ${_CONFIG_FILE})
229-
_FN_=$(jq -r ."userInfo.firstName" ${_CONFIG_FILE})
230-
_LN_=$(jq -r ."userInfo.lastName" ${_CONFIG_FILE})
231-
cd /usr/src/app
232-
if [ -z ${_EMAIL_} ] || [ -z ${_FN_} ] || [ -z ${_LN_} ] || ! [ -f credly.py ]; then
233-
echo "===Email, first name and last name are required in config.json==="
234-
echo "===Skipping assigning a badge==="
235-
else
236-
python3 credly.py --fn ${_FN_} --ln ${_LN_} --email ${_EMAIL_} || exit 0
237-
fi
274+
echo "==Skipping Oracle EBS=="
275+
fi
276+
277+
- name: gcr.io/kittycorn-public/deploy-kittycorn:v2.0
278+
id: 'k9-post'
279+
waitFor: ['k9-pre', 'sap-reporting', 'sfdc-deploy', 'marketing-deploy', 'oracle-ebs-deploy']
280+
script: |
281+
#!/usr/bin/env bash
282+
export PYTHONPATH=${PYTHONPATH}:src/:.
283+
declare -a _WORKER_POOL_OPTIONS
284+
285+
if [[ -n "${_WORKER_POOL_NAME}" ]]; then
286+
_WORKER_POOL_OPTIONS+=(--worker-pool-name "${_WORKER_POOL_NAME}")
287+
fi
288+
289+
if [[ -n "${_CLOUD_BUILD_REGION}" ]]; then
290+
_WORKER_POOL_OPTIONS+=(--region "${_CLOUD_BUILD_REGION}")
291+
fi
292+
293+
if [[ -n "${_BUILD_ACCOUNT}" ]]; then
294+
_WORKER_POOL_OPTIONS+=(--build-account "${_BUILD_ACCOUNT}")
238295
fi
239296
297+
python3 src/k9/src/deploy_k9.py \
298+
--config-file "${_CONFIG_FILE}" \
299+
--stage post \
300+
--logs-bucket "${_GCS_BUCKET}" \
301+
"${_WORKER_POOL_OPTIONS[@]}"
302+
240303
logsBucket: "gs://${_GCS_BUCKET}"
304+
serviceAccount: "${_BUILD_ACCOUNT}"
241305
timeout: 32400s
242306
substitutions:
243307
_CONFIG_FILE: "config/config.json"
244-
_DEPLOY_SAP_ML_MODELS: "false"
245308
_NO_TEST_DATA: "false"
246309
options:
247310
substitution_option: "ALLOW_LOOSE"
248311
automapSubstitutions: true
312+
pool:
313+
name: "${_WORKER_POOL_NAME}"
249314
tags: ["cortex"]

config/config.json

+42-15
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,14 @@
33
"deploySAP": true,
44
"deploySFDC": true,
55
"deployMarketing": true,
6+
"deployOracleEBS": true,
67
"deployDataMesh": true,
8+
"deploySAPMLModels": false,
79
"turboMode": true,
810
"projectIdSource": "",
911
"projectIdTarget": "",
1012
"targetBucket": "",
1113
"location": "US",
12-
"languages": [
13-
"E",
14-
"S"
15-
],
16-
"currencies": [
17-
"USD"
18-
],
1914
"testDataProject": "kittycorn-public",
2015
"k9": {
2116
"datasets": {
@@ -31,19 +26,29 @@
3126
},
3227
"SAP": {
3328
"deployCDC": true,
29+
"SQLFlavor": "ecc",
30+
"mandt": "100",
31+
"languages": [
32+
"E",
33+
"S"
34+
],
35+
"currencies": [
36+
"USD"
37+
],
3438
"datasets": {
3539
"cdc": "",
3640
"raw": "",
3741
"ml": "ML_MODELS",
3842
"reporting": "REPORTING"
39-
},
40-
"SQLFlavor": "ecc",
41-
"mandt": "100"
43+
}
4244
},
4345
"SFDC": {
4446
"deployCDC": true,
4547
"createMappingViews": true,
4648
"createPlaceholders": true,
49+
"currencies": [
50+
"USD"
51+
],
4752
"datasets": {
4853
"cdc": "",
4954
"raw": "",
@@ -57,6 +62,8 @@
5762
"deployLiveRamp": true,
5863
"deployMeta": true,
5964
"deploySFMC": true,
65+
"deployDV360": true,
66+
"deployGA4": true,
6067
"dataflowRegion": "",
6168
"GoogleAds": {
6269
"deployCDC": true,
@@ -105,12 +112,32 @@
105112
"raw": "",
106113
"reporting": "REPORTING_SFMC"
107114
}
115+
},
116+
"DV360": {
117+
"deployCDC": true,
118+
"datasets": {
119+
"raw": "",
120+
"cdc": "",
121+
"reporting": "REPORTING_DV360"
122+
}
123+
},
124+
"GA4": {
125+
"datasets": {
126+
"cdc": [
127+
{"property_id": 0, "name": ""}
128+
],
129+
"reporting": "REPORTING_GA4"
130+
}
108131
}
109132
},
110-
"shareWithCredly": false,
111-
"userInfo": {
112-
"email": "",
113-
"firstName": "",
114-
"lastName": ""
133+
"OracleEBS": {
134+
"itemCategorySetIds": [1100000425],
135+
"currencyConversionType": "Corporate",
136+
"currencyConversionTargets": ["USD"],
137+
"languages": ["US"],
138+
"datasets": {
139+
"cdc": "",
140+
"reporting": "REPORTING_OracleEBS"
141+
}
115142
}
116143
}

0 commit comments

Comments
 (0)