Commit 6260d5ab authored by MOREY Thibault's avatar MOREY Thibault
Browse files

Update Jenkinsfile

parent c43c1395
......@@ -24,8 +24,17 @@ node{
sh 'dockle debian:buster > rapportDockle'
}
stage('Scan Clair '){
sh './clair-scanner --ip 127.0.0.1 -c http://172.17.0.1:6060 debian:buster > rapportClair'
stage('Scan Clair'){
sh '''
docker run -d --name db arminc/clair-db
sleep 15 # wait for db to come up
docker run -p 6060:6060 --link db:postgres -d --name clair arminc/clair-local-scan
sleep 1
DOCKER_GATEWAY=$(docker network inspect bridge --format "{{range .IPAM.Config}}{{.Gateway}}{{end}}")
wget -qO clair-scanner https://github.com/arminc/clair-scanner/releases/download/v8/clair-scanner_linux_amd64 && chmod +x clair-scanner
./clair-scanner --ip="$DOCKER_GATEWAY" myapp:latest || exit 0
'''
}
stage('Push on repo nexus')
docker.withRegistry(registryProject,'reg2'){
......
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