Commit d541becb authored by Pierre-Antoine Rouby's avatar Pierre-Antoine Rouby
Browse files

ci: Add antivirus check with clamav scan.

Showing with 36 additions and 0 deletions
+36 -0
...@@ -20,6 +20,7 @@ stages: ...@@ -20,6 +20,7 @@ stages:
- test - test
- build - build
- package - package
- antivirus
- release - release
############# #############
...@@ -403,6 +404,25 @@ windows-package-exe: ...@@ -403,6 +404,25 @@ windows-package-exe:
- copy ..\packages\pamhyr.nsi pamhyr.nsi - copy ..\packages\pamhyr.nsi pamhyr.nsi
- .\make-windows-exe.bat - .\make-windows-exe.bat
pkg-check-clamav:
stage: antivirus
tags:
- release
- linux
needs:
- job: linux-package-tar
artifacts: true
- job: windows-package-zip
artifacts: true
- job: windows-package-exe
artifacts: true
rules:
- if: $CI_COMMIT_BRANCH == 'ci-test' || $CI_COMMIT_TAG
script:
- cd packages
- ./clamav-scan.sh
allow_failure: true
########### ###########
# RELEASE # # RELEASE #
########### ###########
......
#! /bin/bash
set +x
OPTS="-r -a"
FILES="../windows/pamhyr-windows.exe ../windows/pamhyr-windows.zip ../linux/pamhyr-gnulinux.tar.xz"
clamscan $OPTS $FILES | tee clamav.log
RES=$(cat clamav.log | grep "Infected files: 0")
if [ -z "$RES" ]; then
echo "Infected files"
exit -1
else
echo "OK"
exit 0
fi
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