-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathTaskfile.yml
40 lines (34 loc) · 1.44 KB
/
Taskfile.yml
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
version: '3'
env:
DIST: '{{.DIST | default "dev"}}'
FUNCTION_CODE_PATH: '{{.TASKFILE_DIR}}/lambdas'
FUNCTION_ZIP_DIR: '{{.TASKFILE_DIR}}/.tf-zip-dist'
# uncomment the following line if you want to use default or different AWS profile
# AWS_PROFILE: '{{.AWS_PROFILE | default "cloud-infra"}}'
tasks:
get_lambdas_hash:
cmds:
- ./lambdas_distribution/get_lambdas_hash.sh {{OS}} ${FUNCTION_CODE_PATH}
silent: true
create_lambdas_zip:
cmds:
- ./lambdas_distribution/create_lambdas_zip.sh {{OS}} ${FUNCTION_CODE_PATH} ${FUNCTION_ZIP_DIR}
desc: Generate function app zip
upload_zip:
env:
REGIONS_FILE_DIR: '{{.TASKFILE_DIR}}/supported_regions' # File containing list of supported Azure regions
deps: [create_lambdas_zip]
cmds:
- ./lambdas_distribution/upload_to_regions.sh ${REGIONS_FILE_DIR} ${DIST} {{OS}} ${FUNCTION_CODE_PATH} ${FUNCTION_ZIP_DIR}
desc: Upload zip to multiple Azure Storage accounts
write_lambdas_hash_to_variables:
cmds:
- ./lambdas_distribution/write_function_hash_to_variables.sh {{OS}} ${FUNCTION_CODE_PATH}
create_and_upload_zip:
preconditions:
- sh: "[ $DIST == 'dev' ] || [ $DIST == 'release' ]"
msg: "Valid value for DIST is one of the following: dev, release."
deps: [upload_zip, write_lambdas_hash_to_variables]
cmds:
- echo "Ran distribution for $DIST"
desc: Generate function app zip and upload to Azure Storage accounts