mirror of
https://gitlab.com/pamhyr/pamhyr2.git
synced 2026-10-29 19:10:42 +01:00
ci: Add antivirus check with clamav scan.
This commit is contained in:
1 parent
21e97d4e30
commit
d541becb1a
2 files changed
+36
No files matched your search
@@ -20,6 +20,7 @@ stages:
|
||||
- test
|
||||
- build
|
||||
- package
|
||||
- antivirus
|
||||
- release
|
||||
|
||||
#############
|
||||
@@ -403,6 +404,25 @@ windows-package-exe:
|
||||
- copy ..\packages\pamhyr.nsi pamhyr.nsi
|
||||
- .\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 #
|
||||
###########
|
||||
|
||||
Executable
+16
@@ -0,0 +1,16 @@
|
||||
#! /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
|
||||
Reference in new issue
Block a user