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"' } } }