-
Notifications
You must be signed in to change notification settings - Fork 204
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update container dependencies (#4310)
* Update Go version * Update install-dependencies.sh * Revert Kustomize for now
- Loading branch information
1 parent
f5ec28a
commit d4d8687
Showing
1 changed file
with
24 additions
and
24 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 |
---|---|---|
|
@@ -94,7 +94,7 @@ fi | |
|
||
# Ensure we have the right version of GO | ||
|
||
#doc# | Go | 1.22 | https://golang.org/doc/install # | ||
#doc# | Go | 1.23 | https://golang.org/doc/install # | ||
if ! command -v go > /dev/null 2>&1; then | ||
write-error "Go must be installed manually; see https://golang.org/doc/install" | ||
exit 1 | ||
|
@@ -113,7 +113,7 @@ if ! [[ $GOVERACTUAL =~ $GOVERREGEX ]]; then | |
fi | ||
|
||
GOMINORVER="${BASH_REMATCH[1]}" | ||
GOMINORREQUIRED=22 | ||
GOMINORREQUIRED=23 | ||
|
||
# We allow for Go versions above the min version, but prevent versions below. This is safe given Go's back-compat guarantees | ||
if ! [[ $GOMINORVER -ge $GOMINORREQUIRED ]]; then | ||
|
@@ -185,22 +185,22 @@ go-install() { | |
fi | ||
} | ||
|
||
#doc# | conversion-gen | v0.28.8 | https://pkg.go.dev/k8s.io/code-generator/cmd/conversion-gen | | ||
go-install conversion-gen k8s.io/code-generator/cmd/conversion-gen@v0.28.8 | ||
#doc# | conversion-gen | v0.30.5 | https://pkg.go.dev/k8s.io/code-generator/cmd/conversion-gen | | ||
go-install conversion-gen k8s.io/code-generator/cmd/conversion-gen@v0.30.5 | ||
|
||
#doc# | controller-gen | v0.14.0 | https://book.kubebuilder.io/reference/controller-gen | | ||
go-install controller-gen sigs.k8s.io/controller-tools/cmd/controller-gen@v0.14.0 | ||
#doc# | controller-gen | v0.16.3 | https://book.kubebuilder.io/reference/controller-gen | | ||
go-install controller-gen sigs.k8s.io/controller-tools/cmd/controller-gen@v0.16.3 | ||
|
||
#doc# | kind | v0.20.0 | https://kind.sigs.k8s.io/ | | ||
go-install kind sigs.k8s.io/kind@v0.20.0 | ||
#doc# | kind | v0.24.0 | https://kind.sigs.k8s.io/ | | ||
go-install kind sigs.k8s.io/kind@v0.24.0 | ||
|
||
#doc# | kustomize | v4.5.7 | https://kustomize.io/ | | ||
go-install kustomize sigs.k8s.io/kustomize/kustomize/[email protected] | ||
|
||
# for docs site | ||
|
||
#doc# | hugo | v0.88.1 | https://gohugo.io/ | | ||
go-install hugo -tags extended github.com/gohugoio/hugo@v0.88.1 | ||
#doc# | hugo | v0.135.0 | https://gohugo.io/ | | ||
go-install hugo -tags extended github.com/gohugoio/hugo@v0.135.0 | ||
|
||
#doc# | htmltest | latest | https://github.com/wjdp/htmltest (but see https://github.com/theunrepentantgeek/htmltest for our custom build ) | ||
# Restore this to github.com/wjdp/htmltest@v?? once PR#215 is merged with the feature we need | ||
|
@@ -221,48 +221,48 @@ go-install setup-envtest sigs.k8s.io/controller-runtime/tools/setup-envtest@late | |
go-install gofumpt mvdan.cc/gofumpt@latest | ||
|
||
# Install golangci-lint | ||
#doc# | golangci-lint | 1.51.2 | https://github.com/golangci/golangci-lint | | ||
#doc# | golangci-lint | 1.61.0 | https://github.com/golangci/golangci-lint | | ||
write-verbose "Checking for $TOOL_DEST/golangci-lint" | ||
if should-install "$TOOL_DEST/golangci-lint"; then | ||
write-info "Installing golangci-lint" | ||
# golangci-lint is provided by base image if in devcontainer | ||
# this command copied from there | ||
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b "$TOOL_DEST" v1.51.2 2>&1 | ||
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b "$TOOL_DEST" v1.61.0 2>&1 | ||
fi | ||
|
||
# Install Task | ||
#doc# | Task | v3.31 | https://taskfile.dev/ | | ||
#doc# | Task | v3.39.2 | https://taskfile.dev/ | | ||
write-verbose "Checking for $TOOL_DEST/go-task" | ||
if should-install "$TOOL_DEST/task"; then | ||
write-info "Installing go-task" | ||
curl -sL "https://github.com/go-task/task/releases/download/v3.31.0/task_${os}_${arch}.tar.gz" | tar xz -C "$TOOL_DEST" task | ||
curl -sL "https://github.com/go-task/task/releases/download/v3.39.2/task_${os}_${arch}.tar.gz" | tar xz -C "$TOOL_DEST" task | ||
fi | ||
|
||
# Install Trivy | ||
#doc# | Trivy | v0.37.3 | https://trivy.dev/ | | ||
#doc# | Trivy | v0.55.2 | https://trivy.dev/ | | ||
write-verbose "Checking for $TOOL_DEST/trivy" | ||
if should-install "$TOOL_DEST/trivy"; then | ||
write-info "Installing trivy" | ||
# This guys decided to use different naming conventions for os(go env GOOS) and arch(go env GOARCH) despite trivy is 98.6% written in Go | ||
# This fixes macos arm64 architechture. Every other os/arch is named differently. Consider adding a workaround of your own ¯\_(ツ)_/¯ | ||
if [[ ${os} == "darwin" ]] && [[ ${arch} == "arm64" ]]; then | ||
curl -sL "https://github.com/aquasecurity/trivy/releases/download/v0.37.3/trivy_0.37.3_macOS-ARM64.tar.gz" | tar xz -C "$TOOL_DEST" trivy | ||
curl -sL "https://github.com/aquasecurity/trivy/releases/download/v0.55.2/trivy_0.55.2_macOS-ARM64.tar.gz" | tar xz -C "$TOOL_DEST" trivy | ||
else | ||
curl -sL "https://github.com/aquasecurity/trivy/releases/download/v0.37.3/trivy_0.37.3_Linux-64bit.tar.gz" | tar xz -C "$TOOL_DEST" trivy | ||
curl -sL "https://github.com/aquasecurity/trivy/releases/download/v0.55.2/trivy_0.55.2_Linux-ARM64.tar.gz" | tar xz -C "$TOOL_DEST" trivy | ||
fi | ||
fi | ||
|
||
# Install helm | ||
#doc# | Helm | v3.8.0 | https://helm.sh/ | | ||
#doc# | Helm | v3.16.1 | https://helm.sh/ | | ||
write-verbose "Checking for $TOOL_DEST/helm" | ||
if should-install "$TOOL_DEST/helm"; then | ||
write-info "Installing helm..." | ||
curl -sL "https://get.helm.sh/helm-v3.8.0-${os}-${arch}.tar.gz" | tar -C "$TOOL_DEST" --strip-components=1 -xz ${os}-${arch}/helm | ||
curl -sL "https://get.helm.sh/helm-v3.16.1-${os}-${arch}.tar.gz" | tar -C "$TOOL_DEST" --strip-components=1 -xz ${os}-${arch}/helm | ||
fi | ||
|
||
# Install yq | ||
#doc# | YQ | v4.13.0 | https://github.com/mikefarah/yq/ | | ||
yq_version=v4.13.0 | ||
#doc# | YQ | v4.44.3 | https://github.com/mikefarah/yq/ | | ||
yq_version=v4.44.3 | ||
yq_binary=yq_${os}_${arch} | ||
write-verbose "Checking for $TOOL_DEST/yq" | ||
if should-install "$TOOL_DEST/yq"; then | ||
|
@@ -281,14 +281,14 @@ if should-install "$TOOL_DEST/cmctl"; then | |
fi | ||
|
||
write-verbose "Checking for $BUILDX_DEST/docker-buildx" | ||
#doc# | BuildX | v0.11.2 | https://github.com/docker/buildx | | ||
#doc# | BuildX | v0.17.1 | https://github.com/docker/buildx | | ||
if should-install "$BUILDX_DEST/docker-buildx"; then | ||
write-info "Installing buildx-${os}_${arch} to $BUILDX_DEST ..." | ||
if ! test -f $BUILDX_DEST; then | ||
mkdir -p "$BUILDX_DEST" | ||
fi | ||
if ! test -f $BUILDX_DEST/docker-buildx; then | ||
curl -o "$BUILDX_DEST/docker-buildx" -L "https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.${os}-${arch}" | ||
curl -o "$BUILDX_DEST/docker-buildx" -L "https://github.com/docker/buildx/releases/download/v0.17.1/buildx-v0.17.1.${os}-${arch}" | ||
chmod +x "$BUILDX_DEST/docker-buildx" | ||
fi | ||
fi | ||
|
@@ -298,7 +298,7 @@ fi | |
write-verbose "Checking for $TOOL_DEST/azwi" | ||
if should-install "$TOOL_DEST/azwi"; then | ||
write-info "Installing azwi..." | ||
curl -sL "https://github.com/Azure/azure-workload-identity/releases/download/v1.2.0/azwi-v1.2.0-${os}-${arch}.tar.gz" | tar xz -C "$TOOL_DEST" azwi | ||
curl -sL "https://github.com/Azure/azure-workload-identity/releases/download/v1.3.0/azwi-v1.3.0-${os}-${arch}.tar.gz" | tar xz -C "$TOOL_DEST" azwi | ||
fi | ||
|
||
# Ensure tooling for Hugo is available | ||
|