From 3631ac59ad20a5d8b08ebad596a69cf4569c7fcd Mon Sep 17 00:00:00 2001 From: Juan Ferrer Toribio Date: Thu, 16 Jan 2020 15:17:57 +0100 Subject: [PATCH] Jenkins fixes --- Jenkinsfile | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index bf45ed3..17b312c 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -23,20 +23,21 @@ pipeline { sh 'printenv' } } - stage('Build') { - when { - branch 'master' - } - steps { - sh 'docker run --rm -v jenkins_master:$JENKINS_HOME $IMAGE vn-debuild "$WORKSPACE"' - } - } stage('Deploy') { when { branch 'master' } + agent { + docker { + image 'registry.verdnatura.es/vn-debuild' + registryUrl 'https://registry.verdnatura.es/' + registryCredentialsId 'docker-registry' + args '-v jenkins_master:"$JENKINS_HOME" -v /mnt/storage/reprepro:/reprepro' + } + } steps { - sh 'docker run --rm -v jenkins_master:$JENKINS_HOME -v /mnt/storage/reprepro:/reprepro $IMAGE vn-include "$WORKSPACE"' + sh 'vn-debuild "$WORKSPACE"' + sh 'vn-include "$WORKSPACE"' } } }