Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Sympl
Sympl
Commits
cff733c1
Commit
cff733c1
authored
Feb 07, 2022
by
Paul Cammish
Browse files
Improve CI performance
parent
8f3dfa94
Changes
3
Pipelines
4
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
View file @
cff733c1
stages
:
-
Package
-
Publish
-
Install
-
Upgrade
-
Test
# This will run through the packages one at a time, building them into artifacts
# This uses the kelduum/sympl-build:v1 docker image, which is Debian Stretch with
...
...
@@ -97,7 +96,7 @@ Build Repo:
Clean Install
:
tags
:
-
vbox:bullseye
stage
:
Install
stage
:
Test
script
:
-
chmod -x $( which gitlab-runner )
-
echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
...
...
@@ -120,18 +119,20 @@ Clean Install:
-
repo/*
expire_in
:
1 hour
Upgrade
Testing
:
Upgrade
Stable
:
tags
:
-
vbox:bullseye
stage
:
Upgrade
stage
:
Test
script
:
-
chmod -x $( which gitlab-runner )
-
git describe --all
-
autotest/install_then_upgrade bullseye
-testing
-
autotest/install_then_upgrade bullseye
-
run-parts --verbose --exit-on-error autotest/test.d
-
hostname
-
dpkg -l 'sympl*'
allow_failure
:
false
when
:
delayed
start_in
:
30 seconds
variables
:
CI_DEBUG_TRACE
:
"
false"
artifacts
:
...
...
@@ -139,23 +140,24 @@ Upgrade Testing:
-
repo/*
expire_in
:
1 hour
Upgrade
Stable
:
Upgrade
Testing
:
tags
:
-
vbox:bullseye
stage
:
Upgrade
stage
:
Test
script
:
-
chmod -x $( which gitlab-runner )
-
git describe --all
-
autotest/install_then_upgrade bullseye
-
autotest/install_then_upgrade bullseye
-testing
-
run-parts --verbose --exit-on-error autotest/test.d
-
hostname
-
dpkg -l 'sympl*'
allow_failure
:
false
when
:
delayed
start_in
:
5
minute
s
start_in
:
1
minute
variables
:
CI_DEBUG_TRACE
:
"
false"
artifacts
:
paths
:
-
repo/*
expire_in
:
1 hour
autotest/test.d/01-setup
View file @
cff733c1
...
...
@@ -21,51 +21,52 @@ touch /srv/$(hostname -f)/config/antivirus
systemctl unmask clamav-freshclam
service clamav-freshclam stop
rm
-rf
/run/clamav
service clamav-freshclam start
sleep
3
echo
-n
"I: Waiting for clamav to download databases."
for
i
in
$(
seq
1 100
)
;
do
if
[
-f
"/var/lib/clamav/main.cvd"
-o
-f
"/var/lib/clamav/main.cld"
]
;
then
echo
-n
' 1/3 '
break
fi
echo
-n
"."
sleep
1
done
for
i
in
$(
seq
1 100
)
;
do
if
[
-f
"/var/lib/clamav/daily.cvd"
-o
-f
"/var/lib/clamav/daily.cld"
]
;
then
echo
-n
' 2/3 '
break
fi
echo
-n
"."
sleep
1
done
for
i
in
$(
seq
1 100
)
;
do
if
[
-f
"/var/lib/clamav/bytecode.cvd"
-o
-f
"/var/lib/clamav/bytecode.cld"
]
;
then
echo
" 3/3 done."
invoke-rc.d clamav-daemon restart
break
fi
echo
-n
"."
sleep
1
done
#
service clamav-freshclam start
#
#
sleep 3
#
#
echo -n "I: Waiting for clamav to download databases."
#
for i in $(seq 1 100) ; do
#
if [ -f "/var/lib/clamav/main.cvd" -o -f "/var/lib/clamav/main.cld" ] ; then
#
echo -n ' 1/3 '
#
break
#
fi
#
echo -n "."
#
sleep 1
#
done
#
for i in $(seq 1 100) ; do
#
if [ -f "/var/lib/clamav/daily.cvd" -o -f "/var/lib/clamav/daily.cld" ] ; then
#
echo -n ' 2/3 '
#
break
#
fi
#
echo -n "."
#
sleep 1
#
done
#
for i in $(seq 1 100) ; do
#
if [ -f "/var/lib/clamav/bytecode.cvd" -o -f "/var/lib/clamav/bytecode.cld" ] ; then
#
echo " 3/3 done."
#
invoke-rc.d clamav-daemon restart
#
break
#
fi
#
echo -n "."
#
sleep 1
#
done
# horrible hack
if
[
-f
"/var/lib/clamav/bytecode.cvd"
-o
-f
"/var/lib/clamav/bytecode.cld"
]
&&
[
-f
"/var/lib/clamav/daily.cvd"
-o
-f
"/var/lib/clamav/daily.cld"
]
&&
[
-f
"/var/lib/clamav/main.cvd"
-o
-f
"/var/lib/clamav/main.cld"
]
;
then
echo
"We have what look to be valid definitions..."
else
echo
"Failed to download clamAV definitions, going to fallback."
cd
/var/lib/clamav/
wget
-qO
clamav.tar.gz http://sympl.host/clamav.tar.gz
tar
-xvf
clamav.tar.gz
fi
#
if [ -f "/var/lib/clamav/bytecode.cvd" -o -f "/var/lib/clamav/bytecode.cld" ] && [ -f "/var/lib/clamav/daily.cvd" -o -f "/var/lib/clamav/daily.cld" ] && [ -f "/var/lib/clamav/main.cvd" -o -f "/var/lib/clamav/main.cld" ] ; then
#
echo "We have what look to be valid definitions..."
#
else
#
echo "Failed to download clamAV definitions, going to fallback."
cd
/var/lib/clamav/
wget
-qO
clamav.tar.gz http://sympl.host/clamav.tar.gz
tar
-xvf
clamav.tar.gz
#
fi
# Start clamav, whatever state it's currently in
systemctl unmask clamav-daemon
service clamav-daemon stop
service clamav-daemon start
service clamav-freshclam start
# Enable antispam and antivirus as default, otherwise monit would stop them.
echo
"I: Enabling Antivirus and Antispam config"
...
...
autotest/test.d/90-symbiosis-test
View file @
cff733c1
#!/bin/bash
# It's unclear why, but the first time this runs, one of the AV tests fails.
echo
'Running sympl-test...'
/usr/bin/sympl-test
>
/dev/null 2>&1
#echo 'Running sympl-test...'
#/usr/bin/sympl-test > /dev/null 2>&1
# fairly sure this was a race conditon where apache wasn't reloading quick enough
# ...so, we'll ignore that and run it again.
/usr/bin/sympl-test
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment