@@ -29,19 +29,16 @@ functions:
29
29
<< : *go_options
30
30
command : make build
31
31
" test " :
32
- - command : shell .exec
32
+ - command : subprocess .exec
33
33
type : test
34
34
params :
35
+ add_to_path :
36
+ - ${go_bin}
35
37
working_dir : src/github.com/mongodb/mongocli
36
- script : |
37
- set -o xtrace
38
- set -o errexit
39
- set -o verbose
40
-
41
- export GOROOT="${go_root}"
42
- export PATH="./bin:$GOROOT/bin:$PATH"
43
-
44
- gotestsum --junitfile unit-tests.xml -- -race -cover -count=1 -coverprofile coverage.out ./internal...
38
+ env :
39
+ TEST_CMD : gotestsum --junitfile unit-tests.xml --
40
+ << : *go_options
41
+ command : make test
45
42
" generate html coverage " :
46
43
- command : subprocess.exec
47
44
type : test
@@ -77,7 +74,7 @@ functions:
77
74
MCLI_PRIVATE_API_KEY : ${atlas_private_api_key}
78
75
MCLI_PUBLIC_API_KEY : ${atlas_public_api_key}
79
76
MCLI_SERVICE : cloud
80
- E2E_CMD : gotestsum --junitfile e2e-tests.xml --
77
+ TEST_CMD : gotestsum --junitfile e2e-tests.xml --
81
78
E2E_TAGS : e2e,atlas
82
79
<< : *go_options
83
80
command : make e2e-test
@@ -95,7 +92,7 @@ functions:
95
92
MCLI_PRIVATE_API_KEY : ${cloud_manager_private_api_key}
96
93
MCLI_PUBLIC_API_KEY : ${cloud_manager_public_api_key}
97
94
MCLI_SERVICE : cloud-manager
98
- E2E_CMD : gotestsum --junitfile e2e-tests.xml --
95
+ TEST_CMD : gotestsum --junitfile e2e-tests.xml --
99
96
E2E_TAGS : e2e,cloudmanager
100
97
<< : *go_options
101
98
command : make e2e-test
@@ -105,9 +102,7 @@ functions:
105
102
params :
106
103
working_dir : src/github.com/mongodb/mongocli
107
104
script : |
108
- set -o xtrace
109
- set -o errexit
110
- set -o verbose
105
+ set -Eeou pipefail
111
106
112
107
export GOROOT="${go_root}"
113
108
export PATH="./bin:$GOROOT/bin:$PATH"
@@ -118,11 +113,9 @@ functions:
118
113
params :
119
114
working_dir : src/github.com/mongodb/mongocli/bin
120
115
script : |
121
- set -o xtrace
122
- set -o errexit
123
- set -o verbose
116
+ set -Eeou pipefail
124
117
125
- curl -sfL https://github.com/gotestyourself/gotestsum/releases/download/v0.4.2/gotestsum_0.4.2_linux_amd64 .tar.gz | tar zx
118
+ curl -sfL https://github.com/gotestyourself/gotestsum/releases/download/v${gotestsum_ver}/gotestsum_${gotestsum_ver}_linux_amd64 .tar.gz | tar zx
126
119
" install golangci-lint " :
127
120
- command : subprocess.exec
128
121
type : setup
@@ -135,20 +128,16 @@ functions:
135
128
params :
136
129
working_dir : src/github.com/mongodb/mongocli/bin
137
130
script : |
138
- set -o xtrace
139
- set -o errexit
140
- set -o verbose
131
+ set -Eeou pipefail
141
132
142
- curl -sL https://github.com/mitchellh/gon/releases/download/v0.2.3 /gon_macos.zip | tar zx
133
+ curl -sL https://github.com/mitchellh/gon/releases/download/v${gon_ver} /gon_macos.zip | tar zx
143
134
" install goreleaser " :
144
135
- command : shell.exec
145
136
type : setup
146
137
params :
147
138
working_dir : src/github.com/mongodb/mongocli
148
139
script : |
149
- set -o xtrace
150
- set -o errexit
151
- set -o verbose
140
+ set -Eeou pipefail
152
141
153
142
curl -sfL https://install.goreleaser.com/github.com/goreleaser/goreleaser.sh | sh
154
143
" install curator " :
@@ -157,9 +146,7 @@ functions:
157
146
params :
158
147
working_dir : src/github.com/mongodb/mongocli
159
148
script : |
160
- set -o xtrace
161
- set -o errexit
162
- set -o verbose
149
+ set -Eeou pipefail
163
150
164
151
curl -sL http://boxes.10gen.com/build/curator/curator-dist-rhel70-${curator_release|"latest"}.tar.gz | tar zx
165
152
" set up gon " :
@@ -225,9 +212,7 @@ functions:
225
212
params :
226
213
working_dir : src/github.com/mongodb/mongocli
227
214
script : |
228
- set -o errexit
229
- set -o xtrace
230
- set -o verbose
215
+ set -Eeou pipefail
231
216
# notarization and signing can only happen in a session with access to the GUI, so we use ssh to it
232
217
ssh -v -p 2222 localhost "bash ~/mongocli_package.sh"
233
218
" install go-msi " :
@@ -248,9 +233,7 @@ functions:
248
233
params :
249
234
working_dir : src/github.com/mongodb/mongocli
250
235
script : |
251
- set -o xtrace
252
- set -o errexit
253
- set -o verbose
236
+ set -Eeou pipefail
254
237
255
238
export GOROOT="${go_root}"
256
239
export GOCACHE="$(cygpath --mixed "${workdir}\.gocache")"
@@ -273,9 +256,7 @@ functions:
273
256
params :
274
257
working_dir : src/github.com/mongodb/mongocli/dist
275
258
script : |
276
- set -o xtrace
277
- set -o errexit
278
- set -o verbose
259
+ set -Eeou pipefail
279
260
280
261
VERSION=$(git describe --abbrev=0 | cut -d "v" -f 2)
281
262
FILENAME=mongocli_"$VERSION"_linux_x86_64
@@ -295,9 +276,7 @@ functions:
295
276
params :
296
277
working_dir : src/github.com/mongodb/mongocli/dist
297
278
script : |
298
- set -o xtrace
299
- set -o errexit
300
- set -o verbose
279
+ set -Eeou pipefail
301
280
302
281
export GOROOT="${go_root}"
303
282
export PATH="./bin:${go_bin}:$PATH"
@@ -330,9 +309,7 @@ functions:
330
309
script : |
331
310
. ./notary_env.sh
332
311
333
- set -o xtrace
334
- set -o errexit
335
- set -o verbose
312
+ set -Eeou pipefail
336
313
337
314
# --version needs to match the mongodb server version to publish to the right repo
338
315
# 4.X goes to the 4.x repo
0 commit comments