forked from arkime/arkime
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscrewdriver.yaml
178 lines (169 loc) · 10.3 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
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"
jobs:
centos-6:
requires: [~pr, ~commit]
image: andywick/moloch-build-6:1.6.3
steps:
- ln -s /thirdparty .
- build: scl enable devtoolset-6 python27 "./easybutton-build.sh --daq --pfring"
- 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-6 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 -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:1.6.3
steps:
- ln -s /thirdparty .
- build: ./easybutton-build.sh --daq --pfring
- 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
- export TZ=US/Eastern
- 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
centos-7-sanitize:
requires: [~pr, ~commit]
image: andywick/moloch-build-7:1.6.4
steps:
- ln -s /thirdparty .
- build: scl enable devtoolset-6 "./easybutton-build.sh"
- yum -y install libasan-static devtoolset-6-libasan-devel libasan3 devtoolset-6-libubsan-devel libubsan which java-1.8.0-openjdk-headless
- build-sanitize: (cd capture; scl enable devtoolset-6 "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
- run-es: (cd /elasticsearch-6.3.1 ; su elasticsearch -c "ES_JAVA_OPTS='-Xms700m -Xmx700m' bin/elasticsearch" > /tmp/es &)
- install-for-tests: (cd viewer; npm install ; cd ../capture/plugins/wiseService; npm install)
- 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 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 -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-14:
requires: [~pr, ~commit]
image: andywick/moloch-build-14:1.6.3
steps:
- ln -s /thirdparty .
- build: ./easybutton-build.sh --daq --pfring
- 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 -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:1.6.3
steps:
#- useradd -u 2000 elasticsearch
- ln -s /thirdparty .
- build: ./easybutton-build.sh --daq --pfring
- 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
- install-for-tests: (cd viewer; npm install ; cd ../capture/plugins/wiseService; npm install)
- run-es: (cd /elasticsearch-6.3.1 ; su elasticsearch -c "ES_JAVA_OPTS='-Xms700m -Xmx700m' bin/elasticsearch" > /tmp/es &)
- test-capture: (cd tests ; ./tests.pl)
- sleep 2
- export TZ=US/Eastern
- 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 -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:1.6.3
steps:
- apt-get update
- ln -s /thirdparty .
- build: ./easybutton-build.sh --daq --pfring
- export PATH=/data/moloch/bin:$PATH
- npm -g config set user root
- 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`
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, ubuntu-18]
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