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 -c 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 && chmod +x clair-scanner
./clair-scanner --ip="$DOCKER_GATEWAY" myapp:latest || exit 0
stage('Push on repo nexus')
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