mirror of
https://github.com/chillout2k/sos-milter.git
synced 2025-12-12 18:10:18 +00:00
45 lines
898 B
Plaintext
45 lines
898 B
Plaintext
pipeline {
|
|
environment{
|
|
dockerImage = ''
|
|
imageName = 'jenkins/sos-milter'
|
|
dockerRegistry = 'https://dockreg-fra.zwackl.de'
|
|
}
|
|
|
|
agent any
|
|
|
|
stages {
|
|
stage('Checkout SCM') {
|
|
steps {
|
|
checkout scm
|
|
}
|
|
}
|
|
|
|
stage('Build image') {
|
|
steps {
|
|
sh '/usr/bin/env'
|
|
/* This builds the actual image; synonymous to
|
|
* docker build on the command line */
|
|
dockerImage = docker.build(imageName)
|
|
}
|
|
}
|
|
|
|
stage('Test image') {
|
|
steps {
|
|
/* Ideally, we would run a test framework against our image.
|
|
* For this example, we're using a Volkswagen-type approach ;-) */
|
|
dockerImage.inside {
|
|
sh 'echo "Tests passed"'
|
|
}
|
|
}
|
|
}
|
|
|
|
stage('Push image') {
|
|
steps {
|
|
docker.withRegistry(dockerRegistry) {
|
|
dockerImage.push()
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|