/
azure-pipelines.yaml
54 lines (48 loc) · 1.75 KB
/
azure-pipelines.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
45
46
47
48
49
50
51
52
53
54
trigger:
- master
pool:
vmImage: ubuntu-latest
strategy:
matrix:
example_function1:
function: example_function1
example_function2:
function: example_function2
container:
image: cognite/function-action:v1-azure
steps:
- bash: |
wget -qO ./yq https://github.com/mikefarah/yq/releases/download/v4.17.2/yq_linux_amd64
chmod +x ./yq
name: install_yq
- bash: |
FILE="$FUNCTION/function_config.yaml"
if [ ! -f $FILE ]; then
echo "Config: $FILE not supplied!"
else
ALLKEYS=$(./yq e "... comments=\"\" | keys" $FILE)
for CONFIGURATION in $ALLKEYS
do
if [ "$CONFIGURATION" != "-" ]; then
VALUE=$(./yq e ".$CONFIGURATION" $FILE)
echo "##vso[task.setvariable variable=$CONFIGURATION;]$VALUE"
fi
done
fi
name: config_param
- script: python /app/index.py
displayName: Deploy Functions to CDF
env: # You may hardcode certain params here that do not change between functions:
FUNCTION_FOLDER: $(FUNCTION)
DEPLOYMENT_TENANT_ID: "0d75f6b8-c6b9-4e84-baca-503e08aa7e4a"
DEPLOYMENT_CLIENT_ID: "5f18d04a-2d2a-41a2-aa15-bd62a149cd14"
SCHEDULES_TENANT_ID: "0d75f6b8-c6b9-4e84-baca-503e08aa7e4a"
SCHEDULES_CLIENT_ID: "d9b2bd26-2d84-4960-bbdc-ecdd9743975d"
FUNCTION_SECRETS: $(FUNCTION_SECRETS_MASTER)
DEPLOYMENT_CLIENT_SECRET: $(DEPLOY_MASTER)
SCHEDULES_CLIENT_SECRET: $(SCHEDULES_MASTER)
CDF_PROJECT: az-forge-sandbox
CDF_CLUSTER: bluefield
DATA_SET_ID: "7289494538225428"
SCHEDULE_FILE: schedules/$(Build.SourceBranchName).yaml
FUNCTION_EXTERNAL_ID: $(FUNCTION)-$(Build.SourceBranchName)