diff --git a/Jenkinsfile b/Jenkinsfile index 7db9f12..3705767 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -6,11 +6,6 @@ pipeline { PROJECT_NAME = 'vn-autoconfig' } stages { - stage('Checkout') { - steps { - setEnv() - } - } stage('Build') { when { branch 'master' @@ -26,16 +21,20 @@ pipeline { when { branch 'master' } - environment { - DOCKER_HOST = "${env.SWARM_HOST}" - } steps { - dockerStackDeploy() + withKubeConfig([ + serverUrl: "$KUBERNETES_API", + credentialsId: 'kubernetes', + namespace: 'autoconfig' + ]) { + sh 'kubectl set image deployment/autoconfig autoconfig=registry.verdnatura.es/vn-autoconfig:latest' + } } } } post { always { + setEnv() sendEmail() } }