forked from arkime/arkime
-
Notifications
You must be signed in to change notification settings - Fork 0
/
screwdriver.yaml
334 lines (319 loc) · 20.4 KB
/
screwdriver.yaml
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
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
shared:
settings:
slack:
channels:
- moloch
statuses:
- FAILURE
- ABORTED
annotations:
beta.screwdriver.cd/cpu: HIGH
beta.screwdriver.cd/ram: HIGH
environment:
MOLOCH_COPY_BRANCH: "origin/master"
MOLOCH_FILE_NAME: "master"
GIT_SHALLOW_CLONE: false
ASAN_OPTIONS: "fast_unwind_on_malloc=0"
jobs:
centos-6:
requires: [~pr, ~commit]
image: andywick/moloch-build-6:2.1.0
steps:
- (cd / ; curl http://files.molo.ch/snfmin.tar.gz | tar -zxvf -)
- ln -s /thirdparty .
- build: scl enable devtoolset-7 python27 "./easybutton-build.sh --daq --pfring --rminstall"
- test-capture: (cd tests ; ./tests.pl)
- export PATH=/data/moloch/bin:$PATH
- npm -g config set user root; npm -g config set cache-min 9999999
- installing: scl enable devtoolset-7 python27 "make install"
- cp -r capture/plugins/lua/samples /data/moloch/lua
- build-package: |
export MOLOCH_VERSION=`sed 's/.*"\(.*\)\".*$/\1/' /data/moloch/viewer/version.js | tr "-" "_"`
if [ "$GIT_BRANCH" = "$MOLOCH_COPY_BRANCH" ]; then
scl enable rh-ruby23 "/opt/rh/rh-ruby23/root/usr/local/bin/fpm -s dir -t rpm -n moloch -x data/moloch/logs -x data/moloch/raw -v $MOLOCH_VERSION --iteration $SD_BUILD_ID --template-scripts --after-install 'release/afterinstall.sh' --url "http://molo.ch" --description 'Moloch Full Packet System' -d perl-libwww-perl -d perl-JSON -d ethtool -d libyaml-devel /data/moloch"
scl enable python27 "aws s3 cp --quiet moloch*.x86_64.rpm s3://files.molo.ch/moloch-${MOLOCH_FILE_NAME}.centos6.x86_64.rpm --acl public-read"
scl enable python27 "aws s3api put-object-acl --bucket files.molo.ch --key moloch-${MOLOCH_FILE_NAME}.centos6.x86_64.rpm --acl public-read"
fi
secrets:
- AWS_ACCESS_KEY_ID
- AWS_SECRET_ACCESS_KEY
centos-7:
requires: [~pr, ~commit]
image: andywick/moloch-build-7:2.1.0
steps:
- (cd / ; curl http://files.molo.ch/snfmin.tar.gz | tar -zxvf -)
- ln -s /thirdparty .
- build: ./easybutton-build.sh --daq --pfring --rminstall
- test-capture: (cd tests ; ./tests.pl)
- export PATH=/data/moloch/bin:$PATH
- npm -g config set user root; npm -g config set cache-min 9999999
- installing: make install
- cp -r capture/plugins/lua/samples /data/moloch/lua
- build-package: |
export MOLOCH_VERSION=`sed 's/.*"\(.*\)\".*$/\1/' /data/moloch/viewer/version.js | tr "-" "_"`
if [ "$GIT_BRANCH" = "$MOLOCH_COPY_BRANCH" ]; then
fpm -s dir -t rpm -n moloch -x data/moloch/logs -x data/moloch/raw -v $MOLOCH_VERSION --iteration $SD_BUILD_ID --template-scripts --after-install "release/afterinstall.sh" --url "http://molo.ch" --description "Moloch Full Packet System" -d perl-libwww-perl -d perl-JSON -d ethtool -d libyaml-devel /data/moloch
aws s3 cp --quiet moloch*.x86_64.rpm s3://files.molo.ch/moloch-${MOLOCH_FILE_NAME}.centos7.x86_64.rpm --acl public-read
aws s3api put-object-acl --bucket files.molo.ch --key moloch-${MOLOCH_FILE_NAME}.centos7.x86_64.rpm --acl public-read
fi
secrets:
- AWS_ACCESS_KEY_ID
- AWS_SECRET_ACCESS_KEY
# ubuntu-14:
# requires: [~pr, ~commit]
# image: andywick/moloch-build-14:2.1.0
# steps:
# - (cd / ; curl http://files.molo.ch/snfmin.tar.gz | tar -zxvf -)
# - ln -s /thirdparty .
# - build: ./easybutton-build.sh --daq --pfring --rminstall
# - test-capture: (cd tests ; ./tests.pl)
# - export PATH=/data/moloch/bin:$PATH
# - npm -g config set user root; npm -g config set cache-min 9999999
# - installing: make install
# - cp -r capture/plugins/lua/samples /data/moloch/lua
# - build-package: |
# export MOLOCH_VERSION=`sed 's/.*"\(.*\)\".*$/\1/' /data/moloch/viewer/version.js`
# if [ "$GIT_BRANCH" = "$MOLOCH_COPY_BRANCH" ]; then
# fpm -s dir -t deb -n moloch -x data/moloch/logs -x data/moloch/raw -v $MOLOCH_VERSION --iteration $SD_BUILD_ID --template-scripts --after-install "release/afterinstall.sh" --url "http://molo.ch" --description "Moloch Full Packet System" -d libwww-perl -d libjson-perl -d ethtool -d libyaml-dev /data/moloch
# aws s3 cp --quiet moloch*amd64.deb s3://files.molo.ch/moloch-${MOLOCH_FILE_NAME}_ubuntu14_amd64.deb --acl public-read
# aws s3api put-object-acl --bucket files.molo.ch --key moloch-${MOLOCH_FILE_NAME}_ubuntu14_amd64.deb --acl public-read
# fi
# secrets:
# - AWS_ACCESS_KEY_ID
# - AWS_SECRET_ACCESS_KEY
ubuntu-16:
requires: [~pr, ~commit]
image: andywick/moloch-build-16:2.1.0
steps:
- (cd / ; curl http://files.molo.ch/snfmin.tar.gz | tar -zxvf -)
- ln -s /thirdparty .
- build: ./easybutton-build.sh --daq --pfring --rminstall
- export PATH=/data/moloch/bin:$PATH
- npm -g config set user root; npm -g config set cache-min 9999999
- installing: make install
- cp -r capture/plugins/lua/samples /data/moloch/lua
- linting: (cd viewer ; npm run lint)
- install-for-tests: (cd wiseService; npm ci --production)
- run-es: (chown -R elasticsearch /elasticsearch-6.7.0; cd /elasticsearch-6.7.0 ; su elasticsearch -c "ES_JAVA_OPTS='-Xms700m -Xmx700m' bin/elasticsearch" > /tmp/es &)
- test-capture: (cd tests ; ./tests.pl)
- sleep 30
- cat /tmp/es
- test-viewer: (cd tests ; ./tests.pl --viewer)
- build-package: |
export MOLOCH_VERSION=`sed 's/.*"\(.*\)\".*$/\1/' /data/moloch/viewer/version.js`
if [ "$GIT_BRANCH" = "$MOLOCH_COPY_BRANCH" ]; then
fpm -s dir -t deb -n moloch -x data/moloch/logs -x data/moloch/raw -v $MOLOCH_VERSION --iteration $SD_BUILD_ID --template-scripts --after-install "release/afterinstall.sh" --url "http://molo.ch" --description "Moloch Full Packet System" -d libwww-perl -d libjson-perl -d ethtool -d libyaml-dev /data/moloch
aws s3 cp --quiet moloch*amd64.deb s3://files.molo.ch/moloch-${MOLOCH_FILE_NAME}_ubuntu16_amd64.deb --acl public-read
aws s3api put-object-acl --bucket files.molo.ch --key moloch-${MOLOCH_FILE_NAME}_ubuntu16_amd64.deb --acl public-read
fi
secrets:
- AWS_ACCESS_KEY_ID
- AWS_SECRET_ACCESS_KEY
ubuntu-18:
requires: [~pr, ~commit]
image: andywick/moloch-build-18:2.1.0
steps:
- (cd / ; curl http://files.molo.ch/snfmin.tar.gz | tar -zxvf -)
- apt-get update
- ln -s /thirdparty .
- build: ./easybutton-build.sh --daq --pfring --rminstall
- test-capture: (cd tests ; ./tests.pl)
- export PATH=/data/moloch/bin:$PATH
- npm -g config set user root
- installing: make install
- cp -r capture/plugins/lua/samples /data/moloch/lua
- build-package: |
export MOLOCH_VERSION=`sed 's/.*"\(.*\)\".*$/\1/' /data/moloch/viewer/version.js`
if [ "$GIT_BRANCH" = "$MOLOCH_COPY_BRANCH" ]; then
fpm -s dir -t deb -n moloch -x data/moloch/logs -x data/moloch/raw -v $MOLOCH_VERSION --iteration $SD_BUILD_ID --template-scripts --after-install "release/afterinstall.sh" --url "http://molo.ch" --description "Moloch Full Packet System" -d libwww-perl -d libjson-perl -d ethtool -d libyaml-dev /data/moloch
aws s3 cp --quiet moloch*amd64.deb s3://files.molo.ch/moloch-${MOLOCH_FILE_NAME}_ubuntu18_amd64.deb --acl public-read
aws s3api put-object-acl --bucket files.molo.ch --key moloch-${MOLOCH_FILE_NAME}_ubuntu18_amd64.deb --acl public-read
fi
secrets:
- AWS_ACCESS_KEY_ID
- AWS_SECRET_ACCESS_KEY
centos-7-sanitize:
requires: [~pr, ~commit]
image: andywick/moloch-build-7:2.1.0
steps:
- (cd / ; curl http://files.molo.ch/snfmin.tar.gz | tar -zxvf -)
- ln -s /thirdparty .
- build: scl enable devtoolset-7 "./easybutton-build.sh --rminstall"
- yum -y install libasan-static devtoolset-7-libasan-devel libasan4 devtoolset-7-libubsan-devel libubsan which java-1.8.0-openjdk-headless
- build-sanitize: (cd capture; scl enable devtoolset-7 "make SANITIZE_FLAGS='-DMOLOCH_USE_MALLOC -fno-common -fsanitize=address -fsanitize=undefined -fno-omit-frame-pointer' sanitize")
- test-capture: (cd tests ; ./tests.pl)
- export PATH=/data/moloch/bin:$PATH
- npm -g config set user root; npm -g config set cache-min 9999999
- installing: make install
- cp -r capture/plugins/lua/samples /data/moloch/lua
- linting: (cd viewer ; npm run lint)
- run-es: (chown -R elasticsearch /elasticsearch-6.7.0; cd /elasticsearch-6.7.0 ; su elasticsearch -c "ES_JAVA_OPTS='-Xms700m -Xmx700m' bin/elasticsearch" > /tmp/es &)
- install-for-tests: (cd wiseService; npm ci --production)
- sleep 30
- cat /tmp/es
- test-viewer: (cd tests ; G_SLICE=always-malloc ./tests.pl --viewer)
- build-package: |
export MOLOCH_VERSION=`sed 's/.*"\(.*\)\".*$/\1/' /data/moloch/viewer/version.js | tr "-" "_"`
if [ "$GIT_BRANCH" = "$MOLOCH_COPY_BRANCH" ]; then
fpm -s dir -t rpm -n moloch -x data/moloch/logs -x data/moloch/raw -v $MOLOCH_VERSION --iteration $SD_BUILD_ID --template-scripts --after-install "release/afterinstall.sh" --url "http://molo.ch" --description "Moloch Full Packet System" -d perl-libwww-perl -d perl-JSON -d ethtool -d libyaml-devel -d libasan-static /data/moloch
aws s3 cp --quiet moloch*.x86_64.rpm s3://files.molo.ch/sanitize/moloch-${MOLOCH_FILE_NAME}.centos7.x86_64.rpm --acl public-read
aws s3api put-object-acl --bucket files.molo.ch --key sanitize/moloch-${MOLOCH_FILE_NAME}.centos7.x86_64.rpm --acl public-read
fi
secrets:
- AWS_ACCESS_KEY_ID
- AWS_SECRET_ACCESS_KEY
ubuntu-16-sanitize:
requires: [~pr, ~commit]
image: andywick/moloch-build-16:2.1.0
steps:
- (cd / ; curl http://files.molo.ch/snfmin.tar.gz | tar -zxvf -)
- ln -s /thirdparty .
- build: ./easybutton-build.sh --rminstall
- build-sanitize: (cd capture; make SANITIZE_FLAGS='-DMOLOCH_USE_MALLOC -fno-common -fsanitize=address -fsanitize=undefined -fno-omit-frame-pointer' sanitize)
- export PATH=/data/moloch/bin:$PATH
- npm -g config set user root; npm -g config set cache-min 9999999
- installing: make install
- cp -r capture/plugins/lua/samples /data/moloch/lua
- linting: (cd viewer ; npm run lint)
- install-for-tests: (cd wiseService; npm ci --production)
- run-es: (chown -R elasticsearch /elasticsearch-6.7.0; cd /elasticsearch-6.7.0 ; su elasticsearch -c "ES_JAVA_OPTS='-Xms700m -Xmx700m' bin/elasticsearch" > /tmp/es &)
- test-capture: (cd tests ; ./tests.pl)
- sleep 30
- cat /tmp/es
- test-viewer: (cd tests ; G_SLICE=always-malloc ./tests.pl --viewer)
- build-package: |
export MOLOCH_VERSION=`sed 's/.*"\(.*\)\".*$/\1/' /data/moloch/viewer/version.js`
if [ "$GIT_BRANCH" = "$MOLOCH_COPY_BRANCH" ]; then
fpm -s dir -t deb -n moloch -x data/moloch/logs -x data/moloch/raw -v $MOLOCH_VERSION --iteration $SD_BUILD_ID --template-scripts --after-install "release/afterinstall.sh" --url "http://molo.ch" --description "Moloch Full Packet System" -d libwww-perl -d libjson-perl -d ethtool -d libyaml-dev /data/moloch
aws s3 cp --quiet moloch*amd64.deb s3://files.molo.ch/sanitize/moloch-${MOLOCH_FILE_NAME}_ubuntu16_amd64.deb --acl public-read
aws s3api put-object-acl --bucket files.molo.ch --key sanitize/moloch-${MOLOCH_FILE_NAME}_ubuntu16_amd64.deb --acl public-read
fi
secrets:
- AWS_ACCESS_KEY_ID
- AWS_SECRET_ACCESS_KEY
slack:
requires: [centos-6, centos-7, ubuntu-16, ubuntu-18]
image: andywick/moloch-build-7:6
annotations:
beta.screwdriver.cd/cpu: LOW
beta.screwdriver.cd/ram: LOW
steps:
- slack-success: |
export MOLOCH_VERSION=`grep PACKAGE_VERSION= configure | sed "s/.*'\(.*\)'.*$/\1/"`
echo MOLOCH_VERSION: $MOLOCH_VERSION
if [ "$GIT_BRANCH" = "$MOLOCH_COPY_BRANCH" ]; then
MSG=`git log -1 --format=%s`
BODY="{\"icon_emoji\": \":sushi:\", \"username\": \"MolochBuild\", \"text\":\"It worked: $GIT_BRANCH - moloch-$MOLOCH_VERSION-$SD_BUILD_ID - $MSG\"}"
curl -XPOST -H "Content-type: application/json" --data "$BODY" $SLACK
fi
secrets:
- SLACK
release-build:
image: andywick/moloch-build-6:2.1.0
requires: []
annotations:
beta.screwdriver.cd/cpu: LOW
beta.screwdriver.cd/ram: LOW
steps:
- echo "Hi!"
release-centos-6:
requires: [release-build]
image: andywick/moloch-build-6:2.1.0
steps:
- (cd / ; curl http://files.molo.ch/snfmin.tar.gz | tar -zxvf -)
- ln -s /thirdparty .
- build: scl enable devtoolset-7 python27 "./easybutton-build.sh --daq --pfring --rminstall"
- export PATH=/data/moloch/bin:$PWD/node_modules/.bin:$PATH
- npm -g config set user root; npm -g config set cache-min 9999999
- installing: scl enable devtoolset-7 python27 "make install"
- cp -r capture/plugins/lua/samples /data/moloch/lua
- npm install license-checker; release/notice.txt.pl /data/moloch NOTICE release/CAPTURENOTICE > /data/moloch/NOTICE.txt
- build-package: |
export MOLOCH_VERSION=`sed 's/.*"\(.*\)\".*$/\1/' /data/moloch/viewer/version.js | tr "-" "_"`
scl enable rh-ruby23 "/opt/rh/rh-ruby23/root/usr/local/bin/fpm -s dir -t rpm -n moloch -x data/moloch/logs -x data/moloch/raw -v $MOLOCH_VERSION --iteration 1 --template-scripts --after-install 'release/afterinstall.sh' --url "http://molo.ch" --description 'Moloch Full Packet System' -d perl-libwww-perl -d perl-JSON -d ethtool -d libyaml-devel /data/moloch"
scl enable python27 "aws s3 cp moloch-${MOLOCH_VERSION}-1.x86_64.rpm s3://files.molo.ch/builds/centos-6/ --acl public-read"
ls -l *.rpm
secrets:
- AWS_ACCESS_KEY_ID
- AWS_SECRET_ACCESS_KEY
release-centos-7:
requires: [release-build]
image: andywick/moloch-build-7:2.1.0
steps:
- (cd / ; curl http://files.molo.ch/snfmin.tar.gz | tar -zxvf -)
- ln -s /thirdparty .
- build: ./easybutton-build.sh --daq --pfring --rminstall
- export PATH=/data/moloch/bin:$PWD/node_modules/.bin:$PATH
- npm -g config set user root; npm -g config set cache-min 9999999
- installing: make install
- cp -r capture/plugins/lua/samples /data/moloch/lua
- npm install license-checker; release/notice.txt.pl /data/moloch NOTICE release/CAPTURENOTICE > /data/moloch/NOTICE.txt
- build-package: |
export MOLOCH_VERSION=`sed 's/.*"\(.*\)\".*$/\1/' /data/moloch/viewer/version.js | tr "-" "_"`
fpm -s dir -t rpm -n moloch -x data/moloch/logs -x data/moloch/raw -v $MOLOCH_VERSION --iteration 1 --template-scripts --after-install "release/afterinstall.sh" --url "http://molo.ch" --description "Moloch Full Packet System" -d perl-libwww-perl -d perl-JSON -d ethtool -d libyaml-devel /data/moloch
aws s3 cp moloch-${MOLOCH_VERSION}-1.x86_64.rpm s3://files.molo.ch/builds/centos-7/ --acl public-read
ls -l *.rpm
secrets:
- AWS_ACCESS_KEY_ID
- AWS_SECRET_ACCESS_KEY
# release-ubuntu-14:
# requires: [release-build]
# image: andywick/moloch-build-14:2.1.0
# steps:
# - (cd / ; curl http://files.molo.ch/snfmin.tar.gz | tar -zxvf -)
# - ln -s /thirdparty .
# - build: ./easybutton-build.sh --daq --pfring --rminstall
# - export PATH=/data/moloch/bin:$PWD/node_modules/.bin:$PATH
# - npm -g config set user root; npm -g config set cache-min 9999999
# - installing: make install
# - cp -r capture/plugins/lua/samples /data/moloch/lua
# - npm install license-checker; release/notice.txt.pl /data/moloch NOTICE release/CAPTURENOTICE > /data/moloch/NOTICE.txt
# - build-package: |
# export MOLOCH_VERSION=`sed 's/.*"\(.*\)\".*$/\1/' /data/moloch/viewer/version.js`
# fpm -s dir -t deb -n moloch -x data/moloch/logs -x data/moloch/raw -v $MOLOCH_VERSION --iteration 1 --template-scripts --after-install "release/afterinstall.sh" --url "http://molo.ch" --description "Moloch Full Packet System" -d libwww-perl -d libjson-perl -d ethtool -d libyaml-dev /data/moloch
#
# aws s3 cp moloch_${MOLOCH_VERSION}-1_amd64.deb s3://files.molo.ch/builds/ubuntu-14.04/ --acl public-read
# ls -l *.deb
# secrets:
# - AWS_ACCESS_KEY_ID
# - AWS_SECRET_ACCESS_KEY
release-ubuntu-16:
requires: [release-build]
image: andywick/moloch-build-16:2.1.0
steps:
- (cd / ; curl http://files.molo.ch/snfmin.tar.gz | tar -zxvf -)
- ln -s /thirdparty .
- build: ./easybutton-build.sh --daq --pfring --rminstall
- export PATH=/data/moloch/bin:$PWD/node_modules/.bin:$PATH
- npm -g config set user root; npm -g config set cache-min 9999999
- installing: make install
- cp -r capture/plugins/lua/samples /data/moloch/lua
- npm install license-checker; release/notice.txt.pl /data/moloch NOTICE release/CAPTURENOTICE > /data/moloch/NOTICE.txt
- build-package: |
export MOLOCH_VERSION=`sed 's/.*"\(.*\)\".*$/\1/' /data/moloch/viewer/version.js`
fpm -s dir -t deb -n moloch -x data/moloch/logs -x data/moloch/raw -v $MOLOCH_VERSION --iteration 1 --template-scripts --after-install "release/afterinstall.sh" --url "http://molo.ch" --description "Moloch Full Packet System" -d libwww-perl -d libjson-perl -d ethtool -d libyaml-dev /data/moloch
aws s3 cp moloch_${MOLOCH_VERSION}-1_amd64.deb s3://files.molo.ch/builds/ubuntu-16.04/ --acl public-read
ls -l *.deb
secrets:
- AWS_ACCESS_KEY_ID
- AWS_SECRET_ACCESS_KEY
release-ubuntu-18:
requires: [release-build]
image: andywick/moloch-build-18:2.1.0
steps:
- (cd / ; curl http://files.molo.ch/snfmin.tar.gz | tar -zxvf -)
- ln -s /thirdparty .
- build: ./easybutton-build.sh --daq --pfring --rminstall
- export PATH=/data/moloch/bin:$PWD/node_modules/.bin:$PATH
- npm -g config set user root
- installing: make install
- cp -r capture/plugins/lua/samples /data/moloch/lua
- npm install license-checker; release/notice.txt.pl /data/moloch NOTICE release/CAPTURENOTICE > /data/moloch/NOTICE.txt
- build-package: |
export MOLOCH_VERSION=`sed 's/.*"\(.*\)\".*$/\1/' /data/moloch/viewer/version.js`
fpm -s dir -t deb -n moloch -x data/moloch/logs -x data/moloch/raw -v $MOLOCH_VERSION --iteration 1 --template-scripts --after-install "release/afterinstall.sh" --url "http://molo.ch" --description "Moloch Full Packet System" -d libwww-perl -d libjson-perl -d ethtool -d libyaml-dev /data/moloch
aws s3 cp moloch_${MOLOCH_VERSION}-1_amd64.deb s3://files.molo.ch/builds/ubuntu-18.04/ --acl public-read
ls -l *.deb
secrets:
- AWS_ACCESS_KEY_ID
- AWS_SECRET_ACCESS_KEY