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
5 changes: 0 additions & 5 deletions bin/tag-generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
ALPINE_VERSIONS = ['3.16', '3.17', '3.18', '3.19']

LTS_VERSIONS = [ "8", "11", "17", "21"]
AL2023_GENERIC_VERSIONS = ["20"]

def generate_tags(key, version):
update = version.split('.')[1] if (key == '8') else version.split('.')[2]
Expand Down Expand Up @@ -38,10 +37,6 @@ def generate_tags(key, version):
print("Architectures: amd64, arm64v8")
print(f"Directory: {key}/headful/al2023\n")

if key in AL2023_GENERIC_VERSIONS:
print("Tags: " + ", ".join(al2023_generic_tags) + "")
print("Architectures: amd64, arm64v8")
print(f"Directory: {key}/jdk/al2023-generic\n")

# For LTS versions with modular AmazonLinux packages we want to tag those images
native_package_modifier="al2-native-"
Expand Down
20 changes: 11 additions & 9 deletions bin/update-dockerfiles.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ SED="sed -i"

sed --version 2>/dev/null || SED="sed -i.bkp"

LTS_VERSIONS=("8" "11" "17" "21")

usage() {
echo "usage: update-dockerfiles.sh [--help]"
echo ""
Expand Down Expand Up @@ -52,18 +50,20 @@ 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 [[ -f ./${MAJOR_RELEASE}/jdk/al2023-generic/Dockerfile ]]
then
${SED} "s/ARG version=.*/ARG version=${jdk_version}.${jdk_build}-${corretto_version}/g" ./${MAJOR_RELEASE}/jdk/al2023-generic/Dockerfile
if [[ -f ./${MAJOR_RELEASE}/jdk/al2-generic/Dockerfile ]]; then
${SED} "s/ARG version=.*/ARG version=${jdk_version}.${jdk_build}-${corretto_version}/g" ./${MAJOR_RELEASE}/jdk/al2-generic/Dockerfile
fi

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


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

ADDITIONAL_IMAGES="jdk jre headful headless"
Expand All @@ -78,8 +78,10 @@ update_generic_linux() {

${SED} "s/${MAJOR_RELEASE}\.0\.[0-9]*,/${jdk_version},/g" README.md
${SED} "s/${MAJOR_RELEASE}\.0\.[0-9]*-al2/${jdk_version}-al2/g" README.md
if [ -d "./${MAJOR_RELEASE}/slim" ]; then
if [[ -f ./${MAJOR_RELEASE}/slim/al2/Dockerfile ]]; then
${SED} "s/ARG version=.*/ARG version=${jdk_version}.${jdk_build}-${corretto_version}/g" ./${MAJOR_RELEASE}/slim/al2/Dockerfile
fi
if [ -d "./${MAJOR_RELEASE}/slim" ]; then
${SED} "s/ARG version=.*/ARG version=${jdk_version}.${jdk_build}-${corretto_version}/g" ./${MAJOR_RELEASE}/slim/debian/Dockerfile
${SED} "s/ARG version=.*/ARG version=${jdk_version}.${jdk_build}.${corretto_version}/g" ./${MAJOR_RELEASE}/slim/alpine/Dockerfile
${SED} "s/${MAJOR_RELEASE}\.0\.[0-9]*-slim,/${jdk_version},/g" README.md
Expand Down
Loading