-
Notifications
You must be signed in to change notification settings - Fork 1k
/
screwdriver.yaml
189 lines (174 loc) · 12.1 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
annotations:
screwdriver.cd/restrictPR: fork
shared:
annotations:
screwdriver.cd/cpu: HIGH
screwdriver.cd/ram: HIGH
environment:
MOLOCH_COPY_BRANCH: "origin/main"
MOLOCH_FILE_NAME: "master"
ARKIME_FILE_NAME: "main"
GIT_SHALLOW_CLONE: false
ASAN_OPTIONS: "fast_unwind_on_malloc=0"
RELEASE_ITERATION: 1
jobs:
centos-7:
requires: [~pr, ~commit]
image: andywick/arkime-build-7:5.0.0-3
steps:
- (cd / ; curl https://raw.githubusercontent.com/arkime/arkime-test-data/main/snfmin.tar.gz | tar -zxvf -)
- ln -s /thirdparty .
- build: scl enable devtoolset-9 rh-python36 "./easybutton-build.sh --daq --kafka --rminstall"
- test-capture: (cd tests ; ./tests.pl)
- export PATH=/opt/arkime/bin:/data/moloch/bin:$PATH
- installing: scl enable devtoolset-9 rh-python36 'make install'
- linting: npm run lint
- cp -r capture/plugins/lua/samples /opt/arkime/lua
- build-package: |
export ARKIME_VERSION=`sed 's/.*"\(.*\)\".*$/\1/' /opt/arkime/common/version.js | head -n 1 | tr "-" "_" `
scl enable rh-ruby26 'fpm -s dir -t rpm -n arkime -x opt/arkime/logs -x opt/arkime/raw -v $ARKIME_VERSION --iteration $SD_BUILD_ID --template-scripts --after-install "release/afterinstall.sh" --url "https://arkime.com" --description "Arkime Full Packet System" -d perl-libwww-perl -d perl-JSON -d ethtool -d libyaml-devel -d perl-LWP-Protocol-https /opt/arkime'
if [ "$GIT_BRANCH" = "$MOLOCH_COPY_BRANCH" ]; then
scl enable devtoolset-9 rh-python36 'aws s3 cp arkime*.x86_64.rpm s3://files.molo.ch/arkime-${ARKIME_FILE_NAME}.centos7.x86_64.rpm --acl public-read'
scl enable devtoolset-9 rh-python36 'aws s3api put-object-acl --bucket files.molo.ch --key arkime-${ARKIME_FILE_NAME}.centos7.x86_64.rpm --acl public-read'
fi
mv arkime*.rpm arkime-main.el7.x86_64.rpm
- build-moloch-package: |
rm -rf /data/moloch; mkdir -p /data
mv /opt/arkime /data/moloch
scl enable devtoolset-9 rh-python36 "./easybutton-build.sh --daq --kafka --dir /data/moloch"
scl enable devtoolset-9 rh-python36 "cd capture ; make clean; make; make install"
(cd release ; make installmoloch)
mv /data/moloch/bin/capture /data/moloch/bin/moloch-capture
/bin/cp -f common/version.js /data/moloch/common/
scl enable rh-ruby26 'fpm -s dir -t rpm -n moloch -x data/moloch/logs -x data/moloch/raw -v $ARKIME_VERSION --iteration $SD_BUILD_ID --template-scripts --url "https://arkime.com" --description "Moloch Full Packet System" -d perl-libwww-perl -d perl-JSON -d ethtool -d libyaml-devel -d perl-LWP-Protocol-https /data/moloch'
if [ "$GIT_BRANCH" = "$MOLOCH_COPY_BRANCH" ]; then
scl enable devtoolset-9 rh-python36 'aws s3 cp moloch*.x86_64.rpm s3://files.molo.ch/moloch-${MOLOCH_FILE_NAME}.centos7.x86_64.rpm --acl public-read'
scl enable devtoolset-9 rh-python36 'aws s3api put-object-acl --bucket files.molo.ch --key moloch-${MOLOCH_FILE_NAME}.centos7.x86_64.rpm --acl public-read'
fi
mv moloch*.rpm moloch-main.el7.x86_64.rpm
- install-arkime: yum -y install arkime*.x86_64.rpm
secrets:
- AWS_ACCESS_KEY_ID
- AWS_SECRET_ACCESS_KEY
ubuntu-18:
requires: [~pr,~commit]
image: andywick/arkime-build-18:5.0.0-2
steps:
- (cd / ; curl https://raw.githubusercontent.com/arkime/arkime-test-data/main/snfmin.tar.gz | tar -zxvf -)
- apt-get update
- ln -s /thirdparty .
- build: ./easybutton-build.sh --daq --pfring --kafka --rminstall
- test-capture: (cd tests ; ./tests.pl)
- export PATH=/opt/arkime/bin:/data/moloch/bin:$PATH
- installing: make install
- linting: npm run lint
- cp -r capture/plugins/lua/samples /opt/arkime/lua
- build-package: |
export ARKIME_VERSION=`sed 's/.*"\(.*\)\".*$/\1/' /opt/arkime/common/version.js | head -n 1`
fpm -s dir -t deb -n arkime -x opt/arkime/logs -x opt/arkime/raw -v $ARKIME_VERSION --iteration $SD_BUILD_ID --template-scripts --after-install "release/afterinstall.sh" --url "https://arkime.com" --description "Arkime Full Packet System" -d libwww-perl -d libjson-perl -d ethtool -d libyaml-dev /opt/arkime
if [ "$GIT_BRANCH" = "$MOLOCH_COPY_BRANCH" ]; then
aws s3 cp --quiet arkime*amd64.deb s3://files.molo.ch/arkime-${ARKIME_FILE_NAME}_ubuntu18_amd64.deb --acl public-read
aws s3api put-object-acl --bucket files.molo.ch --key arkime-${ARKIME_FILE_NAME}_ubuntu18_amd64.deb --acl public-read
fi
mv arkime*.deb arkime-main_ubuntu1804_amd64.deb
- build-moloch-package: |
rm -rf /data/moloch; mkdir -p /data
mv /opt/arkime /data/moloch
./easybutton-build.sh --daq --pfring --kafka --dir /data/moloch
(cd capture ; make clean; make; make install)
(cd release ; make installmoloch)
mv /data/moloch/bin/capture /data/moloch/bin/moloch-capture
/bin/cp -f common/version.js /data/moloch/common/
fpm -s dir -t deb -n moloch -x data/moloch/logs -x data/moloch/raw -v $ARKIME_VERSION --iteration $SD_BUILD_ID --template-scripts --url "https://arkime.com" --description "Moloch Full Packet System" -d libwww-perl -d libjson-perl -d ethtool -d libyaml-dev /data/moloch
if [ "$GIT_BRANCH" = "$MOLOCH_COPY_BRANCH" ]; then
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
mv moloch*.deb moloch-main_ubuntu1804_amd64.deb
secrets:
- AWS_ACCESS_KEY_ID
- AWS_SECRET_ACCESS_KEY
slack:
requires: [centos-7, ubuntu-18]
image: andywick/arkime-build-7:5.0.0-2
annotations:
beta.screwdriver.cd/cpu: LOW
beta.screwdriver.cd/ram: LOW
steps:
- slack-success: |
export ARKIME_VERSION=`grep AC_INIT configure.ac | sed "s/.*\[\(.*\)\].*$/\1/"`
echo ARKIME_VERSION: $ARKIME_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 - arkime-$ARKIME_VERSION-$SD_BUILD_ID - $MSG\"}"
curl -XPOST -H "Content-type: application/json" --data "$BODY" $SLACK
fi
secrets:
- SLACK
release-build:
image: andywick/arkime-build-7:5.0.0-3
requires: []
annotations:
beta.screwdriver.cd/cpu: LOW
beta.screwdriver.cd/ram: LOW
steps:
- echo "Hi!"
release-centos-7:
requires: [release-build]
image: andywick/arkime-build-7:5.0.0-3
steps:
- (cd / ; curl https://raw.githubusercontent.com/arkime/arkime-test-data/main/snfmin.tar.gz | tar -zxvf -)
- ln -s /thirdparty .
- build: scl enable devtoolset-9 rh-python36 "./easybutton-build.sh --daq --kafka --rminstall"
- export PATH=/opt/arkime/bin:/data/moloch/bin:$PATH:$PWD/node_modules/.bin
- installing: scl enable devtoolset-9 rh-python36 'make install'
- cp -r capture/plugins/lua/samples /opt/arkime/lua
- npm install license-checker; release/notice.txt.pl /opt/arkime NOTICE release/CAPTURENOTICE > /opt/arkime/NOTICE.txt
- build-package: |
export ARKIME_VERSION=`sed 's/.*"\(.*\)\".*$/\1/' /opt/arkime/common/version.js | head -n 1 | tr "-" "_" `
scl enable rh-ruby26 'fpm -s dir -t rpm -n arkime -x opt/arkime/logs -x opt/arkime/raw -v $ARKIME_VERSION --iteration $RELEASE_ITERATION --template-scripts --after-install "release/afterinstall.sh" --url "https://arkime.com" --description "Arkime Full Packet System" -d perl-libwww-perl -d perl-JSON -d ethtool -d libyaml-devel -d perl-LWP-Protocol-https /opt/arkime'
scl enable devtoolset-9 rh-python36 'aws s3 cp arkime-${ARKIME_VERSION}-${RELEASE_ITERATION}.x86_64.rpm s3://files.molo.ch/builds/centos-7/ --acl public-read'
- build-moloch-package: |
rm -rf /data/moloch; mkdir -p /data
mv /opt/arkime /data/moloch
scl enable devtoolset-9 rh-python36 "./easybutton-build.sh --daq --kafka --dir /data/moloch"
scl enable devtoolset-9 rh-python36 "cd capture ; make clean; make; make install"
(cd release ; make installmoloch)
mv /data/moloch/bin/capture /data/moloch/bin/moloch-capture
/bin/cp -f common/version.js /data/moloch/common/
scl enable rh-ruby26 'fpm -s dir -t rpm -n moloch -x data/moloch/logs -x data/moloch/raw -v $ARKIME_VERSION --iteration $RELEASE_ITERATION --template-scripts --url "https://arkime.com" --description "Moloch Full Packet System" -d perl-libwww-perl -d perl-JSON -d ethtool -d libyaml-devel -d perl-LWP-Protocol-https /data/moloch'
scl enable devtoolset-9 rh-python36 'aws s3 cp moloch-${ARKIME_VERSION}-${RELEASE_ITERATION}.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-18:
requires: [release-build]
image: andywick/arkime-build-18:5.0.0-2
steps:
- (cd / ; curl https://raw.githubusercontent.com/arkime/arkime-test-data/main/snfmin.tar.gz | tar -zxvf -)
- apt-get update
- ln -s /thirdparty .
- build: ./easybutton-build.sh --daq --pfring --kafka --rminstall
- export PATH=/opt/arkime/bin:/data/moloch/bin:$PATH:$PWD/node_modules/.bin
- installing: make install
- cp -r capture/plugins/lua/samples /opt/arkime/lua
- npm install license-checker; release/notice.txt.pl /opt/arkime NOTICE release/CAPTURENOTICE > /opt/arkime/NOTICE.txt
- build-package: |
export ARKIME_VERSION=`sed 's/.*"\(.*\)\".*$/\1/' /opt/arkime/common/version.js | head -n 1`
fpm -s dir -t deb -n arkime -x opt/arkime/logs -x opt/arkime/raw -v $ARKIME_VERSION --iteration $RELEASE_ITERATION --template-scripts --after-install "release/afterinstall.sh" --url "https://arkime.com" --description "Arkime Full Packet System" -d libwww-perl -d libjson-perl -d ethtool -d libyaml-dev /opt/arkime
aws s3 cp arkime_${ARKIME_VERSION}-${RELEASE_ITERATION}_amd64.deb s3://files.molo.ch/builds/ubuntu-18.04/ --acl public-read
- build-moloch-package: |
rm -rf /data/moloch; mkdir -p /data
mv /opt/arkime /data/moloch
./easybutton-build.sh --daq --pfring --kafka --dir /data/moloch
(cd capture ; make clean; make; make install)
(cd release ; make installmoloch)
mv /data/moloch/bin/capture /data/moloch/bin/moloch-capture
/bin/cp -f common/version.js /data/moloch/common/
fpm -s dir -t deb -n moloch -x data/moloch/logs -x data/moloch/raw -v $ARKIME_VERSION --iteration $RELEASE_ITERATION --template-scripts --url "https://arkime.com" --description "Moloch Full Packet System" -d libwww-perl -d libjson-perl -d ethtool -d libyaml-dev /data/moloch
aws s3 cp moloch_${ARKIME_VERSION}-${RELEASE_ITERATION}_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