Skip to content

Commit

Permalink
Reintroduce Docker containers for release.
Browse files Browse the repository at this point in the history
Releasing requires additional tools inside the container that does the releasing process, whether to maven central or artifactory.

Resolves #1353.
  • Loading branch information
gregturn committed May 11, 2023
1 parent aceefff commit cce5564
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 1 deletion.
17 changes: 16 additions & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,21 @@ pipeline {
}

stages {
stage('Publish Eclipse Temurin (main) + gpg docker image') {
when {
changeset "ci/Dockerfile"
}
agent any

steps {
script {
def image = docker.build("${p['docker.java.build.image']}", "ci/")
docker.withRegistry('', "${p['dockerhub.credentials']}") {
image.push()
}
}
}
}
stage("Test: baseline (main)") {
agent any
options { timeout(time: 30, unit: 'MINUTES')}
Expand Down Expand Up @@ -85,7 +100,7 @@ pipeline {

steps {
script {
docker.image(p['docker.java.main.image']).inside(p['docker.java.inside.basic']) {
docker.image("${p['docker.java.build.image-proxy']}").inside(p['docker.java.inside.basic']) {
PROJECT_VERSION = sh(
script: "ci/version.sh",
returnStdout: true
Expand Down
6 changes: 6 additions & 0 deletions ci/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
FROM eclipse-temurin:17.0.6_10-jdk-focal

RUN apt-get update && apt-get install -y gpg

RUN apt-get clean \
&& rm -rf /var/lib/apt/lists/*
5 changes: 5 additions & 0 deletions ci/pipeline.properties
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,13 @@ java.next.tag=20-jdk-jammy
docker.java.main.image=harbor-repo.vmware.com/dockerhub-proxy-cache/library/eclipse-temurin:${java.main.tag}
docker.java.next.image=harbor-repo.vmware.com/dockerhub-proxy-cache/library/eclipse-temurin:${java.next.tag}

# Docker container images - for release
docker.java.build.image=springci/spring-ws-eclipse-temurin-with-gpg:${java.main.tag}
docker.java.build.image-proxy=harbor-repo.vmware.com/dockerhub-proxy-cache/${docker.java.build.image}

# Docker environment settings
docker.java.inside.basic=-v $HOME:/tmp/jenkins-home

# Credentials
artifactory.credentials=02bd1690-b54f-4c9f-819d-a77cb7a9822c
dockerhub.credentials=hub.docker.com-springbuildmaster

0 comments on commit cce5564

Please sign in to comment.