diff --git a/Jenkinsfile b/Jenkinsfile index f1abac5d2..11ca7be1e 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -11,12 +11,31 @@ pipeline { } stages { + stage('Publish OpenJDK 8 + Redis 3.2 docker image') { + when { + anyOf { + changeset "ci/Dockerfile" + changeset "Makefile" + } + } + agent any + + steps { + script { + def image = docker.build("springci/spring-data-openjdk8-with-redis-3.2", "-f ci/Dockerfile .") + docker.withRegistry('', 'hub.docker.com-springbuildmaster') { + image.push() + } + } + } + } + stage("Test") { parallel { stage("test: baseline") { agent { docker { - image 'springci/spring-data-openjdk8-with-redis-5.0:latest' + image 'springci/spring-data-openjdk8-with-redis-3.2:latest' args '-v $HOME/.m2:/root/.m2' } } diff --git a/ci/Dockerfile b/ci/Dockerfile new file mode 100644 index 000000000..aac56f596 --- /dev/null +++ b/ci/Dockerfile @@ -0,0 +1,17 @@ +FROM adoptopenjdk/openjdk8:latest + +RUN apt-get update + +# Get the tools for building Redis +RUN apt-get install -y build-essential + +# Copy Spring Data Redis's Makefile into the container +COPY ./Makefile / + +# Build Redis inside the container so we don't have to build it during the job. +RUN make work/redis/bin/redis-cli work/redis/bin/redis-server + +RUN chmod -R o+rw work + +RUN apt-get clean \ + && rm -rf /var/lib/apt/lists/*