Skip to content

Commit

Permalink
Updated Maven and JDK in the Docker for Jenkins
Browse files Browse the repository at this point in the history
  • Loading branch information
dmatej committed Mar 16, 2022
1 parent 5f22f7a commit 87b99c5
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 11 deletions.
2 changes: 1 addition & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
env.label = "glassfish-ci-pod-${UUID.randomUUID().toString()}"

// Docker image defined in this project in [glassfish]/etc/docker/Dockerfile
env.gfImage = "ee4jglassfish/ci:tini-jdk-11.0.10"
env.gfImage = "dmatej/eclipse-jenkins-glassfish:11.0.14.1"

def jobs = [
"verifyPhase",
Expand Down
17 changes: 11 additions & 6 deletions etc/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,18 @@ FROM krallin/centos-tini

ADD ./entrypoint.sh /etc/

# HOWTO:
#
# The JDK was got from the following releases:
# -JDK11: https://github.com/AdoptOpenJDK/openjdk11-upstream-binaries/
# releases/download/jdk-11.0.10%2B9/OpenJDK11U-jdk_x64_linux_11.0.10_9.tar.gz
# Since the JDK is a very large file, download and add the file manually.
# 1) cd etc/docker
# 2) wget https://github.com/AdoptOpenJDK/openjdk11-upstream-binaries/releases/download/jdk-11.0.14.1%2B1/OpenJDK11U-jdk_x64_linux_11.0.14.1_1.tar.gz
# 3) tar -xvzf OpenJDK11U-jdk_x64_linux_11.0.14.1_1.tar.gz
# 4) make # takes aroung 5 minutes, depending on network speed
# 5) docker login
# 6) docker push dmatej/eclipse-jenkins-glassfish:11.0.14.1 or another repository, don't forget to update the Jenkinsfile and Makefile too.
# 7) docker logout
# 8) git commit, git push, run jenkins build, etc.
#
ADD ./openjdk-11.0.10_9 /usr/lib/jvm/jdk11
ADD ./openjdk-11.0.14.1_1 /usr/lib/jvm/jdk11

RUN chmod +x /etc/entrypoint.sh && \
#
Expand All @@ -24,7 +29,7 @@ RUN chmod +x /etc/entrypoint.sh && \
#
# install maven
#
curl -O https://archive.apache.org/dist/maven/maven-3/3.6.0/binaries/apache-maven-3.6.0-bin.zip && \
curl -O https://archive.apache.org/dist/maven/maven-3/3.8.5/binaries/apache-maven-3.8.5-bin.zip && \
unzip apache-maven-*-bin.zip -d /usr/share && \
rm apache-maven-*-bin.zip && \
mv /usr/share/apache-maven-* /usr/share/maven && \
Expand Down
8 changes: 4 additions & 4 deletions etc/docker/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
SHELL := /bin/bash
IMAGE_TAG = tini-jdk-11.0.10
IMAGE_TAG = 11.0.14.1

.PHONY: clean docker-clean docker-build docker-push

Expand All @@ -8,10 +8,10 @@ default: docker-build
clean: docker-clean

docker-clean:
docker rmi ee4jglassfish/ci:$(IMAGE_TAG)
docker rmi dmatej/eclipse-jenkins-glassfish:$(IMAGE_TAG)

docker-build:
docker build -t ee4jglassfish/ci:$(IMAGE_TAG) .
docker build -t dmatej/eclipse-jenkins-glassfish:$(IMAGE_TAG) .

docker-push:
docker push ee4jglassfish/ci:$(IMAGE_TAG)
docker push dmatej/eclipse-jenkins-glassfish:$(IMAGE_TAG)

0 comments on commit 87b99c5

Please sign in to comment.