From bced8ed2469e42cf07eef0fe0acc5d1ae88783a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Le=20Meur?= Date: Sun, 22 Oct 2023 23:39:40 +0200 Subject: [PATCH 01/10] chore(updatecli): add jdk21-preview manifest and adapt check-jdk.sh script --- updatecli/scripts/check-jdk.sh | 19 +++++-- updatecli/updatecli.d/jdk21-preview.yaml | 63 ++++++++++++++++++++++++ updatecli/updatecli.d/jdk21.yaml | 1 + 3 files changed, 78 insertions(+), 5 deletions(-) create mode 100644 updatecli/updatecli.d/jdk21-preview.yaml diff --git a/updatecli/scripts/check-jdk.sh b/updatecli/scripts/check-jdk.sh index 003f49178..549ab3319 100644 --- a/updatecli/scripts/check-jdk.sh +++ b/updatecli/scripts/check-jdk.sh @@ -29,11 +29,18 @@ function get_jdk_download_url() { ## JDK19 URLs have an underscore ('_') instead of a plus ('+') in their archive names echo "https://github.com/adoptium/temurin19-binaries/releases/download/jdk-${jdk_version}/OpenJDK19U-jdk_${platform}_hotspot_${jdk_version//+/_}"; return 0;; - 21*) - # JDK version (21+35-ea-beta) + 21*-ea-beta) + # JDK preview version (21+35-ea-beta, 21.0.1+12-ea-beta) + jdk_version="${jdk_version//-ea-beta}" ## https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21%2B35-ea-beta/OpenJDK21U-jdk_aarch64_linux_hotspot_ea_21-0-35.tar.gz - urlEncodedJDKVersion="${jdk_version//+/%2B}" - echo "https://github.com/adoptium/temurin21-binaries/releases/download/jdk-${urlEncodedJDKVersion}-ea-beta/OpenJDK21U-jdk_${platform}_hotspot_ea_21-0-$(echo ${jdk_version} | cut -d '+' -f 2 | cut -d '-' -f 1)" + ## https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.1%2B12-ea-beta/OpenJDK21U-jdk_x64_linux_hotspot_ea_21-0-1-12.tar.gz + dashJDKVersion="${jdk_version//+/-}" + completeDashJDKVersion="${dashJDKVersion//./-}" + echo "https://github.com/adoptium/temurin21-binaries/releases/download/jdk-${jdk_version//+/%2B}-ea-beta/OpenJDK21U-jdk_${platform}_hotspot_ea_${completeDashJDKVersion}" + return 0;; + 21*) + ## JDK21 URLs have an underscore ('_') instead of a plus ('+') in their archive names + echo "https://github.com/adoptium/temurin21-binaries/releases/download/jdk-${jdk_version}/OpenJDK21U-jdk_${platform}_hotspot_${jdk_version//+/_}"; return 0;; *) echo "ERROR: unsupported JDK version (${jdk_version})."; @@ -51,8 +58,10 @@ case "${1}" in platforms=("x64_linux" "x64_windows" "aarch64_linux" "s390x_linux");; 19.*+*) platforms=("x64_linux" "x64_windows" "aarch64_linux" "s390x_linux");; - 21*+*) + 21*+*-ea-beta) platforms=("x64_linux" "x64_windows" "aarch64_linux" "s390x_linux");; + 21*+*) + platforms=("x64_linux" "x64_windows" "aarch64_linux");; *) echo "ERROR: unsupported JDK version (${1})."; exit 1;; diff --git a/updatecli/updatecli.d/jdk21-preview.yaml b/updatecli/updatecli.d/jdk21-preview.yaml new file mode 100644 index 000000000..d6f812565 --- /dev/null +++ b/updatecli/updatecli.d/jdk21-preview.yaml @@ -0,0 +1,63 @@ +--- +name: Bump JDK21 preview version (EA) for all Linux images + +scms: + default: + kind: github + spec: + user: "{{ .github.user }}" + email: "{{ .github.email }}" + owner: "{{ .github.owner }}" + repository: "{{ .github.repository }}" + token: "{{ requiredEnv .github.token }}" + username: "{{ .github.username }}" + branch: "{{ .github.branch }}" + temurin21-binaries: + kind: "github" + spec: + user: "{{ .github.user }}" + email: "{{ .github.email }}" + owner: "adoptium" + repository: "temurin21-binaries" + token: '{{ requiredEnv .github.token }}' + branch: "main" + +sources: + getLatestJDK21EAVersion: + name: Get the latest Adoptium JDK21 version + kind: gittag + scmid: temurin21-binaries + spec: + versionfilter: + kind: regex + pattern: ".*-ea-.*" + transformers: + - trimprefix: "jdk-" + - trimsuffix: "-ea-beta" + +conditions: + checkIfReleaseIsAvailable: + kind: shell + spec: + command: bash ./updatecli/scripts/check-jdk.sh # source input value passed as argument + transformers: + - addsuffix: "-ea-beta" + +targets: + setJDK21PreviewVersionDockerBake: + name: "Bump JDK21 version for Linux images in the docker-bake.hcl file" + kind: hcl + spec: + file: docker-bake.hcl + path: variable.JAVA21_PREVIEW_VERSION.default + scmid: default + +actions: + default: + kind: github/pullrequest + scmid: default + title: Bump JDK21 version to {{ source "getLatestJDK21EAVersion" }} + spec: + labels: + - dependencies + - jdk21-preview diff --git a/updatecli/updatecli.d/jdk21.yaml b/updatecli/updatecli.d/jdk21.yaml index 43928b7a9..cb12451d4 100644 --- a/updatecli/updatecli.d/jdk21.yaml +++ b/updatecli/updatecli.d/jdk21.yaml @@ -58,3 +58,4 @@ actions: spec: labels: - dependencies + - jdk21 From 1ead8c75aa6d15985dd9bdea15633618eb879f7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Le=20Meur?= Date: Sun, 22 Oct 2023 23:50:54 +0200 Subject: [PATCH 02/10] fix titles and jdk21 source & condition --- updatecli/updatecli.d/jdk21-preview.yaml | 8 ++++---- updatecli/updatecli.d/jdk21.yaml | 14 ++++++++++---- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/updatecli/updatecli.d/jdk21-preview.yaml b/updatecli/updatecli.d/jdk21-preview.yaml index d6f812565..c6209518b 100644 --- a/updatecli/updatecli.d/jdk21-preview.yaml +++ b/updatecli/updatecli.d/jdk21-preview.yaml @@ -23,8 +23,8 @@ scms: branch: "main" sources: - getLatestJDK21EAVersion: - name: Get the latest Adoptium JDK21 version + getLatestJDK21PreviewVersion: + name: Get the latest Adoptium preview (EA) JDK21 version kind: gittag scmid: temurin21-binaries spec: @@ -45,7 +45,7 @@ conditions: targets: setJDK21PreviewVersionDockerBake: - name: "Bump JDK21 version for Linux images in the docker-bake.hcl file" + name: "Bump preview (EA) JDK21 version for Linux images in the docker-bake.hcl file" kind: hcl spec: file: docker-bake.hcl @@ -56,7 +56,7 @@ actions: default: kind: github/pullrequest scmid: default - title: Bump JDK21 version to {{ source "getLatestJDK21EAVersion" }} + title: Bump preview (EA) JDK21 version to {{ source "getLatestJDK21PreviewVersion" }} spec: labels: - dependencies diff --git a/updatecli/updatecli.d/jdk21.yaml b/updatecli/updatecli.d/jdk21.yaml index cb12451d4..fee3cfb7c 100644 --- a/updatecli/updatecli.d/jdk21.yaml +++ b/updatecli/updatecli.d/jdk21.yaml @@ -23,23 +23,29 @@ scms: branch: "main" sources: - getLatestJDK21EAVersion: + getLatestJDK21Version: name: Get the latest Adoptium JDK21 version kind: gittag scmid: temurin21-binaries spec: versionfilter: kind: regex - pattern: ".*-ea-.*" + pattern: "\\d$" transformers: - trimprefix: "jdk-" - - trimsuffix: "-ea-beta" + - replacer: + from: "+" + to: "_" conditions: checkIfReleaseIsAvailable: kind: shell spec: command: bash ./updatecli/scripts/check-jdk.sh # source input value passed as argument + transformers: + - replacer: + from: "_" + to: "+" targets: setJDK21Version: @@ -54,7 +60,7 @@ actions: default: kind: github/pullrequest scmid: default - title: Bump JDK21 version to {{ source "getLatestJDK21EAVersion" }} + title: Bump JDK21 version to {{ source "getLatestJDK21Version" }} spec: labels: - dependencies From 59eee443a62394b40b0b6d72bdce6a15fcde4931 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 23 Oct 2023 09:30:12 +0000 Subject: [PATCH 03/10] chore(deps): bump release-drafter/release-drafter from 5.24.0 to 5.25.0 Bumps [release-drafter/release-drafter](https://github.com/release-drafter/release-drafter) from 5.24.0 to 5.25.0. - [Release notes](https://github.com/release-drafter/release-drafter/releases) - [Commits](https://github.com/release-drafter/release-drafter/compare/v5.24.0...v5.25.0) --- updated-dependencies: - dependency-name: release-drafter/release-drafter dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- .github/workflows/release-drafter.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml index 3ccf4874b..ab8fa9f0b 100644 --- a/.github/workflows/release-drafter.yml +++ b/.github/workflows/release-drafter.yml @@ -20,6 +20,6 @@ jobs: runs-on: ubuntu-latest steps: # Drafts your next Release notes as Pull Requests are merged into the default branch - - uses: release-drafter/release-drafter@v5.24.0 + - uses: release-drafter/release-drafter@v5.25.0 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From bfaf955786b22c6ae14d8f2b70121135ae953ae3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 23 Oct 2023 09:30:17 +0000 Subject: [PATCH 04/10] chore(deps): bump updatecli/updatecli-action from 2.44.0 to 2.46.1 Bumps [updatecli/updatecli-action](https://github.com/updatecli/updatecli-action) from 2.44.0 to 2.46.1. - [Release notes](https://github.com/updatecli/updatecli-action/releases) - [Commits](https://github.com/updatecli/updatecli-action/compare/v2.44.0...v2.46.1) --- updated-dependencies: - dependency-name: updatecli/updatecli-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- .github/workflows/updatecli.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/updatecli.yaml b/.github/workflows/updatecli.yaml index 057da1900..2169f034a 100644 --- a/.github/workflows/updatecli.yaml +++ b/.github/workflows/updatecli.yaml @@ -15,7 +15,7 @@ jobs: uses: actions/checkout@v4 - name: Install Updatecli in the runner - uses: updatecli/updatecli-action@v2.44.0 + uses: updatecli/updatecli-action@v2.46.1 - name: Run Updatecli in Dry Run mode run: updatecli diff --config ./updatecli/updatecli.d --values ./updatecli/values.github-action.yaml From fbd5999cdaf38539372a8a5bcebfd8f7e92e76a3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 23 Oct 2023 09:55:42 +0000 Subject: [PATCH 05/10] chore(deps): bump archlinux in /archlinux Bumps archlinux from base-20231001.0.182270 to base-20231015.0.185077. --- updated-dependencies: - dependency-name: archlinux dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- archlinux/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/archlinux/Dockerfile b/archlinux/Dockerfile index 7f1f9c129..0984f6e57 100644 --- a/archlinux/Dockerfile +++ b/archlinux/Dockerfile @@ -34,7 +34,7 @@ RUN jlink \ --compress=2 \ --output /javaruntime -FROM archlinux:base-20231001.0.182270 +FROM archlinux:base-20231015.0.185077 ARG user=jenkins ARG group=jenkins From 4419179c65d9055e637bfcae61fe59710bb54630 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 23 Oct 2023 15:10:42 +0000 Subject: [PATCH 06/10] Bump the Jenkins remoting version to 3181.v78543a_987053 (#542) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: Bump the Jenkins remoting version on Windows Nanoserver Made with ❤️️ by updatecli * chore: Bump the Jenkins remoting version on the linux build.sh file Made with ❤️️ by updatecli * chore: Bump the Jenkins remoting version on Windows Server Core Made with ❤️️ by updatecli * chore: Bump the Jenkins remoting version on the env.props file Made with ❤️️ by updatecli * chore: Bump the Jenkins remoting version on the windows build.ps1 file Made with ❤️️ by updatecli * chore: Bump the Jenkins remoting version on the docker-bake.hcl file Made with ❤️️ by updatecli * chore: Bump the Jenkins remoting version on Debian Bullseye Made with ❤️️ by updatecli * chore: Bump the Jenkins remoting version on Alpine Made with ❤️️ by updatecli * chore: Bump the Jenkins remoting version on Archlinux Made with ❤️️ by updatecli --------- Co-authored-by: GitHub Actions <41898282+github-actions[bot]@users.noreply.github.com> --- alpine/Dockerfile | 2 +- archlinux/Dockerfile | 2 +- build.ps1 | 2 +- build.sh | 2 +- debian/Dockerfile | 2 +- docker-bake.hcl | 2 +- env.props | 2 +- windows/nanoserver/Dockerfile | 2 +- windows/windowsservercore/Dockerfile | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/alpine/Dockerfile b/alpine/Dockerfile index cb3f431a2..57a2e0734 100644 --- a/alpine/Dockerfile +++ b/alpine/Dockerfile @@ -70,7 +70,7 @@ RUN apk add --no-cache \ tzdata-utils \ && rm -rf /tmp/*.apk /tmp/gcc /tmp/gcc-libs.tar* /tmp/libz /tmp/libz.tar.xz /var/cache/apk/* -ARG VERSION=3180.v3dd999d24861 +ARG VERSION=3181.v78543a_987053 ADD --chown="${user}":"${group}" "https://repo.jenkins-ci.org/public/org/jenkins-ci/main/remoting/${VERSION}/remoting-${VERSION}.jar" /usr/share/jenkins/agent.jar RUN chmod 0644 /usr/share/jenkins/agent.jar \ && ln -sf /usr/share/jenkins/agent.jar /usr/share/jenkins/slave.jar diff --git a/archlinux/Dockerfile b/archlinux/Dockerfile index 0984f6e57..8a02112c8 100644 --- a/archlinux/Dockerfile +++ b/archlinux/Dockerfile @@ -49,7 +49,7 @@ ENV TZ=Etc/UTC RUN pacman -Syu curl git git-lfs openssh tzdata --noconfirm -ARG VERSION=3180.v3dd999d24861 +ARG VERSION=3181.v78543a_987053 ADD --chown="${user}":"${group}" "https://repo.jenkins-ci.org/public/org/jenkins-ci/main/remoting/${VERSION}/remoting-${VERSION}.jar" /usr/share/jenkins/agent.jar RUN chmod 0644 /usr/share/jenkins/agent.jar \ && ln -sf /usr/share/jenkins/agent.jar /usr/share/jenkins/slave.jar diff --git a/build.ps1 b/build.ps1 index ebff35a1c..b6f58cc78 100644 --- a/build.ps1 +++ b/build.ps1 @@ -3,7 +3,7 @@ Param( [Parameter(Position=1)] [String] $Target = "build", [String] $Build = '', - [String] $RemotingVersion = '3180.v3dd999d24861', + [String] $RemotingVersion = '3181.v78543a_987053', [String] $BuildNumber = '1', [switch] $PushVersions = $false, [switch] $DisableEnvProps = $false diff --git a/build.sh b/build.sh index c985c040d..45eadff16 100755 --- a/build.sh +++ b/build.sh @@ -7,7 +7,7 @@ OPTIND=1 target="build" build_number="1" -remoting_version="3180.v3dd999d24861" +remoting_version="3181.v78543a_987053" disable_env_props=0 exit_result=0 diff --git a/debian/Dockerfile b/debian/Dockerfile index b398e7f12..ac65eb6c5 100644 --- a/debian/Dockerfile +++ b/debian/Dockerfile @@ -81,7 +81,7 @@ RUN apt-get update \ && apt-get clean \ && rm -rf /tmp/* /var/cache/* /var/lib/apt/lists/* -ARG VERSION=3180.v3dd999d24861 +ARG VERSION=3181.v78543a_987053 ADD --chown="${user}":"${group}" "https://repo.jenkins-ci.org/public/org/jenkins-ci/main/remoting/${VERSION}/remoting-${VERSION}.jar" /usr/share/jenkins/agent.jar RUN chmod 0644 /usr/share/jenkins/agent.jar \ && ln -sf /usr/share/jenkins/agent.jar /usr/share/jenkins/slave.jar diff --git a/docker-bake.hcl b/docker-bake.hcl index db5a36c7b..dbb51d436 100644 --- a/docker-bake.hcl +++ b/docker-bake.hcl @@ -44,7 +44,7 @@ group "linux-ppc64le" { } variable "REMOTING_VERSION" { - default = "3180.v3dd999d24861" + default = "3181.v78543a_987053" } variable "REGISTRY" { diff --git a/env.props b/env.props index 2cae85ad2..47a410573 100644 --- a/env.props +++ b/env.props @@ -1 +1 @@ -REMOTING_VERSION=3180.v3dd999d24861 +REMOTING_VERSION=3181.v78543a_987053 diff --git a/windows/nanoserver/Dockerfile b/windows/nanoserver/Dockerfile index b18817a67..d826782f5 100644 --- a/windows/nanoserver/Dockerfile +++ b/windows/nanoserver/Dockerfile @@ -88,7 +88,7 @@ ARG AGENT_WORKDIR=${AGENT_ROOT}/Work ENV AGENT_WORKDIR=${AGENT_WORKDIR} # Get the Agent from the Jenkins Artifacts Repository -ARG VERSION=3180.v3dd999d24861 +ARG VERSION=3181.v78543a_987053 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 ; ` diff --git a/windows/windowsservercore/Dockerfile b/windows/windowsservercore/Dockerfile index ffbc73c52..a3a740d62 100644 --- a/windows/windowsservercore/Dockerfile +++ b/windows/windowsservercore/Dockerfile @@ -81,7 +81,7 @@ ARG AGENT_WORKDIR=${AGENT_ROOT}/Work ENV AGENT_WORKDIR=${AGENT_WORKDIR} # Get the Agent from the Jenkins Artifacts Repository -ARG VERSION=3180.v3dd999d24861 +ARG VERSION=3181.v78543a_987053 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 ; ` From 2bbe69ff74f8877b5b37967d180a78b9ee8c6217 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Le=20Meur?= <91831478+lemeurherve@users.noreply.github.com> Date: Tue, 24 Oct 2023 10:13:51 +0200 Subject: [PATCH 07/10] fix(jdk21-preview): correct `JAVA_MAJOR_VERSION` extraction for the EA release link (#538) * fix(jdk21-preview): hardcoding `21` in the repo name of the EA release link * fix, no hardcoding and correct JAVA_MAJOR_VERSION extraction * Update debian/preview/Dockerfile Co-authored-by: Damien Duportal * Update Dockerfile * Update Dockerfile --------- Co-authored-by: Damien Duportal --- debian/preview/Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/debian/preview/Dockerfile b/debian/preview/Dockerfile index 225d37332..b727cea5c 100644 --- a/debian/preview/Dockerfile +++ b/debian/preview/Dockerfile @@ -6,7 +6,7 @@ ARG TARGETPLATFORM SHELL ["/bin/bash", "-o", "pipefail", "-c"] ## Example of preview (EA) jdk21 JAVA_VERSION values: -# 21+35 (special case) +# 21+35 (note: only one number before the "+") # 21.0.1+12 ## Example of preview (EA) release download link: # https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21%2B35-ea-beta/OpenJDK21U-jdk_x64_linux_hotspot_ea_21-0-35.tar.gz @@ -18,8 +18,8 @@ RUN set -x; apt-get update \ ca-certificates \ jq \ wget \ - && DASHED_JAVA_VERSION=$(echo "${JAVA_VERSION}" | sed -e 's/\./-/g' -e 's/+/-/' -e 's/21-35/21-0-35/') \ - && JAVA_MAJOR_VERSION=$(echo $JAVA_VERSION | cut -d'+' -f1) \ + && DASHED_JAVA_VERSION=$(echo "$JAVA_VERSION" | sed -e 's/\./-/g' -e 's/+/-/' -e 's/21-35/21-0-35/') \ + && JAVA_MAJOR_VERSION=$(echo "$JAVA_VERSION" | cut -d'+' -f1 | cut -d'.' -f1) \ && ENCODED_JAVA_VERSION=$(echo "$JAVA_VERSION" | jq "@uri" -jRr) \ && CONVERTED_ARCH=$(arch | sed -e 's/x86_64/x64/' -e 's/armv7l/arm/') \ && wget --quiet https://github.com/adoptium/temurin"${JAVA_MAJOR_VERSION}"-binaries/releases/download/jdk-"${ENCODED_JAVA_VERSION}"-ea-beta/OpenJDK"${JAVA_MAJOR_VERSION}"U-jdk_"${CONVERTED_ARCH}"_linux_hotspot_ea_"${DASHED_JAVA_VERSION}".tar.gz -O /tmp/jdk.tar.gz \ From 8a12e142217a8da955266e94400f14f5958bc8ad Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 24 Oct 2023 08:46:04 +0000 Subject: [PATCH 08/10] chore: Bump preview (EA) JDK21 version for Linux images in the docker... (#543) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ... -bake.hcl file Made with ❤️️ by updatecli Co-authored-by: GitHub Actions <41898282+github-actions[bot]@users.noreply.github.com> --- docker-bake.hcl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-bake.hcl b/docker-bake.hcl index dbb51d436..79f48373d 100644 --- a/docker-bake.hcl +++ b/docker-bake.hcl @@ -88,7 +88,7 @@ variable "JAVA21_VERSION" { } variable "JAVA21_PREVIEW_VERSION" { - default = "21+35" + default = "21.0.1+12" } target "archlinux_jdk11" { From 194eafc99be4bfa26ec8baa0eb4e5b0125ad7223 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 25 Oct 2023 14:25:30 +0000 Subject: [PATCH 09/10] Bump the Jenkins remoting version to 3186.vc3b_7249b_87eb_ (#544) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: Bump the Jenkins remoting version on Alpine Made with ❤️️ by updatecli * chore: Bump the Jenkins remoting version on the windows build.ps1 file Made with ❤️️ by updatecli * chore: Bump the Jenkins remoting version on the linux build.sh file Made with ❤️️ by updatecli * chore: Bump the Jenkins remoting version on the docker-bake.hcl file Made with ❤️️ by updatecli * chore: Bump the Jenkins remoting version on Debian Bullseye Made with ❤️️ by updatecli * chore: Bump the Jenkins remoting version on Archlinux Made with ❤️️ by updatecli * chore: Bump the Jenkins remoting version on Windows Nanoserver Made with ❤️️ by updatecli * chore: Bump the Jenkins remoting version on the env.props file Made with ❤️️ by updatecli * chore: Bump the Jenkins remoting version on Windows Server Core Made with ❤️️ by updatecli --------- Co-authored-by: GitHub Actions <41898282+github-actions[bot]@users.noreply.github.com> --- alpine/Dockerfile | 2 +- archlinux/Dockerfile | 2 +- build.ps1 | 2 +- build.sh | 2 +- debian/Dockerfile | 2 +- docker-bake.hcl | 2 +- env.props | 2 +- windows/nanoserver/Dockerfile | 2 +- windows/windowsservercore/Dockerfile | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/alpine/Dockerfile b/alpine/Dockerfile index 57a2e0734..bf29f3811 100644 --- a/alpine/Dockerfile +++ b/alpine/Dockerfile @@ -70,7 +70,7 @@ RUN apk add --no-cache \ tzdata-utils \ && rm -rf /tmp/*.apk /tmp/gcc /tmp/gcc-libs.tar* /tmp/libz /tmp/libz.tar.xz /var/cache/apk/* -ARG VERSION=3181.v78543a_987053 +ARG VERSION=3186.vc3b_7249b_87eb_ ADD --chown="${user}":"${group}" "https://repo.jenkins-ci.org/public/org/jenkins-ci/main/remoting/${VERSION}/remoting-${VERSION}.jar" /usr/share/jenkins/agent.jar RUN chmod 0644 /usr/share/jenkins/agent.jar \ && ln -sf /usr/share/jenkins/agent.jar /usr/share/jenkins/slave.jar diff --git a/archlinux/Dockerfile b/archlinux/Dockerfile index 8a02112c8..eb473f2d3 100644 --- a/archlinux/Dockerfile +++ b/archlinux/Dockerfile @@ -49,7 +49,7 @@ ENV TZ=Etc/UTC RUN pacman -Syu curl git git-lfs openssh tzdata --noconfirm -ARG VERSION=3181.v78543a_987053 +ARG VERSION=3186.vc3b_7249b_87eb_ ADD --chown="${user}":"${group}" "https://repo.jenkins-ci.org/public/org/jenkins-ci/main/remoting/${VERSION}/remoting-${VERSION}.jar" /usr/share/jenkins/agent.jar RUN chmod 0644 /usr/share/jenkins/agent.jar \ && ln -sf /usr/share/jenkins/agent.jar /usr/share/jenkins/slave.jar diff --git a/build.ps1 b/build.ps1 index b6f58cc78..504b3f0f6 100644 --- a/build.ps1 +++ b/build.ps1 @@ -3,7 +3,7 @@ Param( [Parameter(Position=1)] [String] $Target = "build", [String] $Build = '', - [String] $RemotingVersion = '3181.v78543a_987053', + [String] $RemotingVersion = '3186.vc3b_7249b_87eb_', [String] $BuildNumber = '1', [switch] $PushVersions = $false, [switch] $DisableEnvProps = $false diff --git a/build.sh b/build.sh index 45eadff16..23f8f8819 100755 --- a/build.sh +++ b/build.sh @@ -7,7 +7,7 @@ OPTIND=1 target="build" build_number="1" -remoting_version="3181.v78543a_987053" +remoting_version="3186.vc3b_7249b_87eb_" disable_env_props=0 exit_result=0 diff --git a/debian/Dockerfile b/debian/Dockerfile index ac65eb6c5..34c496c64 100644 --- a/debian/Dockerfile +++ b/debian/Dockerfile @@ -81,7 +81,7 @@ RUN apt-get update \ && apt-get clean \ && rm -rf /tmp/* /var/cache/* /var/lib/apt/lists/* -ARG VERSION=3181.v78543a_987053 +ARG VERSION=3186.vc3b_7249b_87eb_ ADD --chown="${user}":"${group}" "https://repo.jenkins-ci.org/public/org/jenkins-ci/main/remoting/${VERSION}/remoting-${VERSION}.jar" /usr/share/jenkins/agent.jar RUN chmod 0644 /usr/share/jenkins/agent.jar \ && ln -sf /usr/share/jenkins/agent.jar /usr/share/jenkins/slave.jar diff --git a/docker-bake.hcl b/docker-bake.hcl index 79f48373d..d4a89b16f 100644 --- a/docker-bake.hcl +++ b/docker-bake.hcl @@ -44,7 +44,7 @@ group "linux-ppc64le" { } variable "REMOTING_VERSION" { - default = "3181.v78543a_987053" + default = "3186.vc3b_7249b_87eb_" } variable "REGISTRY" { diff --git a/env.props b/env.props index 47a410573..2f4f906d0 100644 --- a/env.props +++ b/env.props @@ -1 +1 @@ -REMOTING_VERSION=3181.v78543a_987053 +REMOTING_VERSION=3186.vc3b_7249b_87eb_ diff --git a/windows/nanoserver/Dockerfile b/windows/nanoserver/Dockerfile index d826782f5..761707728 100644 --- a/windows/nanoserver/Dockerfile +++ b/windows/nanoserver/Dockerfile @@ -88,7 +88,7 @@ ARG AGENT_WORKDIR=${AGENT_ROOT}/Work ENV AGENT_WORKDIR=${AGENT_WORKDIR} # Get the Agent from the Jenkins Artifacts Repository -ARG VERSION=3181.v78543a_987053 +ARG VERSION=3186.vc3b_7249b_87eb_ 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 ; ` diff --git a/windows/windowsservercore/Dockerfile b/windows/windowsservercore/Dockerfile index a3a740d62..b5afc5e6b 100644 --- a/windows/windowsservercore/Dockerfile +++ b/windows/windowsservercore/Dockerfile @@ -81,7 +81,7 @@ ARG AGENT_WORKDIR=${AGENT_ROOT}/Work ENV AGENT_WORKDIR=${AGENT_WORKDIR} # Get the Agent from the Jenkins Artifacts Repository -ARG VERSION=3181.v78543a_987053 +ARG VERSION=3186.vc3b_7249b_87eb_ 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 ; ` From 95a221f97fab7720bb2a270ac2b14971201d63f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Le=20Meur?= Date: Thu, 26 Oct 2023 00:59:42 +0200 Subject: [PATCH 10/10] chore(Windows): add `-DryRun` option to build.ps1 script --- build.ps1 | 120 ++++++++++++++++++++++++++++++------------------------ 1 file changed, 66 insertions(+), 54 deletions(-) diff --git a/build.ps1 b/build.ps1 index ebff35a1c..536c17fdc 100644 --- a/build.ps1 +++ b/build.ps1 @@ -6,7 +6,8 @@ Param( [String] $RemotingVersion = '3180.v3dd999d24861', [String] $BuildNumber = '1', [switch] $PushVersions = $false, - [switch] $DisableEnvProps = $false + [switch] $DisableEnvProps = $false, + [switch] $DryRun = $false ) $ErrorActionPreference = 'Stop' @@ -108,16 +109,19 @@ Invoke-Expression "$baseDockerCmd config --services" 2>$null | ForEach-Object { Write-Host "= PREPARE: List of $Organization/$Repository images and tags to be processed:" ConvertTo-Json $builds +$dockerBuildCmd = $baseDockerBuildCmd +$current = 'all images' if(![System.String]::IsNullOrWhiteSpace($Build) -and $builds.ContainsKey($Build)) { - Write-Host "= BUILD: Building image ${Build}..." + $current = "$Build image" $dockerBuildCmd = '{0} {1}' -f $baseDockerBuildCmd, $Build - Invoke-Expression $dockerBuildCmd - Write-Host "= BUILD: Finished building image ${Build}" +} +Write-Host "= BUILD: Building ${current}..." +if ($DryRun) { + Write-Host "(dry-run) $dockerBuildCmd" } else { - Write-Host "= BUILD: Building all images..." - Invoke-Expression $baseDockerBuildCmd - Write-Host "= BUILD: Finished building all image" + Invoke-Expression $dockerBuildCmd } +Write-Host "= BUILD: Finished building ${current}" if($lastExitCode -ne 0) { exit $lastExitCode @@ -153,49 +157,53 @@ function Test-Image { } if($target -eq "test") { - Write-Host "= TEST: Starting test harness" - - # Only fail the run afterwards in case of any test failures - $testFailed = $false - $mod = Get-InstalledModule -Name Pester -MinimumVersion 5.3.0 -MaximumVersion 5.3.3 -ErrorAction SilentlyContinue - if($null -eq $mod) { - Write-Host "= TEST: Pester 5.3.x not found: installing..." - $module = "c:\Program Files\WindowsPowerShell\Modules\Pester" - if(Test-Path $module) { - takeown /F $module /A /R - icacls $module /reset - icacls $module /grant Administrators:'F' /inheritance:d /T - Remove-Item -Path $module -Recurse -Force -Confirm:$false + if ($DryRun) { + Write-Host "= TEST: (dry-run) test harness" + } else { + Write-Host "= TEST: Starting test harness" + + # Only fail the run afterwards in case of any test failures + $testFailed = $false + $mod = Get-InstalledModule -Name Pester -MinimumVersion 5.3.0 -MaximumVersion 5.3.3 -ErrorAction SilentlyContinue + if($null -eq $mod) { + Write-Host "= TEST: Pester 5.3.x not found: installing..." + $module = "c:\Program Files\WindowsPowerShell\Modules\Pester" + if(Test-Path $module) { + takeown /F $module /A /R + icacls $module /reset + icacls $module /grant Administrators:'F' /inheritance:d /T + Remove-Item -Path $module -Recurse -Force -Confirm:$false + } + Install-Module -Force -Name Pester -MaximumVersion 5.3.3 } - Install-Module -Force -Name Pester -MaximumVersion 5.3.3 - } - Import-Module Pester - Write-Host "= TEST: Setting up Pester environment..." - $configuration = [PesterConfiguration]::Default - $configuration.Run.PassThru = $true - $configuration.Run.Path = '.\tests' - $configuration.Run.Exit = $true - $configuration.TestResult.Enabled = $true - $configuration.TestResult.OutputFormat = 'JUnitXml' - $configuration.Output.Verbosity = 'Diagnostic' - $configuration.CodeCoverage.Enabled = $false - - if(![System.String]::IsNullOrWhiteSpace($Build) -and $builds.ContainsKey($Build)) { - Test-Image $Build - } else { - Write-Host "= TEST: Testing all images..." - foreach($image in $builds.Keys) { - Test-Image $image + Import-Module Pester + Write-Host "= TEST: Setting up Pester environment..." + $configuration = [PesterConfiguration]::Default + $configuration.Run.PassThru = $true + $configuration.Run.Path = '.\tests' + $configuration.Run.Exit = $true + $configuration.TestResult.Enabled = $true + $configuration.TestResult.OutputFormat = 'JUnitXml' + $configuration.Output.Verbosity = 'Diagnostic' + $configuration.CodeCoverage.Enabled = $false + + if(![System.String]::IsNullOrWhiteSpace($Build) -and $builds.ContainsKey($Build)) { + Test-Image $Build + } else { + Write-Host "= TEST: Testing all images..." + foreach($image in $builds.Keys) { + Test-Image $image + } } - } - # Fail if any test failures - if($testFailed -ne $false) { - Write-Error "Test stage failed!" - exit 1 - } else { - Write-Host "Test stage passed!" + # Fail if any test failures + if($testFailed -ne $false) { + Write-Error "Test stage failed!" + exit 1 + } else { + Write-Host "Test stage passed!" + } } } @@ -204,14 +212,18 @@ function Publish-Image { [String] $Build, [String] $ImageName ) - # foreach($tag in $builds[$ImageName]['Tags']) { - # $fullImageName = '{0}/{1}:{2}' -f $Organization, $Repository, $tag - # $cmd = "docker tag {0} {1}" -f $ImageName, $tag - Write-Host "= PUBLISH: Tagging $Build => full name = $ImageName" - docker tag "$Build" "$ImageName" - - Write-Host "= PUBLISH: Publishing $ImageName..." - docker push "$ImageName" + if ($DryRun) { + Write-Host "= PUBLISH: (dry-run) docker tag then publish '$Build $ImageName'" + } else { + # foreach($tag in $builds[$ImageName]['Tags']) { + # $fullImageName = '{0}/{1}:{2}' -f $Organization, $Repository, $tag + # $cmd = "docker tag {0} {1}" -f $ImageName, $tag + Write-Host "= PUBLISH: Tagging $Build => full name = $ImageName" + docker tag "$Build" "$ImageName" + + Write-Host "= PUBLISH: Publishing $ImageName..." + docker push "$ImageName" + } }