mirror of
https://github.com/chillout2k/sos-milter.git
synced 2025-12-14 19:09:44 +00:00
First jenkins build
This commit is contained in:
parent
2f7ac48dd2
commit
abeadc7052
40
Jenkinsfile
vendored
40
Jenkinsfile
vendored
@ -1,23 +1,29 @@
|
|||||||
node {
|
node {
|
||||||
def app
|
def app
|
||||||
|
|
||||||
stage('Clone repository') {
|
stage('Clone repository') {
|
||||||
/* Let's make sure we have the repository cloned to our workspace */
|
/* Let's make sure we have the repository cloned to our workspace */
|
||||||
checkout scm
|
checkout scm
|
||||||
}
|
}
|
||||||
|
|
||||||
stage('Build image') {
|
stage('Build image') {
|
||||||
sh '/usr/bin/env'
|
sh '/usr/bin/env'
|
||||||
/* This builds the actual image; synonymous to
|
/* This builds the actual image; synonymous to
|
||||||
* docker build on the command line */
|
* docker build on the command line */
|
||||||
app = docker.build("jenkins/sos-milter")
|
app = docker.build("jenkins/sos-milter")
|
||||||
}
|
}
|
||||||
|
|
||||||
stage('Test image') {
|
stage('Test image') {
|
||||||
/* Ideally, we would run a test framework against our image.
|
/* Ideally, we would run a test framework against our image.
|
||||||
* For this example, we're using a Volkswagen-type approach ;-) */
|
* For this example, we're using a Volkswagen-type approach ;-) */
|
||||||
app.inside {
|
app.inside {
|
||||||
sh 'echo "Tests passed"'
|
sh 'echo "Tests passed"'
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Push image') {
|
||||||
|
docker.withRegistry('http://dockreg-fra.zwackl.local:5000') {
|
||||||
|
app.push()
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user