jenkinsci / docker

Docker official jenkins repo
https://hub.docker.com/r/jenkins/jenkins
MIT License
6.55k stars 4.47k forks source link

chore: keep only one Dockerfile per Linux image variant #1857

Closed lemeurherve closed 2 months ago

lemeurherve commented 2 months ago

This PR simplifies this repo content by keeping only one Dockerfile per Linux image variant like the Windows images, versus one per JDK and per Linux image variant currently.

Notes:

For the record, initial image content changes extracted to other merged pull requests:
> - Non integration of the `install-plugins.sh` shell script in JDK11 images: > - Deprecated since September 2020 > - Does only echo a warning since https://github.com/jenkinsci/docker/pull/1408 almost two years ago: https://github.com/jenkinsci/docker/blob/bed10d624086e931cf1d053d62174a2355cfd15c/install-plugins.sh > - I think it's time for it to go, it shouldn't functionally change anything for the end users anyway. > - Extracted to https://github.com/jenkinsci/docker/pull/1863 if it needs to be merged separately. > - JDK21 specific compression argument set to `zip-6` like Linux for Windows image: > - https://github.com/jenkinsci/docker/pull/1857/commits/7d1817117127c9d6461d8e2c9fc63fd8466d8c2e > - Complement of https://github.com/jenkinsci/docker/pull/1848 which introduced jlink in the Windows controller image > - Note: jlink on Windows should be properly tested, might worth its own issue > - Extracted to https://github.com/jenkinsci/docker/pull/1864 if it needs to be merged separately.

I'll create a follow-up pull request to adapt updatecli manifests to these changes. (Preview: https://github.com/jenkinsci/docker/commit/65353f93adb51fa12dedfd95c0bb34d3b06ab357)

This PR is a first step, I'd like to factorize a bit the logic of the docker bake around jdk versions after that.

Testing done

Local builds + CI

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

Addressed spread in https://github.com/jenkinsci/docker/pull/1857/commits/b8ff4f7dba5426c166968e266d04c14691b7cfc7 and https://github.com/jenkinsci/docker/pull/1857/commits/e672c5ceaadaf7538292421597b4ad95816227b5 with minimal complexity.

Not sure putting this into a separate script is mandatory for this PR.

olivergondza commented 2 months ago

On behalf of rhel images, I can say I do not object, as the matrix of versions and jdks remain unchanged. Added one question/suggestion.

lemeurherve commented 2 months ago

Opened #1857 & #1864 if the minor image changes of this PR need to be merged separately.

EDIT: merged.