-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathfunctionVar.yml
55 lines (52 loc) · 1.47 KB
/
functionVar.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
unset_function_vars: true
## hi
#######################################
# Functions #
#######################################
functions:
test-vars:
- command: shell.exec
params:
script: |
echo "value of foo in function before expansion.update '${foo}'"
echo "expected: function-var"
- command: expansions.update
params:
updates:
- key: foo
value: ${foo}
- command: shell.exec
params:
script: |
echo "value of foo in function after expansions.update '${foo}'"
echo "expected: function-var"
#######################################
# Tasks #
#######################################
tasks:
- name: my-task
commands:
- command: shell.exec
params:
script: |
echo "value of foo in task before the function ran '${foo}'"
echo "expected: undefined"
- func: test-vars
vars:
foo: "function-var"
- command: shell.exec
params:
script: |
echo "value of foo in task after the function ran '${foo}'"
echo "expected: function-var"
#######################################
# Buildvariants #
#######################################
buildvariants:
- name: build-variant
display_name: Build Variant
run_on:
- ubuntu2204-small
- ubuntu2204-large
tasks:
- name: my-task