forked from evergreen-ci/logkeeper
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.evg.yml
201 lines (185 loc) · 5.48 KB
/
.evg.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
command_type: system
ignore:
- "*.py"
- "*.sh"
- "*.md"
variables:
- &run-test
name: test
commands:
- command: git.get_project
type: system
params:
directory: gopath/src/github.com/evergreen-ci/logkeeper
- func: run-make
vars: { target: "${task_name}" }
- &run-test-mongodb
# runs a make target above, but only on systems that have a
# running mongod started for testing.
name: test
commands:
- command: git.get_project
type: system
params:
directory: gopath/src/github.com/evergreen-ci/logkeeper
- func: set-up-mongodb
- func: run-make
vars: { target: "${task_name}" }
functions:
run-make:
command: shell.exec
type: test
params:
script: |
set -o errexit
set -o verbose
# Configure a local go path for this build.
export GOPATH=`pwd`/gopath
# on windows we need to turn the slashes the other way
if [ "Windows_NT" == "$OS" ]; then
export GOPATH=$(cygpath -m $GOPATH)
fi
cd gopath/src/github.com/evergreen-ci/logkeeper
# Run make, called with proper environment variables set,
# running the target.
${build_env} make ${make_args|} vendor ${target}
set-up-mongodb:
- command: shell.exec
type: setup
params:
script: |
set -o errexit
set -o verbose
rm -rf mongodb
mkdir mongodb
cd mongodb
curl ${mongodb_url} -o mongodb${archiveExt|.tgz}
${decompress} mongodb${archiveExt|.tgz}
chmod +x ./mongodb-*/bin/*
mv ./mongodb-*/bin/* .
rm -rf db_files
rm -rf db_logs
mkdir db_files
mkdir db_logs
- command: shell.exec
type: setup
params:
background: true
script: |
set -o errexit
set -o verbose
cd mongodb
echo "starting mongod..."
./mongod${extension|} --dbpath ./db_files &
echo "waiting for mongod to start up"
- command: shell.exec
type: setup
params:
script: |
set -o errexit
set -o verbose
cd mongodb
./mongo${extension|} --nodb --eval 'assert.soon(function(x){try{var d = new Mongo("localhost:27017"); return true}catch(e){return false}}, "timed out connecting")'
echo "mongod is up."
tasks:
- name: dist
tags: ["dist"]
commands:
- command: git.get_project
type: system
params:
directory: gopath/src/github.com/evergreen-ci/logkeeper
- func: run-make
vars: { target: "dist" }
- command: s3.put
type: system
params:
aws_key: ${aws_key}
aws_secret: ${aws_secret}
local_file: gopath/src/github.com/evergreen-ci/logkeeper/build/${task_name}.tar.gz
remote_file: logkeeper/${build_id}-${build_variant}/logkeeper-${task_name}-${revision}.tar.gz
bucket: mciuploads
content_type: application/x-gzip
permissions: public-read
display_name: dist.tar.gz
- name: coverage
tags: [ "report" ]
commands:
- command: git.get_project
type: system
params:
directory: gopath/src/github.com/evergreen-ci/logkeeper
- func: set-up-mongodb
- func: run-make
vars:
target: "coverage-html"
make_args: "-k"
- command: s3.put
type: system
params:
aws_key: ${aws_key}
aws_secret: ${aws_secret}
local_files_include_filter: ["gopath/src/github.com/evergreen-ci/logkeeper/bin/output.*.coverage.html"]
remote_file: logkeeper/${task_id}/
bucket: mciuploads
content_type: text/html
permissions: public-read
display_name: "(html) coverage:"
- command: s3.put
type: system
params:
aws_key: ${aws_key}
aws_secret: ${aws_secret}
local_files_include_filter: ["gopath/src/github.com/evergreen-ci/logkeeper/bin/output.*.coverage"]
remote_file: logkeeper/${task_id}/
bucket: mciuploads
content_type: text/plain
permissions: public-read
display_name: "(txt) coverage:"
- <<: *run-test
name: lint
tags: ["report"]
- <<: *run-test-mongodb
name: test-logkeeper
exec_timeout_secs: 900
tags: ["test"]
- <<: *run-test-mongodb
name: race-logkeeper
exec_timeout_secs: 900
tags: ["race"]
post:
- command: gotest.parse_files
type: setup
params:
files:
- "gopath/src/github.com/evergreen-ci/logkeeper/build/output.*"
buildvariants:
- name: rhel70
display_name: RHEL 7.0
expansions:
build_env: "GOROOT=/opt/go1.8/go PATH=/opt/go1.8/go/bin:$PATH"
mongodb_url: http://fastdl.mongodb.org/linux/mongodb-linux-x86_64-3.2.6.tgz
run_on:
- rhel70-small
tasks:
- ".dist"
- ".test"
- name: race-detector
display_name: Race Detector (Arch Linux)
expansions:
mongodb_url: http://fastdl.mongodb.org/linux/mongodb-linux-x86_64-3.2.6.tgz
run_on:
- archlinux-test
tasks:
- ".race"
- ".report"
- name: macos
display_name: macOS 10.12
expansions:
build_env: "GOROOT=/usr/local/go1.8/go PATH=/usr/local/go1.8/go/bin:$PATH"
mongodb_url: http://fastdl.mongodb.org/osx/mongodb-osx-x86_64-3.2.6.tgz
run_on:
- macos-1012
tasks:
- ".dist"
- ".test"