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-
221stepback : true
232command_type : system
243pre_error_fails_task : true
@@ -28,19 +7,13 @@ pre_error_fails_task: true
287ignore :
298 - " *.md"
309 - " *.txt"
31- - " /dist/**"
32- - " /bin/**"
33- - " /third_party_notices/**"
3410
3511variables :
3612 - &go_bin
37- " /opt/golang/go1.13/bin"
38-
13+ " /opt/golang/go1.14/bin"
3914 - &go_options
4015 GO111MODULE : " on"
41- GOFLAGS : " -mod=vendor"
42- GOROOT : " /opt/golang/go1.13"
43-
16+ GOROOT : " /opt/golang/go1.14"
4417functions :
4518 " clone " :
4619 - command : git.get_project
@@ -53,20 +26,34 @@ functions:
5326 params :
5427 add_to_path :
5528 - *go_bin
56- - *go_bin
5729 working_dir : mongocli
5830 env :
5931 WORKDIR : ${workdir}
6032 << : *go_options
6133 command : make build
62- " package " :
63- - command : subprocess .exec
34+ " gen-notices " :
35+ - command : shell .exec
6436 type : setup
6537 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 " :
7057 - command : subprocess.exec
7158 type : setup
7259 params :
@@ -75,9 +62,8 @@ functions:
7562 - ./bin
7663 working_dir : mongocli
7764 env :
78- WORKDIR : ${workdir}
7965 << : *go_options
80- command : make build
66+ command : make package
8167tasks :
8268 - name : compile
8369 commands :
@@ -87,14 +73,15 @@ tasks:
8773 depends_on :
8874 - name : compile
8975 commands :
76+ - func : " clone"
77+ - func : " gen-notices"
78+ - func : " fetch goreleaser"
9079 - func : " package"
9180buildvariants :
92- - name : ubuntu
93- display_name : Ubuntu
81+ - name : redhat
82+ display_name : RHEL7 Test
9483 run_on :
95- - ubuntu1804-test
96- expansions :
97- test_flags : " blah blah"
84+ - rhel70-small
9885 tasks :
9986 - name : compile
10087 - name : package
0 commit comments