Skip to content
This repository has been archived by the owner on Jan 21, 2024. It is now read-only.

Commit

Permalink
Add java 17 preview (#243)
Browse files Browse the repository at this point in the history
* Add java 17 preview

* Add required args

* Minor fixes after testing

* Looks like agents don't need these flags (at least in simple tests)

* Update docker-bake.hcl
  • Loading branch information
timja authored Sep 28, 2021
1 parent d5aeb63 commit 4cef1b8
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 1 deletion.
15 changes: 15 additions & 0 deletions 17/debian/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
ARG version=4.10-6-jdk17-preview
FROM jenkins/agent:$version

ARG version
LABEL Description="This is a base image, which allows connecting Jenkins agents via JNLP protocols" Vendor="Jenkins project" Version="$version"

ARG user=jenkins

USER root
COPY ../../jenkins-agent /usr/local/bin/jenkins-agent
RUN chmod +x /usr/local/bin/jenkins-agent &&\
ln -s /usr/local/bin/jenkins-agent /usr/local/bin/jenkins-slave
USER ${user}

ENTRYPOINT ["/usr/local/bin/jenkins-agent"]
18 changes: 17 additions & 1 deletion docker-bake.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@ group "linux" {
"alpine_jdk11",
"debian_jdk8",
"debian_jdk11",
"debian_jdk17",
]
}

group "linux-arm64" {
targets = [
"debian_jdk11",
"debian_jdk17",
]
}

Expand All @@ -23,7 +25,7 @@ group "linux-ppc64le" {

# update this to use a newer build number for jenkins/docker image
variable "AGENT_IMAGE_BUILD_NUMBER" {
default = "4"
default = "6"
}

variable "REGISTRY" {
Expand Down Expand Up @@ -106,3 +108,17 @@ target "debian_jdk11" {
]
platforms = ["linux/amd64", "linux/arm64", "linux/s390x"]
}

target "debian_jdk17" {
dockerfile = "17/debian/Dockerfile"
context = "."
args = {
version = "${REMOTING_VERSION}-${AGENT_IMAGE_BUILD_NUMBER}-jdk17-preview"
}
tags = [
equal(ON_TAG, "true") ? "${REGISTRY}/${JENKINS_REPO}:${REMOTING_VERSION}-${BUILD_NUMBER}-jdk17-preview": "",
"${REGISTRY}/${JENKINS_REPO}:jdk17-preview",
"${REGISTRY}/${JENKINS_REPO}:latest-jdk17-preview",
]
platforms = ["linux/amd64", "linux/arm64"]
}

0 comments on commit 4cef1b8

Please sign in to comment.