From 4f705305c543ccc2185a938f7d3c751c37e652ef Mon Sep 17 00:00:00 2001 From: Cameron Rozean Date: Mon, 17 Jun 2024 18:54:39 +0000 Subject: [PATCH 01/11] add script to pull upstream patch versions and update versions.yaml if they don't exist in file --- builder-base/scripts/check_upstream_golang.sh | 45 +++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100755 builder-base/scripts/check_upstream_golang.sh diff --git a/builder-base/scripts/check_upstream_golang.sh b/builder-base/scripts/check_upstream_golang.sh new file mode 100755 index 000000000..80a318da4 --- /dev/null +++ b/builder-base/scripts/check_upstream_golang.sh @@ -0,0 +1,45 @@ +#!/usr/bin/env bash +# Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -e +set -o pipefail +set -x + +GO_PREFIX="go" +SCRIPT_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd -P)" +VERSIONS_YAML="${SCRIPT_ROOT}/../versions.yaml" + +function update::go::version { + local -r version=$1 + local -r majorversion=$(if [[ $(echo "$version" | awk -F'.' '{print NF}') -ge 3 ]]; then echo ${version%.*}; else echo ${version%-*}; fi) + + local -r cur_builder_base_version=$(cat "${VERSIONS_YAML}" | grep -E "^GOLANG_VERSION_${majorversion//./}") + + sed -i "s/${cur_builder_base_version}/GOLANG_VERSION_${majorversion//./}: ${version}/g" "${VERSIONS_YAML}" +} + +# curl go.dev for the supported versions of go +ACTIVE_VERSIONS=$(curl https://go.dev/dl/?mode=json | jq -r '.[].version' | sed -e "s/^$GO_PREFIX//" | sort) + +# pull golang versions in the versions.yaml +BUILDER_BASE_GO_VERSION=$(cat "${VERSIONS_YAML}" | grep -E "^GOLANG_VERSION_[0-9]{3}") + +for v in ${ACTIVE_VERSIONS}; do + # check builder-base versions for the upstream version of golang + # if the version doesn't exist in the builder base update the versions yaml. + if [[ ! $BUILDER_BASE_GO_VERSION =~ $v ]]; then + update::go::version $v + fi +done From 3c3f9d3618be58340feb51d74aa6d157772df68b Mon Sep 17 00:00:00 2001 From: Cameron Rozean Date: Mon, 17 Jun 2024 19:53:47 +0000 Subject: [PATCH 02/11] add function to null golang images on updates to versions.yaml --- builder-base/scripts/check_upstream_golang.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/builder-base/scripts/check_upstream_golang.sh b/builder-base/scripts/check_upstream_golang.sh index 80a318da4..9fd6f24ff 100755 --- a/builder-base/scripts/check_upstream_golang.sh +++ b/builder-base/scripts/check_upstream_golang.sh @@ -20,6 +20,7 @@ set -x GO_PREFIX="go" SCRIPT_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd -P)" VERSIONS_YAML="${SCRIPT_ROOT}/../versions.yaml" +TAG_FILE="${SCRIPT_ROOT}/../../EKS_DISTRO_TAG_FILE.yaml" function update::go::version { local -r version=$1 @@ -30,6 +31,19 @@ function update::go::version { sed -i "s/${cur_builder_base_version}/GOLANG_VERSION_${majorversion//./}: ${version}/g" "${VERSIONS_YAML}" } +function update::go::minimal_image { + local -r version=$1 + local -r majorversion=$(if [[ $(echo "$version" | awk -F'.' '{print NF}') -ge 3 ]]; then echo ${version%.*}; else echo ${version%-*}; fi) + + local -r golang_minimal_images=$(cat "${TAG_FILE}" | grep -E "eks-distro-minimal-base-golang-compiler-${majorversion}-[a-z]+:\s") + + for image in ${golang_minimal_images}; do + if [[ $image =~ ^[0-9].* ]]; then + sed -i "s/${image}/null/g" "${TAG_FILE}" + fi + done +} + # curl go.dev for the supported versions of go ACTIVE_VERSIONS=$(curl https://go.dev/dl/?mode=json | jq -r '.[].version' | sed -e "s/^$GO_PREFIX//" | sort) @@ -41,5 +55,6 @@ for v in ${ACTIVE_VERSIONS}; do # if the version doesn't exist in the builder base update the versions yaml. if [[ ! $BUILDER_BASE_GO_VERSION =~ $v ]]; then update::go::version $v + update::go::minimal_image $v fi done From 3ff9e2f7fc002cf37c974c1056d808b7030a7ad6 Mon Sep 17 00:00:00 2001 From: Cameron Rozean Date: Mon, 8 Jul 2024 11:38:21 -0700 Subject: [PATCH 03/11] finalize script to update golang minimal image versions and values for all patch and minor version updates --- builder-base/scripts/check_upstream_golang.sh | 43 ++++++++++++------- 1 file changed, 28 insertions(+), 15 deletions(-) diff --git a/builder-base/scripts/check_upstream_golang.sh b/builder-base/scripts/check_upstream_golang.sh index 9fd6f24ff..974499ba1 100755 --- a/builder-base/scripts/check_upstream_golang.sh +++ b/builder-base/scripts/check_upstream_golang.sh @@ -28,33 +28,46 @@ function update::go::version { local -r cur_builder_base_version=$(cat "${VERSIONS_YAML}" | grep -E "^GOLANG_VERSION_${majorversion//./}") - sed -i "s/${cur_builder_base_version}/GOLANG_VERSION_${majorversion//./}: ${version}/g" "${VERSIONS_YAML}" + gsed -i "s/${cur_builder_base_version}/GOLANG_VERSION_${majorversion//./}: ${version}-0/g" "${VERSIONS_YAML}" } -function update::go::minimal_image { +function add::go::version { local -r version=$1 local -r majorversion=$(if [[ $(echo "$version" | awk -F'.' '{print NF}') -ge 3 ]]; then echo ${version%.*}; else echo ${version%-*}; fi) - local -r golang_minimal_images=$(cat "${TAG_FILE}" | grep -E "eks-distro-minimal-base-golang-compiler-${majorversion}-[a-z]+:\s") + echo "GOLANG_VERSION_${majorversion//./}: $version-0" >>$VERSIONS_YAML +} + +# Using YQ allows us to modify the existing tag or add the correct tag if it doesn't exist +function modify::go::minimal_image { + local -r version=$1 + local -r majorversion=$(if [[ $(echo "$version" | awk -F'.' '{print NF}') -ge 3 ]]; then echo ${version%.*}; else echo ${version%-*}; fi) + + # AL2 updates + AL2BASE=".al2.[\"eks-distro-minimal-base-golang-compiler-${majorversion}-base\"]" yq 'eval(strenv(AL2BASE)) = null' -i $TAG_FILE + AL2YUM=".al2.[\"eks-distro-minimal-base-golang-compiler-${majorversion}-yum\"]" yq 'eval(strenv(AL2YUM)) = null' -i $TAG_FILE + AL2GCC=".al2.[\"eks-distro-minimal-base-golang-compiler-${majorversion}-gcc\"]" yq 'eval(strenv(AL2GCC)) = null' -i $TAG_FILE - for image in ${golang_minimal_images}; do - if [[ $image =~ ^[0-9].* ]]; then - sed -i "s/${image}/null/g" "${TAG_FILE}" - fi - done + # AL2023 updates + AL2023BASE=".al2023.[\"eks-distro-minimal-base-golang-compiler-${majorversion}-base\"]" yq 'eval(strenv(AL2023BASE)) = null' -i $TAG_FILE + AL2023YUM=".al2023.[\"eks-distro-minimal-base-golang-compiler-${majorversion}-yum\"]" yq 'eval(strenv(AL2023YUM)) = null' -i $TAG_FILE + AL2023GCC=".al2023.[\"eks-distro-minimal-base-golang-compiler-${majorversion}-gcc\"]" yq 'eval(strenv(AL2023GCC)) = null' -i $TAG_FILE } # curl go.dev for the supported versions of go ACTIVE_VERSIONS=$(curl https://go.dev/dl/?mode=json | jq -r '.[].version' | sed -e "s/^$GO_PREFIX//" | sort) -# pull golang versions in the versions.yaml -BUILDER_BASE_GO_VERSION=$(cat "${VERSIONS_YAML}" | grep -E "^GOLANG_VERSION_[0-9]{3}") - -for v in ${ACTIVE_VERSIONS}; do +for version in ${ACTIVE_VERSIONS}; do + # pull golang versions in the versions.yaml + MAJORVERSION=$(if [[ $(echo "$version" | awk -F'.' '{print NF}') -ge 3 ]]; then echo ${version%.*}; else echo ${version%-*}; fi) + BUILDER_BASE_GO_VERSION=$(cat "${VERSIONS_YAML}" | grep -E "^GOLANG_VERSION_${MAJORVERSION//./}") || "" # check builder-base versions for the upstream version of golang # if the version doesn't exist in the builder base update the versions yaml. - if [[ ! $BUILDER_BASE_GO_VERSION =~ $v ]]; then - update::go::version $v - update::go::minimal_image $v + if [[ -n $BUILDER_BASE_GO_VERSION && ! $BUILDER_BASE_GO_VERSION =~ $version ]]; then + update::go::version $version + modify::go::minimal_image $version + elif [[ -z $BUILDER_BASE_GO_VERSION ]]; then + add::go::version $version + modify::go::minimal_image $version fi done From 1a96f3ee57aab7a64e59de129c100760635e2522 Mon Sep 17 00:00:00 2001 From: Cameron Rozean Date: Thu, 11 Jul 2024 12:59:57 -0700 Subject: [PATCH 04/11] move golang versions to yaml, use yaml in Makefile, autoupdate yaml with upstream new versions --- eks-distro-base/Makefile | 14 +++--- eks-distro-base/golang_versions.yaml | 13 +++++ eks-distro-base/scripts/check_upstream_golang | 50 +++++++++++++++++++ 3 files changed, 70 insertions(+), 7 deletions(-) create mode 100644 eks-distro-base/golang_versions.yaml create mode 100755 eks-distro-base/scripts/check_upstream_golang diff --git a/eks-distro-base/Makefile b/eks-distro-base/Makefile index bba360299..3d5734734 100644 --- a/eks-distro-base/Makefile +++ b/eks-distro-base/Makefile @@ -205,15 +205,14 @@ BASE_NODEJS_COMPILER_VARIANT_VERSIONS=$(foreach ver,$(BASE_COMPILER_VARIANT_VERS # ****************** GOLANG VARIANTS ************************* GOLANG_VARIANT_NAME=eks-distro-minimal-base-golang-compiler -BASE_GOLANG_VARIANT_VERSIONS=1.18 1.19 1.20 1.21 1.22 - -GOLANG_1.18_FULL_VERSION=1.18.10-8 -GOLANG_1.19_FULL_VERSION=1.19.13-14 -GOLANG_1.20_FULL_VERSION=1.20.14-16 -GOLANG_1.21_FULL_VERSION=1.21.12-0 -GOLANG_1.22_FULL_VERSION=1.22.5-0 +# This recreates the list of golang versions separated with ' ' from the golang_versions.yaml using xargs to strip the trailing whitespace. +BASE_GOLANG_VARIANT_VERSIONS=$(shell yq '.golang.variants | to_entries | .[] | .value' golang_versions.yaml | tr '\n' ' ' | xargs) BASE_GOLANG_COMPILER_VARIANT_VERSIONS=$(foreach ver,$(BASE_GOLANG_VARIANT_VERSIONS),$(addprefix $(ver)-,$(BASE_COMPILER_VARIANT_VERSIONS))) + +define SET_GOLANG_FULL_VERSIONS + $(shell yq '.golang.versions | to_entries | .[] | [.key,.value] | join("=")' $MAKE_ROOT/golang_versions.yaml) +endef # ************************************************************ ############# WINDOWS ############################# @@ -556,6 +555,7 @@ $(eval $(call COMPILER_TARGET_OVERRIDES,nodejs,false)) # ************************************************************ # ****************** GOLANG VARIANTS ************************ +$(eval $(call SET_GOLANG_FULL_VERSIONS)) $(eval $(call COMPILER_TARGET_OVERRIDES,golang,true)) # ************************************************************ diff --git a/eks-distro-base/golang_versions.yaml b/eks-distro-base/golang_versions.yaml new file mode 100644 index 000000000..7eb9213d5 --- /dev/null +++ b/eks-distro-base/golang_versions.yaml @@ -0,0 +1,13 @@ +golang: + variants: + - 1.18 + - 1.19 + - 1.20 + - 1.21 + - 1.22 + versions: + GOLANG_1.18_FULL_VERSION: 1.18.10-8 + GOLANG_1.19_FULL_VERSION: 1.19.13-14 + GOLANG_1.20_FULL_VERSION: 1.20.14-16 + GOLANG_1.21_FULL_VERSION: 1.21.12-0 + GOLANG_1.22_FULL_VERSION: 1.22.5-0 diff --git a/eks-distro-base/scripts/check_upstream_golang b/eks-distro-base/scripts/check_upstream_golang new file mode 100755 index 000000000..a9782b94d --- /dev/null +++ b/eks-distro-base/scripts/check_upstream_golang @@ -0,0 +1,50 @@ +#!/usr/bin/env bash +# Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -e +set -o pipefail +set -x + +GO_PREFIX="go" +SCRIPT_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd -P)" +VERSIONS_YAML="${SCRIPT_ROOT}/../golang_versions.yaml" + +# Using YQ allows us to modify the existing tag or add the correct tag if it doesn't exist +function update::go::version { + local -r version=$1 + local -r minorversion=$(if [[ $(echo "$version" | awk -F'.' '{print NF}') -ge 3 ]]; then echo ${version%.*}; else echo ${version%-*}; fi) + + # Check if minor verion exists, if not add. + if [[ -z $(MINORVERSION=$minorversion yq 'eval(.golang.variants[] | select(. == env(MINORVERSION)))' $VERSIONS_YAML) ]]; then + MINORVERSION=$minorversion yq '.golang.variants += env(MINORVERSION)' -i $VERSIONS_YAML + fi + + # Patch Version update if needed + UPDATE=".golang.versions.[\"GOLANG_${minorversion}_FULL_VERSION\"]" VERSION="$version-0" yq 'eval(strenv(UPDATE)) = strenv(VERSION)' -i $VERSIONS_YAML +} + +# curl go.dev for the supported versions of go +ACTIVE_VERSIONS=$(curl https://go.dev/dl/?mode=json | jq -r '.[].version' | sed -e "s/^$GO_PREFIX//" | sort) + +for version in ${ACTIVE_VERSIONS}; do + # pull golang versions in the versions.yaml + MAJORVERSION=$(if [[ $(echo "$version" | awk -F'.' '{print NF}') -ge 3 ]]; then echo ${version%.*}; else echo ${version%-*}; fi) + MINIMAL_GO_VERSION=$(cat "${VERSIONS_YAML}" | grep -E "^GOLANG_${MAJORVERSION}_FULL_VERSION") || "" + # check builder-base versions for the upstream version of golang + # if the version doesn't exist in the builder base update the versions yaml. + if [[ ! $MINIMAL_GO_VERSION =~ $version ]]; then + update::go::version $version + fi +done From 7b2431e56e2879b459aaa5aca6cd592265614c89 Mon Sep 17 00:00:00 2001 From: Cameron Rozean Date: Thu, 11 Jul 2024 13:23:00 -0700 Subject: [PATCH 05/11] fix path --- eks-distro-base/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eks-distro-base/Makefile b/eks-distro-base/Makefile index 3d5734734..9a7b22f78 100644 --- a/eks-distro-base/Makefile +++ b/eks-distro-base/Makefile @@ -211,7 +211,7 @@ BASE_GOLANG_VARIANT_VERSIONS=$(shell yq '.golang.variants | to_entries | .[] | . BASE_GOLANG_COMPILER_VARIANT_VERSIONS=$(foreach ver,$(BASE_GOLANG_VARIANT_VERSIONS),$(addprefix $(ver)-,$(BASE_COMPILER_VARIANT_VERSIONS))) define SET_GOLANG_FULL_VERSIONS - $(shell yq '.golang.versions | to_entries | .[] | [.key,.value] | join("=")' $MAKE_ROOT/golang_versions.yaml) + $(shell yq ".golang.versions | to_entries | .[] | [.key,.value] | join(\"=\")" $(MAKE_ROOT)/golang_versions.yaml) endef # ************************************************************ From 1fd89a55fc07ab819f10284ec1fcb43bf05cfb2a Mon Sep 17 00:00:00 2001 From: Cameron Rozean Date: Thu, 11 Jul 2024 13:29:32 -0700 Subject: [PATCH 06/11] eval variable --- eks-distro-base/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eks-distro-base/Makefile b/eks-distro-base/Makefile index 9a7b22f78..c604bf6c6 100644 --- a/eks-distro-base/Makefile +++ b/eks-distro-base/Makefile @@ -211,7 +211,7 @@ BASE_GOLANG_VARIANT_VERSIONS=$(shell yq '.golang.variants | to_entries | .[] | . BASE_GOLANG_COMPILER_VARIANT_VERSIONS=$(foreach ver,$(BASE_GOLANG_VARIANT_VERSIONS),$(addprefix $(ver)-,$(BASE_COMPILER_VARIANT_VERSIONS))) define SET_GOLANG_FULL_VERSIONS - $(shell yq ".golang.versions | to_entries | .[] | [.key,.value] | join(\"=\")" $(MAKE_ROOT)/golang_versions.yaml) + $(eval $(shell yq ".golang.versions | to_entries | .[] | [.key,.value] | join(\"=\")" $(MAKE_ROOT)/golang_versions.yaml)) endef # ************************************************************ From e637208085c14b0e7b6bfabb45d7fa4126d291a2 Mon Sep 17 00:00:00 2001 From: Cameron Rozean Date: Thu, 11 Jul 2024 13:44:08 -0700 Subject: [PATCH 07/11] readd vars to make --- eks-distro-base/Makefile | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/eks-distro-base/Makefile b/eks-distro-base/Makefile index c604bf6c6..3bab7a6ba 100644 --- a/eks-distro-base/Makefile +++ b/eks-distro-base/Makefile @@ -208,11 +208,13 @@ GOLANG_VARIANT_NAME=eks-distro-minimal-base-golang-compiler # This recreates the list of golang versions separated with ' ' from the golang_versions.yaml using xargs to strip the trailing whitespace. BASE_GOLANG_VARIANT_VERSIONS=$(shell yq '.golang.variants | to_entries | .[] | .value' golang_versions.yaml | tr '\n' ' ' | xargs) -BASE_GOLANG_COMPILER_VARIANT_VERSIONS=$(foreach ver,$(BASE_GOLANG_VARIANT_VERSIONS),$(addprefix $(ver)-,$(BASE_COMPILER_VARIANT_VERSIONS))) +GOLANG_1.18_FULL_VERSION: 1.18.10-8 +GOLANG_1.19_FULL_VERSION: 1.19.13-14 +GOLANG_1.20_FULL_VERSION: 1.20.14-16 +GOLANG_1.21_FULL_VERSION: 1.21.12-0 +GOLANG_1.22_FULL_VERSION: 1.22.5-0 -define SET_GOLANG_FULL_VERSIONS - $(eval $(shell yq ".golang.versions | to_entries | .[] | [.key,.value] | join(\"=\")" $(MAKE_ROOT)/golang_versions.yaml)) -endef +BASE_GOLANG_COMPILER_VARIANT_VERSIONS=$(foreach ver,$(BASE_GOLANG_VARIANT_VERSIONS),$(addprefix $(ver)-,$(BASE_COMPILER_VARIANT_VERSIONS))) # ************************************************************ ############# WINDOWS ############################# From 12666cf045cc712c712658b2b523b98144c5b9ca Mon Sep 17 00:00:00 2001 From: Cameron Rozean Date: Thu, 11 Jul 2024 13:49:57 -0700 Subject: [PATCH 08/11] correct vars to make --- eks-distro-base/Makefile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/eks-distro-base/Makefile b/eks-distro-base/Makefile index 3bab7a6ba..9e48cf16c 100644 --- a/eks-distro-base/Makefile +++ b/eks-distro-base/Makefile @@ -208,11 +208,11 @@ GOLANG_VARIANT_NAME=eks-distro-minimal-base-golang-compiler # This recreates the list of golang versions separated with ' ' from the golang_versions.yaml using xargs to strip the trailing whitespace. BASE_GOLANG_VARIANT_VERSIONS=$(shell yq '.golang.variants | to_entries | .[] | .value' golang_versions.yaml | tr '\n' ' ' | xargs) -GOLANG_1.18_FULL_VERSION: 1.18.10-8 -GOLANG_1.19_FULL_VERSION: 1.19.13-14 -GOLANG_1.20_FULL_VERSION: 1.20.14-16 -GOLANG_1.21_FULL_VERSION: 1.21.12-0 -GOLANG_1.22_FULL_VERSION: 1.22.5-0 +GOLANG_1.18_FULL_VERSION=1.18.10-8 +GOLANG_1.19_FULL_VERSION=1.19.13-14 +GOLANG_1.20_FULL_VERSION=1.20.14-16 +GOLANG_1.21_FULL_VERSION=1.21.12-0 +GOLANG_1.22_FULL_VERSION=1.22.5-0 BASE_GOLANG_COMPILER_VARIANT_VERSIONS=$(foreach ver,$(BASE_GOLANG_VARIANT_VERSIONS),$(addprefix $(ver)-,$(BASE_COMPILER_VARIANT_VERSIONS))) # ************************************************************ From 60b065809cc297b4cabab4cae2514636403cb479 Mon Sep 17 00:00:00 2001 From: Cameron Rozean Date: Fri, 12 Jul 2024 10:59:58 -0700 Subject: [PATCH 09/11] remove golang versions from Makefile --- eks-distro-base/Makefile | 10 ++++------ eks-distro-base/golang_versions.yaml | 13 ------------- 2 files changed, 4 insertions(+), 19 deletions(-) delete mode 100644 eks-distro-base/golang_versions.yaml diff --git a/eks-distro-base/Makefile b/eks-distro-base/Makefile index 9e48cf16c..f8564b0aa 100644 --- a/eks-distro-base/Makefile +++ b/eks-distro-base/Makefile @@ -208,13 +208,11 @@ GOLANG_VARIANT_NAME=eks-distro-minimal-base-golang-compiler # This recreates the list of golang versions separated with ' ' from the golang_versions.yaml using xargs to strip the trailing whitespace. BASE_GOLANG_VARIANT_VERSIONS=$(shell yq '.golang.variants | to_entries | .[] | .value' golang_versions.yaml | tr '\n' ' ' | xargs) -GOLANG_1.18_FULL_VERSION=1.18.10-8 -GOLANG_1.19_FULL_VERSION=1.19.13-14 -GOLANG_1.20_FULL_VERSION=1.20.14-16 -GOLANG_1.21_FULL_VERSION=1.21.12-0 -GOLANG_1.22_FULL_VERSION=1.22.5-0 - BASE_GOLANG_COMPILER_VARIANT_VERSIONS=$(foreach ver,$(BASE_GOLANG_VARIANT_VERSIONS),$(addprefix $(ver)-,$(BASE_COMPILER_VARIANT_VERSIONS))) + +define SET_GOLANG_FULL_VERSIONS + $(foreach ver,$(BASE_GOLANG_VARIANT_VERSIONS),$(eval $(eval GOLANG_$(ver)_FULL_VERSION=$(shell yq ".golang.versions.[\"GOLANG_$(ver)_FULL_VERSION\"]" ~/test/golang_versions.yaml)))) +endef # ************************************************************ ############# WINDOWS ############################# diff --git a/eks-distro-base/golang_versions.yaml b/eks-distro-base/golang_versions.yaml deleted file mode 100644 index 7eb9213d5..000000000 --- a/eks-distro-base/golang_versions.yaml +++ /dev/null @@ -1,13 +0,0 @@ -golang: - variants: - - 1.18 - - 1.19 - - 1.20 - - 1.21 - - 1.22 - versions: - GOLANG_1.18_FULL_VERSION: 1.18.10-8 - GOLANG_1.19_FULL_VERSION: 1.19.13-14 - GOLANG_1.20_FULL_VERSION: 1.20.14-16 - GOLANG_1.21_FULL_VERSION: 1.21.12-0 - GOLANG_1.22_FULL_VERSION: 1.22.5-0 From 3f22e13d409fa523b45cbde098bf53b13d754bb8 Mon Sep 17 00:00:00 2001 From: Cameron Rozean Date: Fri, 12 Jul 2024 11:06:33 -0700 Subject: [PATCH 10/11] fix new versions path --- eks-distro-base/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eks-distro-base/Makefile b/eks-distro-base/Makefile index f8564b0aa..d24fc7af2 100644 --- a/eks-distro-base/Makefile +++ b/eks-distro-base/Makefile @@ -211,7 +211,7 @@ BASE_GOLANG_VARIANT_VERSIONS=$(shell yq '.golang.variants | to_entries | .[] | . BASE_GOLANG_COMPILER_VARIANT_VERSIONS=$(foreach ver,$(BASE_GOLANG_VARIANT_VERSIONS),$(addprefix $(ver)-,$(BASE_COMPILER_VARIANT_VERSIONS))) define SET_GOLANG_FULL_VERSIONS - $(foreach ver,$(BASE_GOLANG_VARIANT_VERSIONS),$(eval $(eval GOLANG_$(ver)_FULL_VERSION=$(shell yq ".golang.versions.[\"GOLANG_$(ver)_FULL_VERSION\"]" ~/test/golang_versions.yaml)))) + $(foreach ver,$(BASE_GOLANG_VARIANT_VERSIONS),$(eval $(eval GOLANG_$(ver)_FULL_VERSION=$(shell yq ".golang.versions.[\"GOLANG_$(ver)_FULL_VERSION\"]" $(MAKE_ROOT)/golang_versions.yaml)))) endef # ************************************************************ From 19249b22b4a2b8e8db786a2f8cd437ac57c34441 Mon Sep 17 00:00:00 2001 From: Cameron Rozean Date: Fri, 12 Jul 2024 11:14:10 -0700 Subject: [PATCH 11/11] add golang versions file back --- eks-distro-base/golang_versions.yaml | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 eks-distro-base/golang_versions.yaml diff --git a/eks-distro-base/golang_versions.yaml b/eks-distro-base/golang_versions.yaml new file mode 100644 index 000000000..7eb9213d5 --- /dev/null +++ b/eks-distro-base/golang_versions.yaml @@ -0,0 +1,13 @@ +golang: + variants: + - 1.18 + - 1.19 + - 1.20 + - 1.21 + - 1.22 + versions: + GOLANG_1.18_FULL_VERSION: 1.18.10-8 + GOLANG_1.19_FULL_VERSION: 1.19.13-14 + GOLANG_1.20_FULL_VERSION: 1.20.14-16 + GOLANG_1.21_FULL_VERSION: 1.21.12-0 + GOLANG_1.22_FULL_VERSION: 1.22.5-0