vn-autoconfig/Jenkinsfile

42 lines
822 B
Plaintext
Raw Normal View History

2020-01-15 10:25:33 +00:00
#!/usr/bin/env groovy
pipeline {
agent any
environment {
PROJECT_NAME = 'vn-autoconfig'
}
stages {
2020-01-30 15:20:40 +00:00
stage('Checkout') {
steps {
2020-01-31 12:33:02 +00:00
setEnv()
2020-01-30 15:20:40 +00:00
}
}
2021-04-29 22:03:39 +00:00
stage('Build') {
2020-01-15 10:25:33 +00:00
when {
branch 'master'
}
2020-01-31 20:27:53 +00:00
environment {
CREDENTIALS = credentials('docker-registry')
}
steps {
2021-04-29 22:03:39 +00:00
dockerBuild()
}
}
stage('Deploy') {
when {
branch 'master'
}
environment {
DOCKER_HOST = "${env.SWARM_HOST}"
}
steps {
dockerStackDeploy()
2020-01-31 20:27:53 +00:00
}
2020-01-15 10:25:33 +00:00
}
}
post {
always {
2020-01-31 12:33:02 +00:00
sendEmail()
2020-01-15 10:25:33 +00:00
}
}
}