-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(Windows): refactor build process #1770
feat(Windows): refactor build process #1770
Conversation
740b16b
to
9705dd3
Compare
@slide I'd appreciate a lot if you could take a look at this change and tell me what you think about it. |
ec194ae
to
a5a8d07
Compare
c2488ae
to
73a6176
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice work
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work 👏
Let's validate this PR with the upcoming 2.432 weekly release and the next LTS (in 2 days).
Then we'll be able to check the issues related to Windows image!
Thanks for doing something about this! Means a lot to the few of us out here using Windows 😀 |
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [jenkins/jenkins](https://www.jenkins.io/) ([source](https://togithub.com/jenkinsci/docker)) | minor | `2.414.3-lts` -> `2.426.2-lts` | --- ### Release Notes <details> <summary>jenkinsci/docker (jenkins/jenkins)</summary> ### [`v2.426.2`](https://togithub.com/jenkinsci/docker/releases/tag/2.426.2) [Compare Source](https://togithub.com/jenkinsci/docker/compare/2.426.1...2.426.2) <!-- Optional: add a release summary here --> #### 📦 Jenkins Core updates - Update to Jenkins 2.426.2 ([changelog](https://jenkins.io/changelog-stable/#v2.426.2)) #### 🚀 New features and improvements - Bump Alpine Linux Version to 3.19.0 ([#​1795](https://togithub.com/jenkinsci/docker/issues/1795)) [@​github-actions](https://togithub.com/github-actions) #### 👻 Maintenance - chore: replace `curl.exe` by `Invoke-WebRequest` ([#​1796](https://togithub.com/jenkinsci/docker/issues/1796)) [@​lemeurherve](https://togithub.com/lemeurherve) #### 📦 Dependency updates - chore(deps): bump plugin manager to 2.12.14 ([#​1794](https://togithub.com/jenkinsci/docker/issues/1794)) [@​jenkins-dependency-updater](https://togithub.com/jenkins-dependency-updater) - chore(deps): bump updatecli/updatecli-action from 2.49.1 to 2.50.0 ([#​1793](https://togithub.com/jenkinsci/docker/issues/1793)) [@​dependabot](https://togithub.com/dependabot) - chore(deps): bump almalinux from 8.8 to 8.9 in /11/almalinux/almalinux8/hotspot ([#​1791](https://togithub.com/jenkinsci/docker/issues/1791)) [@​dependabot](https://togithub.com/dependabot) - Bump Debian Bookworm Linux Version to [`2023112`](https://togithub.com/jenkinsci/docker/commit/20231120) ([#​1790](https://togithub.com/jenkinsci/docker/issues/1790)) [@​github-actions](https://togithub.com/github-actions) #### 🐛 Bug fixes - fix(Windows): add `lts-` prefix to LTS short tags not including Jenkins version ([#​1784](https://togithub.com/jenkinsci/docker/issues/1784)) [@​lemeurherve](https://togithub.com/lemeurherve) #### 📝 Documentation updates - Add `JENKINS_PLUGIN_INFO` to the "Setting update centers" README section ([#​1785](https://togithub.com/jenkinsci/docker/issues/1785)) [@​lemeurherve](https://togithub.com/lemeurherve) **Full Changelog**: jenkinsci/docker@2.426.1...2.426.2 ### [`v2.426.1`](https://togithub.com/jenkinsci/docker/releases/tag/2.426.1) [Compare Source](https://togithub.com/jenkinsci/docker/compare/2.414.3...2.426.1) #### 📦 Jenkins Core updates - Update to Jenkins 2.426.1 ([changelog](https://www.jenkins.io/changelog-stable/#v2.426.1) and [upgrade guide](https://www.jenkins.io/doc/upgrade-guide/2.426/#upgrading-to-jenkins-lts-2-426-1) ) #### 💥 Breaking changes - Remove CentOS 7 container images by [@​MarkEWaite](https://togithub.com/MarkEWaite) in [https://github.com/jenkinsci/docker/pull/1777](https://togithub.com/jenkinsci/docker/pull/1777) - breaking(Windows): set Java 17 as default by [@​lemeurherve](https://togithub.com/lemeurherve) in [https://github.com/jenkinsci/docker/pull/1773](https://togithub.com/jenkinsci/docker/pull/1773) #### 🚀 New features and improvements - feat(Windows): refactor build process by [@​lemeurherve](https://togithub.com/lemeurherve) in [https://github.com/jenkinsci/docker/pull/1770](https://togithub.com/jenkinsci/docker/pull/1770) - Switch from a `windowsservercore-1809` Temurin base image to a `windowsservercore-ltsc2019` Microsoft base image ([#​1775](https://togithub.com/jenkinsci/docker/issues/1775)) - A proper set of tags is now published, and they include "ltsc2019" instead of only "2019" ([#​1489](https://togithub.com/jenkinsci/docker/issues/1489)) - A JDK11 image is published again alongside the JDK17 one ([#​1774](https://togithub.com/jenkinsci/docker/issues/1774)) - As Java 17 is the default JDK, short tags without "jdk" in them are using Java 17 ([#​1724](https://togithub.com/jenkinsci/docker/issues/1724)) - Switch to GA eclipse-temurin:jdk21 images by [@​lemeurherve](https://togithub.com/lemeurherve) in [https://github.com/jenkinsci/docker/pull/1738](https://togithub.com/jenkinsci/docker/pull/1738) #### 🐛 Bug fixes - fix: add additional tags for default Java images by [@​lemeurherve](https://togithub.com/lemeurherve) in [https://github.com/jenkinsci/docker/pull/1756](https://togithub.com/jenkinsci/docker/pull/1756) - fixup: shortest jdk17 tags only for weekly releases by [@​lemeurherve](https://togithub.com/lemeurherve) in [https://github.com/jenkinsci/docker/pull/1757](https://togithub.com/jenkinsci/docker/pull/1757) #### 📦 Dependency updates - Bump Debian Bookworm Linux Version to [`2023103`](https://togithub.com/jenkinsci/docker/commit/20231030) by [@​github-actions](https://togithub.com/github-actions) in [https://github.com/jenkinsci/docker/pull/1765](https://togithub.com/jenkinsci/docker/pull/1765) - Use JDK 21.0.1+12, not 21+35 by [@​MarkEWaite](https://togithub.com/MarkEWaite) in [https://github.com/jenkinsci/docker/pull/1779](https://togithub.com/jenkinsci/docker/pull/1779) - Bump JDK21 preview version (EA) to 21.0.1+12 by [@​github-actions](https://togithub.com/github-actions) in [https://github.com/jenkinsci/docker/pull/1743](https://togithub.com/jenkinsci/docker/pull/1743) - Use Java 17.0.9\_9 by [@​MarkEWaite](https://togithub.com/MarkEWaite) in [https://github.com/jenkinsci/docker/pull/1778](https://togithub.com/jenkinsci/docker/pull/1778) - Bump JDK11 version to 11.0.21\_9 by [@​github-actions](https://togithub.com/github-actions) in [https://github.com/jenkinsci/docker/pull/1762](https://togithub.com/jenkinsci/docker/pull/1762) & [@​lemeurherve](https://togithub.com/lemeurherve) in [https://github.com/jenkinsci/docker/pull/1782](https://togithub.com/jenkinsci/docker/pull/1782) - chore(deps): bump ubi9/ubi to 9.3-1361 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/jenkinsci/docker/pull/1776](https://togithub.com/jenkinsci/docker/pull/1776) - chore(deps): bump ubi8/ubi to 8.8-1067.1698056881 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/jenkinsci/docker/pull/1760](https://togithub.com/jenkinsci/docker/pull/1760) **Full Changelog**: jenkinsci/docker@2.414.3...2.426.1 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/PingCAP-QE/ee-ops). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy41OS44IiwidXBkYXRlZEluVmVyIjoiMzcuODcuMiIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Refactoring of the Windows image build like https://github.com/jenkinsci/docker-agent, https://github.com/jenkinsci/docker-inbound-agent and https://github.com/jenkinsci/docker-ssh (this last one is WIP until I found out how to fix some recalcitrant tests).
This PR allows to:
Keep Windows image updated (for windowsservercore-2019 image not updated #1736 & Update Jenkins version for Windows Image #1490)
Publish Windows images for each supported JDKs and not only JDK11 (for Publish a Windows image for each supported Java version #1774)
Get a Windows base image matching the controller image tag (for
windowsservercore-2019
images usewindowsservercore-1809
as base image #1775)This PR switches from a
windowsservercore-1809
Temurin base image to awindowsservercore-ltsc2019
Microsoft base imagewindowsservercore-1809
image type in the Jenkinsfile, see belowContainer image size reduced from 2.31Gio to 2.16Gio
Publish a proper set of Windows image tags (for Windows Tags #1489)
Current tags for reference (On the 3rd of November 2023):
Tags from this pull request:
jdk17-hotspot-windowsservercore-ltsc2019 (default JDK)
jdk11-hotspot-windowsservercore-ltsc2019
Windows container image tags are now properly reflecting the Windows version (see previous point), and have changed from
windowsservercore-2019
towindowsservercore-ltsc2019
1809
, not altsc2019
:docker/17/windows/windowsservercore-2019/hotspot/Dockerfile
Line 3 in c7ae4b8
Use docker compose file to declaratively define tags and
docker compose build
for building, tagging and testing images, reducing script complexitymake.ps1
parameters #1769 (comment))docker compose push
but unfortunately this command pushes only theimage
of the builds, not its additionaltags
defined in the docker-compose file.Have only one Dockerfile for every JDK versions
The possibility to integrate additional images for new Windows version like Windows Server Core ltsc2022 if wanted, with only a Jenkinsfile change and no time penalty (parallel builds)
https://ci.jenkins.io/job/Packaging/job/docker/job/PR-1770/154/:
Testing done
Executed dry-run before and after
Before:
After:
Ran
make.ps1 test
andmake.ps1 publish
from a Windows Server Core 2019 VM with$env:DOCKERHUB_ORGANISATION="hlemeur"
, based on the "prod-packer-images/providers/Microsoft.Compute/images/jenkins-agent-windows-2019" image used by ci.jenkins.io Azure VM agentsFull CI job with build and tests: https://ci.jenkins.io/job/Packaging/job/docker/job/PR-1770/155/
Test CI publication of Windows Server Core ltsc2019 & 2022 images to jenkins4eval/jenkins
https://ci.jenkins.io/job/Packaging/job/docker/job/PR-1770/154/
https://hub.docker.com/r/jenkins4eval/jenkins/tags
Jenkinsfile change for images publication test:
Submitter checklist