|
| 1 | +# Docker Image Release Process |
| 2 | + |
| 3 | +The docker image release process for quarterly releases and a new major release are slightly different. |
| 4 | + |
| 5 | +## Quarterly Releases |
| 6 | + |
| 7 | +* Create a issue to track the progress of the docker release images using the [release template](https://github.com/AdoptOpenJDK/openjdk-docker/issues/new?assignees=&labels=Release&template=docker-image-release-status-for-jdk-xyz.md&title=) issue. |
| 8 | + |
| 9 | +* Check if the binaries of all arches are available |
| 10 | + * HotSpot (x86_64, ppc64le, s390x, arm32, aarch64) |
| 11 | + - It is common for hotspot arm32 and aarch64 builds to be delayed. |
| 12 | + - The usual criteria is if the arm related builds are going to be available within a couple of days of the other builds, then we wait for the builds to become available before raising the PR at the official repo. If it is expected to take longer than 2 days, we push the remaining arches right away, alerting the official maintainers of possible breakage downstream. |
| 13 | + * OpenJ9 (x86_64, ppc64le, s390x) |
| 14 | + |
| 15 | +#### Official Images |
| 16 | + |
| 17 | +Official images are maintained by the Docker community and updates are done through the official [github repo](https://github.com/docker-library/official-images). This requires an update to the Dockerfiles in this repo and a subsequent PR at the official repo with the commit id that has all the Dockerfile updates. |
| 18 | + |
| 19 | + * Generate the updated dockerfiles |
| 20 | + - [./update_all.sh](update_all.sh) |
| 21 | + |
| 22 | + * If there are arches for which builds are missing you should see warnings such as this |
| 23 | + ``` |
| 24 | + Parent version not matching for arch aarch64: jdk8u275-b01, jdk8u282-b08 |
| 25 | + Parent version not matching for arch armv7l: jdk8u275-b01, jdk8u282-b08 |
| 26 | + ``` |
| 27 | +
|
| 28 | + In the above example, This means that for aarch64 and armv7l, builds of the latest version (jdk8u282-b08) are not yet available. |
| 29 | +
|
| 30 | + * Raise a PR for the updated Dockerfiles in this repo. See this [PR](https://github.com/AdoptOpenJDK/openjdk-docker/pull/502) for example. |
| 31 | +
|
| 32 | + * Once the PR is merged, generate the updated files for raising the [PR at the official repo](https://github.com/docker-library/official-images/pull/9853). |
| 33 | + * [./dockerhub_doc_config_update.sh](dockerhub_doc_config_update.sh) |
| 34 | + * The file `adoptopenjdk` can be mostly copied over to [library/adoptopenjdk](https://github.com/docker-library/official-images/blob/master/library/adoptopenjdk) at the official repo. However, |
| 35 | + - OS tags may need to be updated if there are OS version changes (This is not automated) |
| 36 | + - Ensure we are not removing any arches / OSes that are currently active and only the versions are changing / added. |
| 37 | + * PRs pending related to this at the Adopt repo. |
| 38 | + - Add script to update dockerfiles on a [PR merge](https://github.com/AdoptOpenJDK/openjdk-docker/pull/466). |
| 39 | +
|
| 40 | +#### Non-Official Images |
| 41 | +
|
| 42 | +Non-official images are maintained by the AdoptOpenJDK community primarily through this repo. The images are automatically updated by the [nightly builds](https://ci.adoptopenjdk.net/view/Docker%20Images/job/openjdk_build_docker_multiarch/) for the quarterly releases. |
| 43 | +
|
| 44 | + * Ideally it is best to stop automated nightly builds (which also build release images) from running during the duration of the release. This is needed as the release tarballs for different arches trickle in and cause inconsistencies in the manifest entries. |
| 45 | + * Manually trigger the nightly build once the required arch builds for a release are available. |
| 46 | + * Re-enable automated nightly builds once all the release builds are pushed to DockerHub from the previous step. |
| 47 | + * In the official image section, after we run [dockerhub_doc_config_update.sh](dockerhub_doc_config_update.sh), it produces text files for each supported release that consists of all the valid tags. This can be copy-pasted as-is to the corresponding dockerhub repo [readme](https://hub.docker.com/repository/docker/adoptopenjdk/openjdk16/general). |
| 48 | +
|
| 49 | +## Major Releases |
| 50 | +
|
| 51 | +For a new major release, there are some additional steps to be done prior to the quarterly release steps that are documented above. |
| 52 | +
|
| 53 | +#### Script Changes |
| 54 | +
|
| 55 | +There are some script changes to be done to enable building a new major release. See this [PR](https://github.com/AdoptOpenJDK/openjdk-docker/pull/527/files) for example. |
| 56 | +* [continuous-integration-workflow.yml](.github/workflows/continuous-integration-workflow.yml) |
| 57 | + * Add the new version to be built. (You may need to deprecate an older version as we only maintain docker image builds for the last two major releases (not counting LTS releases). |
| 58 | +* [common_functions.sh](common_functions.sh) |
| 59 | + * Update `supported_versions` and function `check_version` to add the new version. Change `latest_version` to the new version. |
| 60 | +* Files [hotspot-official.config](config/hotspot-official.config), [hotspot.config](config/hotspot.config), [openj9-official.config](config/openj9-official.config) and [openj9.config](config/openj9.config) |
| 61 | + * Update `Versions` to be the same as `supported_versions` from [common_functions.sh](common_functions.sh) |
| 62 | + * Add appropriate entries for each supported OS + Architecture combination. (You should be able to copy-paste from a previous release and change the version) |
| 63 | +* [Jenkinsfile](Jenkinsfile) |
| 64 | + * Add entries for building the new version as per this [PR](https://github.com/AdoptOpenJDK/openjdk-docker/pull/531/files). |
| 65 | +
|
| 66 | +You should now be able to follow the steps from the Quarterly release as above. |
0 commit comments