1
- # ####################################################
2
- # A note on expansions #
3
- # ####################################################
4
-
5
- # Expansions usually appear in the form ${key|default}
6
- # If 'key' is found in the executor's map of currently known
7
- # expansions, the corresponding value is used. If the key can
8
- # not be found, the default is used.
9
- #
10
- # Arbitrary expansions can be specified in the YAML configuration
11
- # files in the following places:
12
- # - The 'expansions' field for buildvariants (branch file)
13
- # - The 'expansions' field for distros (distros file)
14
- #
15
- # A number of 'built-in' expansions are also available for use; these include:
16
- # - environment variables available on the host machine
17
- # - 'workdir' (references the executor's work directory).
18
- # - 'task_id' (references the task id of the task the executor is working on).
19
- # - 'build_variant' (references the executing task's buildvariant).
20
- # - 'config_root' (references the root directory for the executor's configuration artifacts).
21
-
22
1
stepback : true
23
2
command_type : system
24
3
pre_error_fails_task : true
@@ -28,19 +7,13 @@ pre_error_fails_task: true
28
7
ignore :
29
8
- " *.md"
30
9
- " *.txt"
31
- - " /dist/**"
32
- - " /bin/**"
33
- - " /third_party_notices/**"
34
10
35
11
variables :
36
12
- &go_bin
37
- " /opt/golang/go1.13/bin"
38
-
13
+ " /opt/golang/go1.14/bin"
39
14
- &go_options
40
15
GO111MODULE : " on"
41
- GOFLAGS : " -mod=vendor"
42
- GOROOT : " /opt/golang/go1.13"
43
-
16
+ GOROOT : " /opt/golang/go1.14"
44
17
functions :
45
18
" clone " :
46
19
- command : git.get_project
@@ -53,20 +26,34 @@ functions:
53
26
params :
54
27
add_to_path :
55
28
- *go_bin
56
- - *go_bin
57
29
working_dir : mongocli
58
30
env :
59
31
WORKDIR : ${workdir}
60
32
<< : *go_options
61
33
command : make build
62
- " package " :
63
- - command : subprocess .exec
34
+ " gen-notices " :
35
+ - command : shell .exec
64
36
type : setup
65
37
params :
66
- env :
67
- WORKDIR : ${workdir}
68
- << : *go_options
69
- command : " curl -sfL https://install.goreleaser.com/github.com/goreleaser/goreleaser.sh | sh"
38
+ working_dir : mongocli
39
+ script : |
40
+ set -ex
41
+ export GOROOT="/opt/golang/go1.14"
42
+ mkdir go-licenses
43
+ export GOPATH=${workdir}/go-licenses
44
+ export PATH="$GOPATH/bin:$GOROOT/bin:$PATH"
45
+
46
+ go get -u github.com/google/go-licenses
47
+ go-licenses save "github.com/mongodb/mongocli" --save_path=third_party_notices
48
+ " fetch goreleaser " :
49
+ - command : shell.exec
50
+ type : setup
51
+ params :
52
+ working_dir : mongocli
53
+ script : |
54
+ set -ex
55
+ curl -sfL https://install.goreleaser.com/github.com/goreleaser/goreleaser.sh | sh
56
+ " package " :
70
57
- command : subprocess.exec
71
58
type : setup
72
59
params :
@@ -75,9 +62,8 @@ functions:
75
62
- ./bin
76
63
working_dir : mongocli
77
64
env :
78
- WORKDIR : ${workdir}
79
65
<< : *go_options
80
- command : make build
66
+ command : make package
81
67
tasks :
82
68
- name : compile
83
69
commands :
@@ -87,14 +73,15 @@ tasks:
87
73
depends_on :
88
74
- name : compile
89
75
commands :
76
+ - func : " clone"
77
+ - func : " gen-notices"
78
+ - func : " fetch goreleaser"
90
79
- func : " package"
91
80
buildvariants :
92
- - name : ubuntu
93
- display_name : Ubuntu
81
+ - name : redhat
82
+ display_name : RHEL7 Test
94
83
run_on :
95
- - ubuntu1804-test
96
- expansions :
97
- test_flags : " blah blah"
84
+ - rhel70-small
98
85
tasks :
99
86
- name : compile
100
87
- name : package
0 commit comments