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

chore(linux) factorize JDK specification to docker bakefile #347

Merged

Conversation

dduportal
Copy link
Contributor

@dduportal dduportal commented May 6, 2023

Twin of jenkinsci/docker-agent#409

This pull request aims at factorizing the image definitions (Dockerfiles) to avoid duplicating code between JDK versions.

Until now, changing an element in any of the images which have both JDK11 and JDK17 definitions were subject to a risk of shift if the 2nd image is forgotten.

How does it work?

  • The directories 11/ and 17/, representing the major JDK version, are removed
  • There is only 1 directory per operating system at the root of the repository
  • The major JDK version is passed through build arguments as only the image name (used by tge FROM directives) needs it to check the paraent image from jenkinsci/docker-agent
    • The Dockerfiles do have a default major version defined to ensure it's buildable "as it" (e.g. without Docker BuildX and its bake file). The proposed default is 17
  • Applied the same "fixup" changes as described chore: factorize JDK specification to docker bakefile (linux) / compose file (windows) docker-agent#409 (comment) (slight differences: no dependabot Docker tracking and only 1 updatecli manifest to fix)
  • Only a partial set of changes for the Windows build + tests (powershell/Pester tooling) was reused from chore: factorize JDK specification to docker bakefile (linux) / compose file (windows) docker-agent#409 as docker compose is not used for the Windows images (tooling is a bit different than jenkinsci/docker-agent). Subject of a future PR (or merging with jenkinsci/docker-agent)

Testing done

  • Ran all cases on both macOS + Docker Desktop and Windows 11 + Docker Desktop
  • Relying on the checks of course

Submitter checklist

  • Make sure you are opening from a topic/feature/bugfix branch (right side) and not your main branch!
  • Ensure that the pull request title represents the desired changelog entry
  • Please describe what you did
  • Link to relevant issues in GitHub or Jira
  • Link to relevant pull requests, esp. upstream and downstream changes
  • Ensure you have provided tests - that demonstrates feature works or fixes the issue

@dduportal dduportal force-pushed the chore/factorize-Dockerfile-per-JDK branch 3 times, most recently from 9768b04 to 86a78c1 Compare May 18, 2023 14:46
Copy link
Contributor

@MarkEWaite MarkEWaite left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks very much!

@dduportal dduportal merged commit 863561a into jenkinsci:master May 19, 2023
@dduportal dduportal deleted the chore/factorize-Dockerfile-per-JDK branch May 19, 2023 05:35
lemeurherve pushed a commit to lemeurherve/jenkinsci-docker-inbound-agent that referenced this pull request Nov 19, 2023
…211.0.109768 in /11/archlinux (jenkinsci#347)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
lemeurherve pushed a commit to lemeurherve/docker-agent that referenced this pull request Nov 28, 2023
…uportal/chore/factorize-Dockerfile-per-JDK

chore(linux) factorize JDK specification to docker bakefile
lemeurherve pushed a commit to lemeurherve/docker-agent that referenced this pull request Nov 28, 2023
…uportal/chore/factorize-Dockerfile-per-JDK

chore(linux) factorize JDK specification to docker bakefile
lemeurherve pushed a commit to lemeurherve/docker-agent that referenced this pull request Nov 28, 2023
…uportal/chore/factorize-Dockerfile-per-JDK

chore(linux) factorize JDK specification to docker bakefile
lemeurherve pushed a commit to lemeurherve/docker-agent that referenced this pull request Nov 28, 2023
…uportal/chore/factorize-Dockerfile-per-JDK

chore(linux) factorize JDK specification to docker bakefile
lemeurherve pushed a commit to lemeurherve/docker-agent that referenced this pull request Nov 28, 2023
…uportal/chore/factorize-Dockerfile-per-JDK

chore(linux) factorize JDK specification to docker bakefile
lemeurherve pushed a commit to lemeurherve/docker-agent that referenced this pull request Nov 28, 2023
…uportal/chore/factorize-Dockerfile-per-JDK

chore(linux) factorize JDK specification to docker bakefile
lemeurherve pushed a commit to lemeurherve/docker-agent that referenced this pull request Jan 12, 2024
…chore/factorize-Dockerfile-per-JDK

chore(linux) factorize JDK specification to docker bakefile
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants