Maintenance Gitlab - Jeudi 09 Décembre 2021 à partir de 10h - Mises à jour de sécurité

Commit 1d0df598 authored by Thibault's avatar Thibault
Browse files

Retour sur ancien jenkins file pour clair

parent 3cd89b57
node{
def app
def registryProject='http://172.20.0.2:8083/repository/RegistryDocker/'
def registryProject='http://127.0.0.1:8083'
def image="${registryProject}:version-${env.BUILD_ID}"
stage('Clone') {
checkout scm
......@@ -29,14 +27,15 @@ node{
stage('Scan Clair'){
sh '''
wget -qO clair-scanner https://github.com/arminc/clair-scanner/releases/download/v8/clair-scanner_linux_amd64 && chmod +x clair-scanner
./clair-scanner --report="rapClair" --ip="172.20.0.4" --clair="http://172.20.0.6:6060" debian:buster || exit 0
wget -qO clair-scanner https://github.com/arminc/clair-scanner/releases/download/v8/clair-scanner_linux_amd64 && chmod +x clair-scanner
./clair-scanner --report="rapportClair" --ip="172.20.0.4" --clair="http://172.20.0.6:6060" debian:buster || exit 0
'''
}
stage('Push on repo nexus'){
docker.withRegistry(registryProject,'Jenkins-credential'){
app.push ()
docker.withRegistry(registryProject,'reg2'){
img.push 'latest'
img.push
}
}
}
Markdown is supported
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