Skip to content
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

Update al2 image checks for 22 and remove al2023 from generic linux #200

Merged
merged 8 commits into from
Mar 25, 2024
2 changes: 1 addition & 1 deletion bin/tag-generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
ALPINE_VERSIONS = ['3.16', '3.17', '3.18', '3.19']

LTS_VERSIONS = [ "8", "11", "17", "21"]
AL2023_GENERIC_VERSIONS = ["20"]
AL2023_GENERIC_VERSIONS = ["22"]
Copy link
Contributor

Choose a reason for hiding this comment

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

Original intention of this was to have a AL2023 image with the generic linux package, which we don't need anymore since we have the native packages.


def generate_tags(key, version):
update = version.split('.')[1] if (key == '8') else version.split('.')[2]
Expand Down
8 changes: 6 additions & 2 deletions bin/update-dockerfiles.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ SED="sed -i"
sed --version 2>/dev/null || SED="sed -i.bkp"

LTS_VERSIONS=("8" "11" "17" "21")
AL2_VERSIONS=("8" "11" "17" "21")
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you rename this to AL2_GENERIC_LINUX_VERSIONS? Other option would be to remove this and change the check on line 57 to see if the file exists, like we do for al2023-generic.

FR_VERSIONS=("22")

usage() {
echo "usage: update-dockerfiles.sh [--help]"
Expand Down Expand Up @@ -52,13 +54,15 @@ update_generic_linux() {
jdk_version=$(echo ${CORRETTO_VERSION} | cut -d'.' -f1-3)
jdk_build=$(echo ${CORRETTO_VERSION} | cut -d'.' -f4)
corretto_version=$(echo ${CORRETTO_VERSION} | cut -d'.' -f5)
${SED} "s/ARG version=.*/ARG version=${jdk_version}.${jdk_build}-${corretto_version}/g" ./${MAJOR_RELEASE}/jdk/al2-generic/Dockerfile
if [[ "${AL2_VERSIONS[*]}" =~ ${MAJOR_RELEASE} ]]; then
${SED} "s/ARG version=.*/ARG version=${jdk_version}.${jdk_build}-${corretto_version}/g" ./${MAJOR_RELEASE}/jdk/al2-generic/Dockerfile
fi
if [[ -f ./${MAJOR_RELEASE}/jdk/al2023-generic/Dockerfile ]]
Copy link
Contributor

Choose a reason for hiding this comment

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

We can remove this as we don't think al2023 with generic linux packages anymore.

then
${SED} "s/ARG version=.*/ARG version=${jdk_version}.${jdk_build}-${corretto_version}/g" ./${MAJOR_RELEASE}/jdk/al2023-generic/Dockerfile
fi

if [[ "${LTS_VERSIONS[*]}" =~ ${MAJOR_RELEASE} ]]; then
if [[ "${LTS_VERSIONS[*]}" =~ ${MAJOR_RELEASE} || "${FR_VERSIONS[*]}" =~ ${MAJOR_RELEASE} ]]; then
${SED} "s/ARG version=.*/ARG version=${jdk_version}.${jdk_build}-${corretto_version}/g" ./${MAJOR_RELEASE}/jdk/al2023/Dockerfile
${SED} "s/ARG version=.*/ARG version=${jdk_version}.${jdk_build}-${corretto_version}/g" ./${MAJOR_RELEASE}/headful/al2023/Dockerfile
${SED} "s/ARG version=.*/ARG version=${jdk_version}.${jdk_build}-${corretto_version}/g" ./${MAJOR_RELEASE}/headless/al2023/Dockerfile
Expand Down
Loading