|
|
@@ -10,19 +10,17 @@ node {
|
|
|
stage('Build image') {
|
|
|
/* This builds the actual image; synonymous to
|
|
|
* docker build on the command line */
|
|
|
- agent {
|
|
|
+
|
|
|
|
|
|
- app = docker.build("hochzeit:latest")
|
|
|
- }
|
|
|
+ app = docker.build("hochzeit:latest")
|
|
|
+
|
|
|
}
|
|
|
|
|
|
stage('Test image') {
|
|
|
/* Ideally, we would run a test framework against our image.
|
|
|
* For this example, we're using a Volkswagen-type approach ;-) */
|
|
|
- agent {
|
|
|
- app.inside {
|
|
|
- sh 'echo "Tests passed"'
|
|
|
- }
|
|
|
+ app.inside {
|
|
|
+ sh 'echo "Tests passed"'
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -31,11 +29,9 @@ node {
|
|
|
* First, the incremental build number from Jenkins
|
|
|
* Second, the 'latest' tag.
|
|
|
* Pushing multiple tags is cheap, as all the layers are reused. */
|
|
|
- agent {
|
|
|
docker.withRegistry('https://container.kornbum.dev', 'container-kornblum-dev') {
|
|
|
app.push("${env.BUILD_NUMBER}")
|
|
|
app.push("latest")
|
|
|
}
|
|
|
- }
|
|
|
}
|
|
|
}
|