forked from arkime/arkime
-
Notifications
You must be signed in to change notification settings - Fork 0
/
screwdriver.yaml
152 lines (143 loc) · 8.08 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
shared:
settings:
slack:
channels:
- moloch
statuses:
- FAILURE
- ABORTED
# annotations:
# beta.screwdriver.cd/cpu: HIGH
# beta.screwdriver.cd/ram: HIGH
environment:
MOLOCH_COPY_BRANCH: "origin/1.0.0"
MOLOCH_FILE_NAME: 1
jobs:
centos-6:
requires: [~pr, ~commit]
image: andywick/moloch-build-6:0.50.1
steps:
- ln -s /thirdparty .
- build: scl enable devtoolset-3 "./easybutton-build.sh"
- export PATH=/data/moloch/bin:$PATH
- installing: scl enable devtoolset-3 "make install"
- cp -r capture/plugins/lua/samples /data/moloch/lua
- test-capture: (cd tests ; ./tests.pl)
- build-package: |
export MOLOCH_VERSION=`sed 's/.*"\(.*\)\".*$/\1/' /data/moloch/viewer/version.js | tr "-" "_"`
if [ "$GIT_BRANCH" = "$MOLOCH_COPY_BRANCH" ]; then
scl enable ruby193 "/opt/rh/ruby193/root/usr/local/bin/fpm -s dir -t rpm -n moloch -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 is the only build to have test-ui because installing chrome dependancies sucks
centos-7:
requires: [~pr, ~commit]
image: andywick/moloch-build-7:0.50.1
steps:
- ln -s /thirdparty .
- build: ./easybutton-build.sh
- export PATH=/data/moloch/bin:$PATH
- installing: make install
- cp -r capture/plugins/lua/samples /data/moloch/lua
- test-capture: (cd tests ; ./tests.pl)
- export TZ=US/Eastern
- test-ui: (cd viewer; npm install ; npm test)
- 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 -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:0.50.1
steps:
- ln -s /thirdparty .
- build: ./easybutton-build.sh
- export PATH=/data/moloch/bin:$PATH
- installing: make install
- cp -r capture/plugins/lua/samples /data/moloch/lua
- test-capture: (cd tests ; ./tests.pl)
- 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 deb -n moloch -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:0.50.1
steps:
- ln -s /thirdparty .
- apt-get update
# - docker: |
# apt-get install -y docker.io
# service docker start
# sleep 1
# docker run -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" docker.elastic.co/elasticsearch/elasticsearch:5.5.3 &
# sleep 1
- build: ./easybutton-build.sh
- export PATH=/data/moloch/bin:$PATH
- installing: make install
- cp -r capture/plugins/lua/samples /data/moloch/lua
- test-capture: (cd tests ; ./tests.pl)
- export TZ=US/Eastern
# - test-viewer: (cd tests ; ./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 deb -n moloch -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:0.50.1
# steps:
# - apt-get update
# - ln -s /thirdparty .
# - build: ./easybutton-build.sh
# - export PATH=/data/moloch/bin:$PATH
# - installing: make install
# - cp -r capture/plugins/lua/samples /data/moloch/lua
## Doesn't seem to work on ubuntu-18 currently
## - test-capture: (cd tests ; ./tests.pl)
# - 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 deb -n moloch -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
slack:
requires: [centos-6, centos-7, ubuntu-14, ubuntu-16]
image: andywick/moloch-build-7:6
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