forked from arkime/arkime
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscrewdriver.yaml
104 lines (97 loc) · 6.94 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
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:
- use-vault: |
sed --in-place=.orig --regexp-extended 's%# *baseurl=http://mirror.centos.org%baseurl=https://vault.centos.org%g' /etc/yum.repos.d/CentOS-*.repo
sed --in-place --regexp-extended 's%^mirrorlist=%#mirrorlist=%g' /etc/yum.repos.d/CentOS-*.repo
- yum -y install rh-python38
- (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-python38 "./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-python38 '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-python38 "./easybutton-build.sh --daq --kafka --dir /data/moloch"
scl enable devtoolset-9 rh-python38 "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
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:
- use-vault: |
sed --in-place=.orig --regexp-extended 's%# *baseurl=http://mirror.centos.org%baseurl=https://vault.centos.org%g' /etc/yum.repos.d/CentOS-*.repo
sed --in-place --regexp-extended 's%^mirrorlist=%#mirrorlist=%g' /etc/yum.repos.d/CentOS-*.repo
- yum -y install rh-python38
- (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-python38 "./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-python38 '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-python38 "./easybutton-build.sh --daq --kafka --dir /data/moloch"
scl enable devtoolset-9 rh-python38 "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