Skip to content

Commit

Permalink
Merge branch 'master' into docker-bake-windows
Browse files Browse the repository at this point in the history
  • Loading branch information
lemeurherve authored Jun 18, 2024
2 parents ca4a8b3 + 3b45fbd commit 13d6e93
Show file tree
Hide file tree
Showing 13 changed files with 16 additions and 215 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/updatecli.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
uses: actions/checkout@v4

- name: Install Updatecli in the runner
uses: updatecli/updatecli-action@v2.59.0
uses: updatecli/updatecli-action@v2.60.0

- name: Run Updatecli in Dry Run mode
run: updatecli diff --config ./updatecli/updatecli.d --values ./updatecli/values.github-action.yaml --values ./updatecli/values.temurin.yaml
Expand Down
4 changes: 2 additions & 2 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ pipeline {
environment name: 'IMAGE_TYPE', value: 'linux'
}
steps {
sh 'make ci-init'
sh 'make docker-init'
}
}
stage('Build and Test') {
Expand All @@ -58,7 +58,7 @@ pipeline {
sh 'make build'
sh 'make test'
// If the tests are passing for Linux AMD64, then we can build all the CPU architectures
sh 'make buildall'
sh 'make every-build'
} else {
powershell '& ./build.ps1 test'
}
Expand Down
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,18 +39,18 @@ check-reqs:
@$(call check_cli,jq)

## This function is specific to Jenkins infrastructure and isn't required in other contexts
ci-init: check-reqs
docker-init: check-reqs
@set -x; docker buildx create --use
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes

build: check-reqs
@set -x; $(bake_cli) --set '*.platform=linux/$(ARCH)' $(shell make --silent list)
@set -x; $(bake_cli) $(shell make --silent list) --set '*.platform=linux/$(ARCH)'

build-%:
@$(call check_image,$*)
@set -x; $(bake_cli) --set '*.platform=linux/$(ARCH)' '$*'
@set -x; $(bake_cli) '$*' --set '*.platform=linux/$(ARCH)'

buildall: check-reqs
every-build: check-reqs
@set -x; $(bake_base_cli) linux

show:
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ make test-alpine_jdk17
You can build all images (even those unsupported by your current architecture) by running:

```bash
make buildall
make every-build
```

#### Other `make` targets
Expand Down Expand Up @@ -208,7 +208,7 @@ make: 'bats' is up to date.
`publish` allows the publication of all images targeted by 'linux' to a registry.
`ci-init` is dedicated to Jenkins infrastructure for initialising docker and isn't required in other contexts.
`docker-init` is dedicated to Jenkins infrastructure for initializing docker and isn't required in other contexts.
### Building and testing on Windows
Expand Down
2 changes: 0 additions & 2 deletions build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ Param(
[Parameter(Position=1)]
# Default build.ps1 target
[String] $Target = 'build',
[String] $Build = '',
# Image version
[String] $VersionTag = '0.0.1',
# Windows flavor and windows version to build
Expand Down Expand Up @@ -102,7 +101,6 @@ function Test-Image {
Remove-Item -Recurse -Force $targetPath
}
New-Item -Path $targetPath -Type Directory | Out-Null
# $configuration.Run.Path = 'tests\sshAgent.Tests.ps1'
$configuration.TestResult.OutputPath = '{0}\junit-results.xml' -f $targetPath
$TestResults = Invoke-Pester -Configuration $configuration
$failed = $false
Expand Down
2 changes: 1 addition & 1 deletion debian/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
# 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 DEBIAN_RELEASE=bookworm-20240513
ARG DEBIAN_RELEASE=bookworm-20240612
FROM debian:"${DEBIAN_RELEASE}"-slim as jre-build

SHELL ["/bin/bash", "-e", "-u", "-o", "pipefail", "-c"]
Expand Down
89 changes: 0 additions & 89 deletions debian/preview/Dockerfile

This file was deleted.

34 changes: 1 addition & 33 deletions docker-bake.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ group "linux" {
targets = [
"alpine",
"debian",
"debian_jdk21-preview",
]
}

Expand All @@ -20,12 +19,6 @@ group "linux-arm64" {
]
}

group "linux-arm32" {
targets = [
"debian_jdk21-preview",
]
}

group "linux-s390x" {
targets = [
"debian_jdk11",
Expand Down Expand Up @@ -83,15 +76,10 @@ variable "JAVA21_VERSION" {
default = "21.0.3_9"
}

variable "JAVA21_PREVIEW_VERSION" {
default = "21.0.1+12"
}

variable "DEBIAN_RELEASE" {
default = "bookworm-20240513"
default = "bookworm-20240612"
}

# Allow overriding the Windows version to build if set
variable "WINDOWS_VERSION_OVERRIDE" {
default = ""
}
Expand Down Expand Up @@ -207,26 +195,6 @@ target "debian" {
platforms = debian_platforms(jdk)
}

target "debian_jdk21-preview" {
dockerfile = "debian/preview/Dockerfile"
context = "."
args = {
JAVA_VERSION = JAVA21_PREVIEW_VERSION
DEBIAN_RELEASE = DEBIAN_RELEASE
}
tags = [
# If there is a tag, add the versioned tag suffixed by the jdk
equal(ON_TAG, "true") ? "${REGISTRY}/${JENKINS_REPO}:${VERSION}-jdk21-preview" : "",
"${REGISTRY}/${JENKINS_REPO}:bookworm-jdk21-preview",
"${REGISTRY}/${JENKINS_REPO}:debian-jdk21-preview",
"${REGISTRY}/${JENKINS_REPO}:jdk21-preview",
"${REGISTRY}/${JENKINS_REPO}:latest-bookworm-jdk21-preview",
"${REGISTRY}/${JENKINS_REPO}:latest-debian-jdk21-preview",
"${REGISTRY}/${JENKINS_REPO}:latest-jdk21-preview",
]
platforms = ["linux/arm/v7"]
}

target "nanoserver" {
matrix = {
jdk = jdks_to_build
Expand Down
4 changes: 3 additions & 1 deletion tests/sshAgent.Tests.ps1
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
Import-Module -DisableNameChecking -Force $PSScriptRoot/test_helpers.psm1

$global:IMAGE_NAME = Get-EnvOrDefault 'IMAGE_NAME' '' # Ex: jenkins4eval/ssh-agent:nanoserver-1809-jdk17
$global:IMAGE_NAME = Get-EnvOrDefault 'IMAGE_NAME' '' # Ex: jenkins4eval/ssh-agent:nanoserver-ltsc2019-jdk17
$global:JAVA_VERSION = Get-EnvOrDefault 'JAVA_VERSION' ''

Write-Host "= TESTS: Preparing $global:IMAGE_NAME with Java $global:JAVA_VERSION"

$imageItems = $global:IMAGE_NAME.Split(':')
$global:IMAGE_TAG = $imageItems[1]

Expand Down
11 changes: 0 additions & 11 deletions updatecli/scripts/check-jdk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,6 @@ 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*-ea-beta)
# JDK preview version (21+35-ea-beta, 21.0.1+12-ea-beta)
# This has been updated to support the new inferred URL pattern that started as of 21.0.3+2-ea-beta. It will not work for earlier preview versions.
# One could update the cases to support all preview versions, if desired.
jdk_version="${jdk_version//-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
## 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//+/_}"
jdk_version="${jdk_version//-ea}"
echo "https://github.com/adoptium/temurin21-binaries/releases/download/jdk-${jdk_version//+/%2B}-ea-beta/OpenJDK21U-jdk_${platform}_hotspot_${dashJDKVersion}"
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//+/_}";
Expand Down
67 changes: 0 additions & 67 deletions updatecli/updatecli.d/jdk21-preview.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion windows/nanoserver/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ RUN $javaMajorVersion = $env:JAVA_HOME.Substring($env:JAVA_HOME.Length - 2); `
New-Item -Path "C:\jdk-${javaMajorVersion}" -ItemType SymbolicLink -Value "${env:JAVA_HOME}"

# Install git
ARG GIT_VERSION=2.45.1
ARG GIT_VERSION=2.45.2
ARG GIT_PATCH_VERSION=1
RUN [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 ; `
# The patch "windows.1" always have a different URL than the subsequent patch (ZIP filename is different)
Expand Down
2 changes: 1 addition & 1 deletion windows/windowsservercore/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ ENV JENKINS_AGENT_WORK ${JENKINS_AGENT_WORK}
USER ContainerAdministrator

# Install git
ARG GIT_VERSION=2.45.1
ARG GIT_VERSION=2.45.2
ARG GIT_PATCH_VERSION=1
RUN [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 ; `
# The patch "windows.1" always have a different URL than the subsequent patch (ZIP filename is different)
Expand Down

0 comments on commit 13d6e93

Please sign in to comment.