forked from aws/eks-anywhere-build-tooling
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
builder-base: add update-shasums script to make updating easier (aws#275
- Loading branch information
Showing
8 changed files
with
177 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
1994069f78d44a76d463b76fef42c7e4ab412df14703a51643642ecdefa2c029 packer-provisioner-goss-v3.0.3-linux-amd64.tar.gz | ||
1994069f78d44a76d463b76fef42c7e4ab412df14703a51643642ecdefa2c029 packer-provisioner-goss-v3.0.3-linux-amd64.tar.gz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
faf409c1ecbb23fb4a4a6d2df9092e047b94ed14d8a55768e23957388c6a2117 govc_linux_amd64.gz | ||
faf409c1ecbb23fb4a4a6d2df9092e047b94ed14d8a55768e23957388c6a2117 govc_linux_amd64.gz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
9429c3a6f80b406dbddb9b30a4e468aeac59ab6ae4d09618c8d70c4f4188442e packer_1.7.2_linux_amd64.zip | ||
9429c3a6f80b406dbddb9b30a4e468aeac59ab6ae4d09618c8d70c4f4188442e packer_1.7.2_linux_amd64.zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
#!/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 | ||
|
||
for TARGETARCH in arm64 amd64; do | ||
source ./versions.sh | ||
|
||
# GOLANG | ||
go_file_name="go$GOLANG_VERSION.linux-$TARGETARCH.tar.gz" | ||
sha256=$(curl -sSL --retry 5 https://go.dev/dl/?mode=json\&include=all | jq -r ".[] | select(.version==\"go$GOLANG_VERSION\") | .files[] | select(.filename==\"$go_file_name\").sha256") | ||
echo "$sha256 $go_file_name" > golang-$TARGETARCH-checksum | ||
|
||
# YQ | ||
readarray -t yq_checksum_order <<< $(curl -sSL --retry 5 $YQ_CHECKSUM_ORDER_URL) | ||
yq_checksums=$(curl -sSL --retry 5 $YQ_CHECKSUM_URL | grep -r yq_linux_$TARGETARCH | cut -d ":" -f 2) | ||
IFS=' ' read -r -a yq_checksums_ar <<< "$yq_checksums" | ||
|
||
yq_checksum_index=-1 | ||
for i in "${!yq_checksum_order[@]}"; do | ||
if [[ "${yq_checksum_order[$i]}" = "SHA-256" ]]; then | ||
yq_checksum_index=$(($i+1)) | ||
fi | ||
done | ||
echo $yq_checksum_index | ||
echo "${yq_checksums_ar[*]}" | ||
sha256="${yq_checksums_ar[$yq_checksum_index]}" | ||
echo "$sha256 yq_linux_$TARGETARCH" > yq-$TARGETARCH-checksum | ||
done | ||
|
||
# BUILDKIT | ||
sha256=$(curl -sSL --retry 5 $BUILDKIT_DOWNLOAD_URL | sha256sum | awk '{print $1}') | ||
echo "$sha256 buildkit-$BUILDKIT_VERSION.linux-$TARGETARCH.tar.gz" > buildkit-$TARGETARCH-checksum | ||
|
||
# GITHUB CLI | ||
echo "$(curl -sSL --retry 5 $GITHUB_CLI_CHECKSUM_URL | grep -r gh_${GITHUB_CLI_VERSION}_linux_$TARGETARCH.tar.gz | cut -d ":" -f 2)" > github-cli-$TARGETARCH-checksum | ||
|
||
# PACKER | ||
echo "$(curl -sSL --retry 5 $PACKER_CHECKSUM_URL | grep -r packer_${PACKER_VERSION}_linux_$TARGETARCH.zip | cut -d ":" -f 2)" > packer-$TARGETARCH-checksum | ||
|
||
# NODEJS | ||
echo "$(curl -sSL --retry 5 $NODEJS_CHECKSUM_URL | grep -r $NODEJS_FILENAME | cut -d ":" -f 2)" > nodejs-$TARGETARCH-checksum | ||
|
||
# HELM | ||
sha256=$(curl -sSL --retry 5 $HELM_CHECKSUM_URL) | ||
echo "$sha256 helm-v${HELM_VERSION}-linux-$TARGETARCH.tar.gz" > helm-$TARGETARCH-checksum | ||
|
||
# GOSS | ||
# TODO: Later versions push a sha256sum file to github so when we upgrade we can start using it instead | ||
sha256=$(curl -sSL --retry 5 $GOSS_DOWNLOAD_URL | sha256sum | awk '{print $1}') | ||
echo "$sha256 packer-provisioner-goss-v${GOSS_VERSION}-linux-$TARGETARCH.tar.gz" > goss-$TARGETARCH-checksum | ||
|
||
# GOVC | ||
# TODO: Later versions push a sha256sum file to github so when we upgrade we can start using it instead | ||
sha256=$(curl -sSL --retry 5 $GOVC_DOWNLOAD_URL | sha256sum | awk '{print $1}') | ||
echo "$sha256 govc_linux_$TARGETARCH.gz" > govc-$TARGETARCH-checksum | ||
|
||
# HUGO | ||
echo "$(curl -sSL --retry 5 $HUGO_CHECKSUM_URL | grep -r $HUGO_FILENAME | cut -d ":" -f 2)" > hugo-$TARGETARCH-checksum | ||
|
||
# BASH | ||
sha256=$(curl -sSL --retry 5 $BASH_DOWNLOAD_URL | sha256sum | awk '{print $1}') | ||
echo "$sha256 bash-$OVERRIDE_BASH_VERSION.tar.gz" > bash-checksum |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
#!/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. | ||
|
||
# This script is used to install the necessary dependencies on the pod | ||
# building the builder-base as well as into the builder-base itself | ||
# Note: since we run the build in fargate we do not have access to an overlayfs | ||
# so we use a single script from the dockerfile instead of layers to avoid | ||
# layer duplicate and running out of disk space | ||
# This does make local builds painful. Its recommended to add new additions | ||
# in their own script/layer while testing and then when you are done add | ||
# to here | ||
|
||
GOLANG_VERSION="${GOLANG_VERSION:-1.16.12}" | ||
GOLANG_DOWNLOAD_URL="https://go.dev/dl/go$GOLANG_VERSION.linux-$TARGETARCH.tar.gz" | ||
|
||
BUILDKIT_VERSION="${BUILDKIT_VERSION:-v0.9.0}" | ||
BUILDKIT_DOWNLOAD_URL="https://github.com/moby/buildkit/releases/download/$BUILDKIT_VERSION/buildkit-$BUILDKIT_VERSION.linux-$TARGETARCH.tar.gz" | ||
|
||
GITHUB_CLI_VERSION="${GITHUB_CLI_VERSION:-1.8.0}" | ||
GITHUB_CLI_DOWNLOAD_URL="https://github.com/cli/cli/releases/download/v${GITHUB_CLI_VERSION}/gh_${GITHUB_CLI_VERSION}_linux_$TARGETARCH.tar.gz" | ||
GITHUB_CLI_CHECKSUM_URL="https://github.com/cli/cli/releases/download/v${GITHUB_CLI_VERSION}/gh_${GITHUB_CLI_VERSION}_checksums.txt" | ||
|
||
OVERRIDE_BASH_VERSION="${OVERRIDE_BASH_VERSION:-4.3}" | ||
BASH_DOWNLOAD_URL="http://ftp.gnu.org/gnu/bash/bash-$OVERRIDE_BASH_VERSION.tar.gz" | ||
|
||
PACKER_VERSION="${PACKER_VERSION:-1.7.2}" | ||
PACKER_DOWNLOAD_URL="https://releases.hashicorp.com/packer/$PACKER_VERSION/packer_${PACKER_VERSION}_linux_$TARGETARCH.zip" | ||
PACKER_CHECKSUM_URL="https://releases.hashicorp.com/packer/$PACKER_VERSION/packer_${PACKER_VERSION}_SHA256SUMS" | ||
|
||
NODEJS_VERSION="${NODEJS_VERSION:-v15.11.0}" | ||
if [ $TARGETARCH == 'amd64' ]; then | ||
NODEJS_FILENAME="node-$NODEJS_VERSION-linux-x64.tar.gz" | ||
NDOEJS_FOLDER="node-$NODEJS_VERSION-linux-x64" | ||
else | ||
NODEJS_FILENAME="node-$NODEJS_VERSION-linux-arm64.tar.gz" | ||
NDOEJS_FOLDER="node-$NODEJS_VERSION-linux-arm64" | ||
fi | ||
NODEJS_DOWNLOAD_URL="https://nodejs.org/dist/$NODEJS_VERSION/$NODEJS_FILENAME" | ||
NODEJS_CHECKSUM_URL="https://nodejs.org/dist/$NODEJS_VERSION/SHASUMS256.txt" | ||
|
||
HELM_VERSION="${HELM_VERSION:-3.7.1}" | ||
HELM_DOWNLOAD_URL="https://get.helm.sh/helm-v${HELM_VERSION}-linux-$TARGETARCH.tar.gz" | ||
HELM_CHECKSUM_URL="$HELM_DOWNLOAD_URL.sha256" | ||
|
||
GOSS_VERSION="${GOSS_VERSION:-3.0.3}" | ||
GOSS_DOWNLOAD_URL="https://github.com/YaleUniversity/packer-provisioner-goss/releases/download/v${GOSS_VERSION}/packer-provisioner-goss-v${GOSS_VERSION}-linux-$TARGETARCH.tar.gz" | ||
GOSS_CHECKSUM_URL="https://github.com/YaleUniversity/packer-provisioner-goss/releases/download/v${GOSS_VERSION}/packer-provisioner-goss-v${GOSS_VERSION}_SHA256SUMS" | ||
|
||
GOVC_VERSION="${GOVC_VERSION:-0.24.0}" | ||
GOVC_DOWNLOAD_URL="https://github.com/vmware/govmomi/releases/download/v${GOVC_VERSION}/govc_linux_$TARGETARCH.gz" | ||
GOVC_CHECKSUM_URL="https://github.com/vmware/govmomi/releases/download/v${GOVC_VERSION}/checksums.txt" | ||
|
||
HUGO_VERSION=0.85.0 | ||
if [ $TARGETARCH == 'amd64' ]; then | ||
HUGO_FILENAME="hugo_extended_${HUGO_VERSION}_Linux-64bit.tar.gz" | ||
else | ||
HUGO_FILENAME="nhugo_extended_${HUGO_VERSION}_Linux-<nonexistent>.tar.gz" | ||
fi | ||
HUGO_DOWNLOAD_URL="https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/$HUGO_FILENAME" | ||
HUGO_CHECKSUM_URL="https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_${HUGO_VERSION}_checksums.txt" | ||
|
||
|
||
YQ_VERSION="${YQ_VERSION:-v4.7.1}" | ||
YQ_DOWNLOAD_URL="https://github.com/mikefarah/yq/releases/download/${YQ_VERSION}/yq_linux_$TARGETARCH" | ||
YQ_CHECKSUM_URL="https://github.com/mikefarah/yq/releases/download/${YQ_VERSION}/checksums" | ||
YQ_CHECKSUM_ORDER_URL="https://github.com/mikefarah/yq/releases/download/${YQ_VERSION}/checksums_hashes_order" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
4eee4d884da169b2bfdab545d2b149b4d6a0050e86e3906088f8fae6ee509394 yq_linux_amd64.tar.gz | ||
16a443be2913c206b95e7bf53c086ba213a77955a31f2f134f41a529c5c62aa4 yq_linux_amd64 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
92fa8586a821a44a450e7c864dc1961afdbc4196f2132e76abb9f34e09a30802 yq_linux_arm64.tar.gz | ||
291b4b481012b6066ebb9f6672957b91a3fff45a667b0bef7a61d8e07a70b855 yq_linux_arm64 |