Commit cff733c1 authored by Paul Cammish's avatar Paul Cammish
Browse files

Improve CI performance

parent 8f3dfa94
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 minutes
start_in: 1 minute
variables:
CI_DEBUG_TRACE: "false"
artifacts:
paths:
- repo/*
expire_in: 1 hour
......@@ -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"
......
#!/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
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment