Bake custom container to run this guide.
This commit is contained in:
18
Jenkinsfile
vendored
18
Jenkinsfile
vendored
@@ -11,10 +11,26 @@ pipeline {
|
||||
}
|
||||
|
||||
stages {
|
||||
stage('Publish OpenJDK 8 + git') {
|
||||
when {
|
||||
changeset "ci/Dockerfile"
|
||||
}
|
||||
agent any
|
||||
|
||||
steps {
|
||||
script {
|
||||
def image = docker.build("springci/gs-consuming-web-service-and-git", "ci/")
|
||||
docker.withRegistry('', 'hub.docker.com-springbuildmaster') {
|
||||
image.push()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage("test: baseline (jdk8)") {
|
||||
agent {
|
||||
docker {
|
||||
image 'adoptopenjdk/openjdk8:latest'
|
||||
image 'springci/gs-consuming-web-service-and-git:latest'
|
||||
args '-v $HOME/.m2:/tmp/jenkins-home/.m2'
|
||||
}
|
||||
}
|
||||
|
||||
6
ci/Dockerfile
Normal file
6
ci/Dockerfile
Normal file
@@ -0,0 +1,6 @@
|
||||
FROM adoptopenjdk/openjdk8:latest
|
||||
|
||||
RUN apt-get update && apt-get install -y git
|
||||
|
||||
RUN apt-get clean \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
@@ -2,7 +2,7 @@
|
||||
cd $(dirname $0)
|
||||
|
||||
git clone https://github.com/spring-guides/gs-producing-web-service
|
||||
(cd gs-producing-web-service/complete; ./mvnw install; ./mvnw spring-boot:run &)
|
||||
(cd gs-producing-web-service/complete; ./mvnw clean install spring-boot:run &)
|
||||
|
||||
sleep 10
|
||||
|
||||
|
||||
Reference in New Issue
Block a user