feat: refs #7442 Kubernetes deploy
gitea/vn-autoconfig/pipeline/head This commit looks good Details

This commit is contained in:
Juan Ferrer 2024-05-21 20:52:22 +02:00
parent 8c01a8b628
commit 9f8072fbaf
1 changed files with 8 additions and 9 deletions

17
Jenkinsfile vendored
View File

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