diff --git a/8/alpine/Dockerfile b/8/alpine/Dockerfile deleted file mode 100644 index 114f48c2a..000000000 --- a/8/alpine/Dockerfile +++ /dev/null @@ -1,59 +0,0 @@ -# The MIT License -# -# Copyright (c) 2015-2020, CloudBees, Inc. and other Jenkins contributors -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. - -ARG JAVA_VERSION="8u342-b07" -FROM eclipse-temurin:${JAVA_VERSION}-jdk-alpine - -ARG VERSION=4.13 -ARG user=jenkins -ARG group=jenkins -ARG uid=1000 -ARG gid=1000 - -RUN addgroup -g ${gid} ${group} -RUN adduser -h /home/${user} -u ${uid} -G ${group} -D ${user} -LABEL Description="This is a base image, which provides the Jenkins agent executable (slave.jar)" Vendor="Jenkins project" Version="${VERSION}" - -ARG AGENT_WORKDIR=/home/${user}/agent - -RUN apk add --update --no-cache curl bash git git-lfs musl-locales openssh-client openssl procps \ - && curl --create-dirs -fsSLo /usr/share/jenkins/agent.jar https://repo.jenkins-ci.org/public/org/jenkins-ci/main/remoting/${VERSION}/remoting-${VERSION}.jar \ - && chmod 755 /usr/share/jenkins \ - && chmod 644 /usr/share/jenkins/agent.jar \ - && ln -sf /usr/share/jenkins/agent.jar /usr/share/jenkins/slave.jar \ - && apk del curl -USER ${user} -ENV AGENT_WORKDIR=${AGENT_WORKDIR} -RUN mkdir /home/${user}/.jenkins && mkdir -p ${AGENT_WORKDIR} - -VOLUME /home/${user}/.jenkins -VOLUME ${AGENT_WORKDIR} -WORKDIR /home/${user} - -LABEL \ - org.opencontainers.image.vendor="Jenkins project" \ - org.opencontainers.image.title="Official Jenkins Agent Base Docker image" \ - org.opencontainers.image.description="This is a base image, which provides the Jenkins agent executable (agent.jar)" \ - org.opencontainers.image.version="${VERSION}" \ - org.opencontainers.image.url="https://www.jenkins.io/" \ - org.opencontainers.image.source="https://github.com/jenkinsci/docker-agent" \ - org.opencontainers.image.licenses="MIT" diff --git a/8/bullseye/Dockerfile b/8/bullseye/Dockerfile deleted file mode 100644 index 9bff231ba..000000000 --- a/8/bullseye/Dockerfile +++ /dev/null @@ -1,72 +0,0 @@ -# The MIT License -# -# Copyright (c) 2015-2020, CloudBees, Inc. and other Jenkins contributors -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. - -FROM eclipse-temurin:8u342-b07-jdk-focal AS jre-build - -FROM debian:bullseye-20220912 - -ARG VERSION=4.13 -ARG user=jenkins -ARG group=jenkins -ARG uid=1000 -ARG gid=1000 - -RUN groupadd -g ${gid} ${group} -RUN useradd -c "Jenkins user" -d /home/${user} -u ${uid} -g ${gid} -m ${user} -LABEL Description="This is a base image, which provides the Jenkins agent executable (agent.jar)" Vendor="Jenkins project" Version="${VERSION}" - -ARG AGENT_WORKDIR=/home/${user}/agent - -RUN apt-get update \ - && apt-get -y install \ - git-lfs \ - curl \ - fontconfig \ - && curl --create-dirs -fsSLo /usr/share/jenkins/agent.jar https://repo.jenkins-ci.org/public/org/jenkins-ci/main/remoting/${VERSION}/remoting-${VERSION}.jar \ - && chmod 755 /usr/share/jenkins \ - && chmod 644 /usr/share/jenkins/agent.jar \ - && ln -sf /usr/share/jenkins/agent.jar /usr/share/jenkins/slave.jar \ - && apt-get remove -y curl \ - && rm -rf /var/lib/apt/lists/* - -ENV LANG C.UTF-8 - -ENV JAVA_HOME=/opt/java/openjdk -ENV PATH "${JAVA_HOME}/bin:${PATH}" -COPY --from=jre-build /opt/java/openjdk $JAVA_HOME - -USER ${user} -ENV AGENT_WORKDIR=${AGENT_WORKDIR} -RUN mkdir /home/${user}/.jenkins && mkdir -p ${AGENT_WORKDIR} - -VOLUME /home/${user}/.jenkins -VOLUME ${AGENT_WORKDIR} -WORKDIR /home/${user} - -LABEL \ - org.opencontainers.image.vendor="Jenkins project" \ - org.opencontainers.image.title="Official Jenkins Agent Base Docker image" \ - org.opencontainers.image.description="This is a base image, which provides the Jenkins agent executable (agent.jar)" \ - org.opencontainers.image.version="${VERSION}" \ - org.opencontainers.image.url="https://www.jenkins.io/" \ - org.opencontainers.image.source="https://github.com/jenkinsci/docker-agent" \ - org.opencontainers.image.licenses="MIT" diff --git a/8/windows/nanoserver-1809/Dockerfile b/8/windows/nanoserver-1809/Dockerfile deleted file mode 100644 index fb1a8a511..000000000 --- a/8/windows/nanoserver-1809/Dockerfile +++ /dev/null @@ -1,109 +0,0 @@ -# escape=` - -# The MIT License -# -# Copyright (c) 2020, Alex Earl and other Jenkins Contributors -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. -ARG JAVA_VERSION="8u332-b09" -FROM eclipse-temurin:${JAVA_VERSION}-jdk-windowsservercore-1809 AS core - -# If you pass in a POWERSHELL_VERSION, make sure it ends with a hyphen, leaving it empty will -# use the 'latest' -ARG POWERSHELL_VERSION= -FROM mcr.microsoft.com/powershell:${POWERSHELL_VERSION}nanoserver-1809 - -ARG JAVA_VERSION -ARG JAVA_HOME="C:\openjdk-8" - -# The nanoserver image is nice and small, but we need a couple of things to get SSH working -COPY --from=core /windows/system32/netapi32.dll /windows/system32/netapi32.dll -COPY --from=core /windows/system32/whoami.exe /windows/system32/whoami.exe -COPY --from=core $JAVA_HOME $JAVA_HOME - -SHELL ["pwsh.exe", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] -USER ContainerAdministrator - -ARG GIT_VERSION=2.37.2 -ARG GIT_PATCH_VERSION=2 -RUN [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 ; ` - $url = $('https://github.com/git-for-windows/git/releases/download/v{0}.windows.{1}/MinGit-{0}.{1}-64-bit.zip' -f $env:GIT_VERSION, $env:GIT_PATCH_VERSION) ; ` - Write-Host "Retrieving $url..." ; ` - Invoke-WebRequest $url -OutFile 'mingit.zip' -UseBasicParsing ; ` - Expand-Archive mingit.zip -DestinationPath c:\mingit ; ` - Remove-Item mingit.zip -Force - -ARG GIT_LFS_VERSION=3.1.4 -RUN [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 ; ` - $url = $('https://github.com/git-lfs/git-lfs/releases/download/v{0}/git-lfs-windows-amd64-v{0}.zip' -f $env:GIT_LFS_VERSION) ; ` - Write-Host "Retrieving $url..." ; ` - Invoke-WebRequest $url -OutFile 'GitLfs.zip' -UseBasicParsing ; ` - Expand-Archive GitLfs.zip -DestinationPath c:\mingit\mingw64\bin ; ` - Remove-Item GitLfs.zip -Force ; ` - & C:\mingit\cmd\git.exe lfs install - -ENV ProgramFiles="C:\Program Files" ` - WindowsPATH="C:\Windows\system32;C:\Windows" ` - JAVA_HOME="${JAVA_HOME}" -ENV PATH="${WindowsPATH};${ProgramFiles}\PowerShell;${JAVA_HOME}\bin;C:\mingit\cmd" - -ARG user=jenkins - -ARG AGENT_FILENAME=agent.jar -ARG AGENT_HASH_FILENAME=$AGENT_FILENAME.sha1 - -RUN net accounts /maxpwage:unlimited ; ` - net user "$env:user" /add /expire:never /passwordreq:no ; ` - net localgroup Administrators /add $env:user ; ` - New-Item -ItemType Directory -Path C:/ProgramData/Jenkins | Out-Null - -ARG AGENT_ROOT=C:/Users/$user -ARG AGENT_WORKDIR=${AGENT_ROOT}/Work - -ENV AGENT_WORKDIR=${AGENT_WORKDIR} - -# Get the Agent from the Jenkins Artifacts Repository -ARG VERSION=4.13 -LABEL Description="This is a base image, which provides the Jenkins agent executable (agent.jar)" Vendor="Jenkins project" Version="${VERSION}" -RUN echo $('https://repo.jenkins-ci.org/public/org/jenkins-ci/main/remoting/{0}/remoting-{0}.jar' -f $env:VERSION) -RUN [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 ; ` - Invoke-WebRequest $('https://repo.jenkins-ci.org/public/org/jenkins-ci/main/remoting/{0}/remoting-{0}.jar' -f $env:VERSION) -OutFile $(Join-Path C:/ProgramData/Jenkins $env:AGENT_FILENAME) -UseBasicParsing ; ` - Invoke-WebRequest $('https://repo.jenkins-ci.org/public/org/jenkins-ci/main/remoting/{0}/remoting-{0}.jar.sha1' -f $env:VERSION) -OutFile (Join-Path C:/ProgramData/Jenkins $env:AGENT_HASH_FILENAME) -UseBasicParsing ; ` - if ((Get-FileHash (Join-Path C:/ProgramData/Jenkins $env:AGENT_FILENAME) -Algorithm SHA1).Hash -ne (Get-Content (Join-Path C:/ProgramData/Jenkins $env:AGENT_HASH_FILENAME))) {exit 1} ; ` - Remove-Item -Force (Join-Path C:/ProgramData/Jenkins $env:AGENT_HASH_FILENAME) - -USER $user - -RUN New-Item -Type Directory $('{0}/.jenkins' -f $env:AGENT_ROOT) | Out-Null ; ` - New-Item -Type Directory $env:AGENT_WORKDIR | Out-Null - -RUN git config --global core.longpaths true - -VOLUME ${AGENT_ROOT}/.jenkins -VOLUME ${AGENT_WORKDIR} -WORKDIR ${AGENT_ROOT} - -LABEL ` - org.opencontainers.image.vendor="Jenkins project" ` - org.opencontainers.image.title="Official Jenkins Agent Base Docker image" ` - org.opencontainers.image.description="This is a base image, which provides the Jenkins agent executable (agent.jar)" ` - org.opencontainers.image.version="${VERSION}" ` - org.opencontainers.image.url="https://www.jenkins.io/" ` - org.opencontainers.image.source="https://github.com/jenkinsci/docker-agent" ` - org.opencontainers.image.licenses="MIT" diff --git a/8/windows/windowsservercore-ltsc2019/Dockerfile b/8/windows/windowsservercore-ltsc2019/Dockerfile deleted file mode 100644 index deb523486..000000000 --- a/8/windows/windowsservercore-ltsc2019/Dockerfile +++ /dev/null @@ -1,93 +0,0 @@ -# escape=` - -# The MIT License -# -# Copyright (c) 2019-2020, Alex Earl and other Jenkins Contributors -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. - -FROM eclipse-temurin:8u332-b09-jdk-windowsservercore-1809 - -SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] - -ARG GIT_VERSION=2.37.2 -ARG GIT_PATCH_VERSION=2 -RUN [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 ; ` - $url = $('https://github.com/git-for-windows/git/releases/download/v{0}.windows.{1}/MinGit-{0}.{1}-64-bit.zip' -f $env:GIT_VERSION, $env:GIT_PATCH_VERSION) ; ` - Write-Host "Retrieving $url..." ; ` - Invoke-WebRequest $url -OutFile 'mingit.zip' -UseBasicParsing ; ` - Expand-Archive mingit.zip -DestinationPath c:\mingit ; ` - Remove-Item mingit.zip -Force - -ARG GIT_LFS_VERSION=3.1.4 -RUN [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 ; ` - $url = $('https://github.com/git-lfs/git-lfs/releases/download/v{0}/git-lfs-windows-amd64-v{0}.zip' -f $env:GIT_LFS_VERSION) ; ` - Write-Host "Retrieving $url..." ; ` - Invoke-WebRequest $url -OutFile 'GitLfs.zip' -UseBasicParsing ; ` - Expand-Archive GitLfs.zip -DestinationPath c:\mingit\mingw64\bin ; ` - Remove-Item GitLfs.zip -Force ; ` - & C:\mingit\cmd\git.exe lfs install ; ` - $CurrentPath = (Get-Itemproperty -path 'hklm:\system\currentcontrolset\control\session manager\environment' -Name Path).Path ; ` - $NewPath = $CurrentPath + ';C:\mingit\cmd' ; ` - Set-ItemProperty -path 'hklm:\system\currentcontrolset\control\session manager\environment' -Name Path -Value $NewPath - -ARG user=jenkins - -ARG AGENT_FILENAME=agent.jar -ARG AGENT_HASH_FILENAME=$AGENT_FILENAME.sha1 - -RUN net accounts /maxpwage:unlimited ; ` - net user "$env:user" /add /expire:never /passwordreq:no ; ` - net localgroup Administrators /add $env:user ; ` - Set-LocalUser -Name $env:user -PasswordNeverExpires 1; ` - New-Item -ItemType Directory -Path C:/ProgramData/Jenkins | Out-Null - -ARG AGENT_ROOT=C:/Users/$user -ARG AGENT_WORKDIR=${AGENT_ROOT}/Work - -ENV AGENT_WORKDIR=${AGENT_WORKDIR} - -# Get the Agent from the Jenkins Artifacts Repository -ARG VERSION=4.13 -LABEL Description="This is a base image, which provides the Jenkins agent executable (agent.jar)" Vendor="Jenkins project" Version="${VERSION}" -RUN [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 ; ` - Invoke-WebRequest $('https://repo.jenkins-ci.org/public/org/jenkins-ci/main/remoting/{0}/remoting-{0}.jar' -f $env:VERSION) -OutFile $(Join-Path C:/ProgramData/Jenkins $env:AGENT_FILENAME) -UseBasicParsing ; ` - Invoke-WebRequest $('https://repo.jenkins-ci.org/public/org/jenkins-ci/main/remoting/{0}/remoting-{0}.jar.sha1' -f $env:VERSION) -OutFile (Join-Path C:/ProgramData/Jenkins $env:AGENT_HASH_FILENAME) -UseBasicParsing ; ` - if ((Get-FileHash (Join-Path C:/ProgramData/Jenkins $env:AGENT_FILENAME) -Algorithm SHA1).Hash -ne (Get-Content (Join-Path C:/ProgramData/Jenkins $env:AGENT_HASH_FILENAME))) {exit 1} ; ` - Remove-Item -Force (Join-Path C:/ProgramData/Jenkins $env:AGENT_HASH_FILENAME) - -USER $user - -RUN New-Item -Type Directory $('{0}/.jenkins' -f $env:AGENT_ROOT) | Out-Null ; ` - New-Item -Type Directory $env:AGENT_WORKDIR | Out-Null - -RUN git config --global core.longpaths true - -VOLUME ${AGENT_ROOT}/.jenkins -VOLUME ${AGENT_WORKDIR} -WORKDIR ${AGENT_ROOT} - -LABEL ` - org.opencontainers.image.vendor="Jenkins project" ` - org.opencontainers.image.title="Official Jenkins Agent Base Docker image" ` - org.opencontainers.image.description="This is a base image, which provides the Jenkins agent executable (agent.jar)" ` - org.opencontainers.image.version="${VERSION}" ` - org.opencontainers.image.url="https://www.jenkins.io/" ` - org.opencontainers.image.source="https://github.com/jenkinsci/docker-agent" ` - org.opencontainers.image.licenses="MIT" diff --git a/README.md b/README.md index f2c1982c4..79651d3eb 100644 --- a/README.md +++ b/README.md @@ -63,20 +63,16 @@ The image has several supported configurations, which can be accessed via the fo * Linux Images: * `latest` (`jdk11`, `bullseye-jdk11`, `latest-bullseye-jdk11`, `latest-jdk11`): Latest version with the newest remoting and Java 11 (based on `debian:bullseye-${builddate}`) - * `latest-jdk8` (`jdk8`, `bullseye-jdk8`, `latest-bullseye-jdk8`): Latest version with the newest remoting (based on `debian:bullseye-${builddate}`) * `alpine` (`alpine-jdk11`, `latest-alpine`, `latest-alpine-jdk11`): Small image based on Alpine Linux (based on `alpine:${version}`) - * `alpine-jdk8` (`latest-alpine-jdk8`): Small image based on Alpine Linux (based on `alpine:${version}`) * `archlinux` (`latest-archlinux`, `archlinux-jdk11`, `latest-archlinux-jdk11`): Image based on Arch Linux with JDK11 (based on `archlinux:latest`) * `bullseye-jdk17` (`jdk17`, `latest-bullseye-jdk17`, `latest-jdk17`): JDK17 version with the newest remoting (based on `debian:bullseye-${builddate}`) -From version 4.11.2, the alpine images are tagged using the alpine OS version as well (i.e. `alpine` ==> `alpine3.16`, `alpine-jdk8` ==> `alpine3.16-jdk8`). +From version 4.11.2, the alpine images are tagged using the alpine OS version as well (i.e. `alpine` ==> `alpine3.16`, `alpine-jdk11` ==> `alpine3.16-jdk11`). * Windows Images: - * `jdk8-windowsservercore-1809`: Latest version with the newest remoting and Java 8 (based on `eclipse-temurin:8.xxx-jdk-windowsservercore-1809`) - * `jdk8-nanoserver-1809`: Latest version with the newest remoting with Windows Nano Server and Java 8 (based on `eclipse-temurin:8.xxx-jdk-nanoserver-1809`) - * `jdk11-windowsservercore-1809`: Latest version with the newest remoting and Java 11 (based on `eclipse-temurin:11.xxx-jdk-windowsservercore-1809`) + * `jdk11-windowsservercore-ltsc2019`: Latest version with the newest remoting and Java 11 (based on `eclipse-temurin:11.xxx-jdk-windowsservercore-ltsc2019`) * `jdk11-nanoserver-1809`: Latest version with the newest remoting with Windows Nano Server and Java 11 (based on `eclipse-temurin:11.xxx-jdk-nanoserver-1809`) - * `jdk17-windowsservercore-1809`: Latest version with the newest remoting and Java 17 (based on `eclipse-temurin:17.xxx-jdk-windowsservercore-1809`) + * `jdk17-windowsservercore-ltsc2019`: Latest version with the newest remoting and Java 17 (based on `eclipse-temurin:17.xxx-jdk-windowsservercore-ltsc2019`) * `jdk17-nanoserver-1809`: Latest version with the newest remoting with Windows Nano Server and Java 17 (based on `eclipse-temurin:17.xxx-jdk-nanoserver-1809`) The file `docker-bake.hcl` defines all the configuration for Linux images and their associated tags. diff --git a/build-windows.yaml b/build-windows.yaml index e7fcb3c85..5dc4bb7f6 100644 --- a/build-windows.yaml +++ b/build-windows.yaml @@ -1,32 +1,22 @@ version: '3' services: - jdk8-nanoserver: - build: - context: ./8/windows/nanoserver-1809/ - args: - - VERSION=$REMOTING_VERSION - jdk11-nanoserver: + jdk11-nanoserver-1809: build: context: ./11/windows/nanoserver-1809/ args: - VERSION=$REMOTING_VERSION - jdk17-nanoserver: + jdk17-nanoserver-1809: build: context: ./17/windows/nanoserver-1809/ args: - VERSION=$REMOTING_VERSION - jdk8-windowsservercore: - build: - context: ./8/windows/windowsservercore-ltsc2019/ - args: - - VERSION=$REMOTING_VERSION - jdk11-windowsservercore: + jdk11-windowsservercore-ltsc2019: build: context: ./11/windows/windowsservercore-ltsc2019/ args: - VERSION=$REMOTING_VERSION - jdk17-windowsservercore: + jdk17-windowsservercore-ltsc2019: build: context: ./17/windows/windowsservercore-ltsc2019/ args: diff --git a/build.ps1 b/build.ps1 index 379daa617..301b88921 100644 --- a/build.ps1 +++ b/build.ps1 @@ -37,7 +37,7 @@ if(![String]::IsNullOrWhiteSpace($env:REMOTING_VERSION)) { } # this is the jdk version that will be used for the 'bare tag' images, e.g., jdk8-windowsservercore-1809 -> windowsserver-1809 -$defaultBuild = '8' +$defaultBuild = '11' $builds = @{} $env:REMOTING_VERSION = "$RemotingVersion" $ProgressPreference = 'SilentlyContinue' # Disable Progress bar for faster downloads @@ -57,7 +57,8 @@ Get-ChildItem -Recurse -Include windows -Directory | ForEach-Object { $jdkVersion = $items[0] $baseImage = $items[2] $basicTag = "jdk${jdkVersion}-${baseImage}" - $tags = @( $basicTag ) + $versionTag = "${RemotingVersion}-${BuildNumber}-${basicTag}" + $tags = @( $basicTag, $versionTag ) if($jdkVersion -eq $defaultBuild) { $tags += $baseImage } @@ -119,7 +120,7 @@ if($target -eq "test") { # Only fail the run afterwards in case of any test failures $testFailed = $false - $mod = Get-InstalledModule -Name Pester -MinimumVersion 5.0.0 -MaximumVersion 5.0.2 -ErrorAction SilentlyContinue + $mod = Get-InstalledModule -Name Pester -MinimumVersion 5.3.0 -MaximumVersion 5.3.3 -ErrorAction SilentlyContinue if($null -eq $mod) { $module = "c:\Program Files\WindowsPowerShell\Modules\Pester" if(Test-Path $module) { @@ -128,11 +129,11 @@ if($target -eq "test") { icacls $module /grant Administrators:'F' /inheritance:d /T Remove-Item -Path $module -Recurse -Force -Confirm:$false } - Install-Module -Force -Name Pester -MaximumVersion 5.0.2 + Install-Module -Force -Name Pester -MaximumVersion 5.3.3 } Import-Module Pester - $configuration = [PesterConfiguration]@{} + $configuration = [PesterConfiguration]::Default $configuration.Run.PassThru = $true $configuration.Run.Path = '.\tests' $configuration.Run.Exit = $true diff --git a/docker-bake.hcl b/docker-bake.hcl index 7b494ba3b..3c27ba203 100644 --- a/docker-bake.hcl +++ b/docker-bake.hcl @@ -1,10 +1,8 @@ group "linux" { targets = [ - "alpine_jdk8", "alpine_jdk11", "alpine_jdk17", "archlinux_jdk11", - "debian_jdk8", "debian_jdk11", "debian_jdk17", ] @@ -85,24 +83,6 @@ target "archlinux_jdk11" { platforms = ["linux/amd64"] } -target "alpine_jdk8" { - dockerfile = "8/alpine/Dockerfile" - context = "." - args = { - ALPINE_TAG = ALPINE_FULL_TAG - VERSION = REMOTING_VERSION - } - tags = [ - equal(ON_TAG, "true") ? "${REGISTRY}/${JENKINS_REPO}:${REMOTING_VERSION}-${BUILD_NUMBER}-alpine-jdk8": "", - equal(ON_TAG, "true") ? "${REGISTRY}/${JENKINS_REPO}:${REMOTING_VERSION}-${BUILD_NUMBER}-alpine${ALPINE_SHORT_TAG}-jdk8": "", - "${REGISTRY}/${JENKINS_REPO}:alpine-jdk8", - "${REGISTRY}/${JENKINS_REPO}:alpine${ALPINE_SHORT_TAG}-jdk8", - "${REGISTRY}/${JENKINS_REPO}:latest-alpine-jdk8", - "${REGISTRY}/${JENKINS_REPO}:latest-alpine${ALPINE_SHORT_TAG}-jdk8", - ] - platforms = ["linux/amd64"] -} - target "alpine_jdk11" { dockerfile = "11/alpine/Dockerfile" context = "." @@ -145,22 +125,6 @@ target "alpine_jdk17" { platforms = ["linux/amd64"] } -target "debian_jdk8" { - dockerfile = "8/bullseye/Dockerfile" - context = "." - args = { - VERSION = REMOTING_VERSION - } - tags = [ - equal(ON_TAG, "true") ? "${REGISTRY}/${JENKINS_REPO}:${REMOTING_VERSION}-${BUILD_NUMBER}-jdk8": "", - "${REGISTRY}/${JENKINS_REPO}:bullseye-jdk8", - "${REGISTRY}/${JENKINS_REPO}:jdk8", - "${REGISTRY}/${JENKINS_REPO}:latest-bullseye-jdk8", - "${REGISTRY}/${JENKINS_REPO}:latest-jdk8", - ] - platforms = ["linux/amd64"] -} - target "debian_jdk11" { dockerfile = "11/bullseye/Dockerfile" context = "."