Skip to content
This repository was archived by the owner on Apr 23, 2025. It is now read-only.

Conversation

dduportal
Copy link

@dduportal dduportal commented Apr 24, 2024

This PR aims at fixing the build failures on #150 #151 and #152 (ref. jenkins-infra/helpdesk#4058) as the Docker images of Adoptium Temurin are not available for the last JDK versions, by using the Temurin installer instead of the docker image. Inspired by jenkinsci/docker-agent#787

It introduces the following changes:

  • Installation of the adoptium MSIs happens in the python-core stage which uses a Windows Server Core base: misexec.exe does not exist on Nanoserver.
    • Moving ARG JAVA_VERSION into the Python stage's scope as a consequence to avoid repetition out and in the scope
    • The JDK versions specified by the ARG JAVA_VERSION build arguments is changed to allow using the same download code (for future factorization), which breaks the updatecli for now (see notes below):
    • The prefix jdk- is added for JDK11, JDK17 and JDK21. The prefix jdk is added for JDK8.
    • The character + is usedinstead of _ to avoid further transformations: the Docker images where using _ for their tags
  • Faster build due to less layers to pull (ref. feat(Windows): switch from temurin base images to temurin installer jenkinsci/docker-agent#787)
  • Retrieving the netapi32 DLL and `whoami.exe`` from the Python parent image instead of Temurin image
  • Pin JDK21 version to 21+35 to ensure a valid installer is retrieved
  • Cleanups to ensure the 4 Dockerfiles are as close as possible

Notes:

  • No updatecli manifests are changed: This PR breaks the current manifests. A subsequent PR is required to fix them.
  • No jlink to "tune" the JDK but can be done on subsequent PR (cc @lemeurherve for info). But the JDK is installed into C:\javaruntime which is static.
  • No factorization (yet?) as the pipeline library does not support passing custom build arguments to docker build, it does not support docker-compose.yml and Windows container do not work with Docker BuildX.

@dduportal dduportal force-pushed the fix/jdks-use-installer branch from 88dcb76 to 3695058 Compare April 24, 2024 10:26
@dduportal dduportal changed the title Fix/jdks use installer fix: switch to Adoptium Temurin installer instead of Docker image Apr 24, 2024
@dduportal dduportal force-pushed the fix/jdks-use-installer branch from 39bd828 to 9e562af Compare April 24, 2024 14:49
@dduportal dduportal marked this pull request as ready for review April 24, 2024 15:09
It introduces the following changes:

- Faster build due to less layers to pull (ref. jenkinsci/docker-agent#787)
- Retrieving the `netapi32` DLL and `whoami.exe`` from the Python parent image instead of Temurin image
- Moving `ARG JAVA_VERSION` into the last stage's scope
- Pin JDK21 version to 21+35 to ensure a valid installer is retrieved

Signed-off-by: Damien Duportal <[email protected]>
@dduportal dduportal force-pushed the fix/jdks-use-installer branch from 77b5d1e to d814b43 Compare April 24, 2024 15:10
@dduportal dduportal merged commit e2b3c55 into jenkins-infra:main Apr 24, 2024
@dduportal dduportal deleted the fix/jdks-use-installer branch April 24, 2024 15:33
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant