Sample Code for Jenkins Pipeline Virus Scanning
The sample code is as follows:
pipeline {
agent any
options {
timeout(time: 1, unit: 'HOURS')
}
stages{
stage('freshclam') {
agent {
label 'kunpeng_executor'
}
steps{
sh 'freshclam'// If you are a common user, add sudo before the command.
}
}
stage('clamscan') {
agent {
label 'kunpeng_executor'
}
steps{
sh 'clamscan -i -r /home -l ~/clamscan.log'// If you are a common user, add sudo before the command.
}
}
}
}
Parent topic: Version Release