Skip to content
Snippets Groups Projects
Commit e828ae8a authored by Thibault's avatar Thibault
Browse files

Mise en place du chemin pour une nouvelle image

parent 22c2b8eb
No related branches found
No related tags found
No related merge requests found
node{
def app
def registryProject='http://registry-nexus:8083/repository/RegistryDocker/'
def image="${registryProject}:version-${env.BUILD_ID}"
stage('Clone') {
checkout scm
}
stage('Scan hadolint'){
sh 'docker run --rm -i hadolint/hadolint < Dockerfile > rapportHadolint || true'
}
stage('Build image') {
app = docker.build ("debian:buster")
}
stage('Test image') {
docker.image('debian:buster').withRun() { c ->
sh 'docker ps'
}
}
stage('Scan Dockle'){
sh 'dockle debian:buster > rapportDockle'
}
stage('Scan Clair'){
sh '''
./clair-scanner --report="rapportClair" --ip=jenkins-blueocean --clair="http://clair-local-scan:6060" debian:buster || exit 0
'''
}
stage('Push on repo nexus'){
docker.withRegistry(registryProject,'Jenkins-credential'){
app.push()
}
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment