Skip to content

Commit

Permalink
feat(dev-tools): use distro kubectl (#2606)
Browse files Browse the repository at this point in the history
  • Loading branch information
apeabody authored Sep 24, 2024
1 parent 17331bb commit 406eb2b
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 40 deletions.
7 changes: 1 addition & 6 deletions .github/workflows/update-tooling.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ env:
CFT_CLI_URL: "https://api.github.com/repos/GoogleCloudPlatform/cloud-foundation-toolkit/releases"
MODULE_SWAPPER_URL: "https://api.github.com/repos/GoogleCloudPlatform/cloud-foundation-toolkit/releases"
TFLINT_BP_PLUGIN_URL: "https://api.github.com/repos/GoogleCloudPlatform/cloud-foundation-toolkit/releases"
KUBECTL_MINOR: "1.29"
KUBECTL_URL: "https://api.github.com/repos/kubernetes/kubernetes/releases"
GATOR_MINOR: "3.17"
GATOR_URL: "https://api.github.com/repos/open-policy-agent/gatekeeper/releases"
GCRANE_URL: "https://api.github.com/repos/google/go-containerregistry/releases/latest"
Expand All @@ -39,7 +37,7 @@ jobs:
run: |
PR_UPDATE_BODY=""
newline=$'\n'
tools=("TERRAFORM" "CLOUD_SDK" "CFT_CLI" "KUBECTL" "GATOR" "GCRANE" "KPT" "MODULE_SWAPPER" "KUSTOMIZE" "TERRAGRUNT" "TFLINT" "GOLANGCI" "TFLINT_BP_PLUGIN")
tools=("TERRAFORM" "CLOUD_SDK" "CFT_CLI" "GATOR" "GCRANE" "KPT" "MODULE_SWAPPER" "KUSTOMIZE" "TERRAGRUNT" "TFLINT" "GOLANGCI" "TFLINT_BP_PLUGIN")
for tool in ${tools[@]}
do
Expand All @@ -62,9 +60,6 @@ jobs:
elif [ "$tool" == "TFLINT_BP_PLUGIN" ]; then
# get latest TFLINT_BP_PLUGIN release
LATEST_TOOL_VERSION=$(curl -s ${!TOOL_URL} | jq --raw-output '[ .[] | select( .name | contains("tflint-ruleset-blueprint"))][0].tag_name' | tr -d "tflint\-ruleset\-blueprint/v")
elif [ "$tool" == "KUBECTL" ]; then
# get latest KUBECTL_MINOR release
LATEST_TOOL_VERSION=$(curl -s ${!TOOL_URL} | jq --raw-output '[ .[] | select( .name | contains("'${KUBECTL_MINOR}'"))][0].tag_name' | tr -d "v")
elif [ "$tool" == "GATOR" ]; then
# get latest GATOR_MINOR release
LATEST_TOOL_VERSION=$(curl -s ${!TOOL_URL} | jq --raw-output '[ .[] | select( .name | contains("'${GATOR_MINOR}'"))][0].tag_name' | tr -d "v")
Expand Down
4 changes: 1 addition & 3 deletions infra/build/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@ PROTOC_GEN_GO_INJECT_TAG := 1.4.0
# Updated by Update Tooling Workflow
CFT_CLI_VERSION := 1.5.1
# Updated by Update Tooling Workflow
KUBECTL_VERSION := 1.29.8
# Updated by Update Tooling Workflow
TFLINT_VERSION := 0.53.0
TINKEY_VERSION := 1.7.0
ALPINE_VERSION := 3.20
Expand All @@ -58,7 +56,7 @@ OPA_VERSION := 0.52.0
# Updated by Update Tooling Workflow
GCRANE_VERSION := 0.20.2

DOCKER_TAG_VERSION_DEVELOPER_TOOLS := 1.22.11
DOCKER_TAG_VERSION_DEVELOPER_TOOLS := 1.22.12
DOCKER_TAG_MAJOR_VERSION_DEVELOPER_TOOLS := $(firstword $(subst ., , $(DOCKER_TAG_VERSION_DEVELOPER_TOOLS)))
DOCKER_TAG_MINOR_VERSION_DEVELOPER_TOOLS := $(shell echo "${DOCKER_TAG_VERSION_DEVELOPER_TOOLS}" | awk -F. '{print $$1"."$$2}')

Expand Down
6 changes: 2 additions & 4 deletions infra/build/developer-tools/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ RUN apk upgrade --no-cache && \
py3-pygithub \
py3-requests \
ruby-dev \
go
go \
kubectl

# Add all build scripts
ADD ./build/*.sh /build/
Expand Down Expand Up @@ -109,9 +110,6 @@ RUN /build/install_kpt.sh ${KPT_VERSION}
ARG CFT_CLI_VERSION
RUN /build/install_cft_cli.sh ${CFT_CLI_VERSION}

ARG KUBECTL_VERSION
RUN /build/install_kubectl.sh ${KUBECTL_VERSION}

ARG MODULE_SWAPPER_VERSION
RUN /build/install_module-swapper.sh ${MODULE_SWAPPER_VERSION}

Expand Down
27 changes: 0 additions & 27 deletions infra/build/developer-tools/build/install_kubectl.sh

This file was deleted.

0 comments on commit 406eb2b

Please sign in to comment.