Skip to content

Commit

Permalink
Merge branch 'master' into ap/tf_version_paramter
Browse files Browse the repository at this point in the history
  • Loading branch information
apeabody authored Aug 8, 2024
2 parents 82d35e2 + f43ba90 commit db0cef4
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 7 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/update-tooling.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ env:
KPT_URL: "https://api.github.com/repos/kptdev/kpt/releases"
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.28"
KUBECTL_URL: "https://api.github.com/repos/kubernetes/kubernetes/releases"
GATOR_MINOR: "3.14"
Expand All @@ -38,7 +39,7 @@ jobs:
run: |
PR_UPDATE_BODY=""
newline=$'\n'
tools=("TERRAFORM" "CLOUD_SDK" "CFT_CLI" "KUBECTL" "GATOR" "GCRANE" "KPT" "MODULE_SWAPPER" "KUSTOMIZE" "TERRAGRUNT" "TFLINT" "GOLANGCI")
tools=("TERRAFORM" "CLOUD_SDK" "CFT_CLI" "KUBECTL" "GATOR" "GCRANE" "KPT" "MODULE_SWAPPER" "KUSTOMIZE" "TERRAGRUNT" "TFLINT" "GOLANGCI" "TFLINT_BP_PLUGIN")
for tool in ${tools[@]}
do
Expand All @@ -58,6 +59,9 @@ jobs:
elif [ "$tool" == "MODULE_SWAPPER" ]; then
# get latest MODULE_SWAPPER release
LATEST_TOOL_VERSION=$(curl -s ${!TOOL_URL} | jq --raw-output '[ .[] | select( .name | contains("infra/module-swapper"))][0].tag_name' | tr -d "infra/module\-swapper/v")
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")
Expand Down
5 changes: 3 additions & 2 deletions infra/build/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ TINKEY_VERSION := 1.7.0
ALPINE_VERSION := 3.20
# Updated by Update Tooling Workflow
MODULE_SWAPPER_VERSION := 0.4.8
TFLINT_BP_PLUGIN := 0.1.0
# Updated by Update Tooling Workflow
TFLINT_BP_PLUGIN_VERSION := 0.1.0

# For developer-tools-krm
# Updated by Update Tooling Workflow
Expand Down Expand Up @@ -93,7 +94,7 @@ build-image-developer-tools:
--build-arg TINKEY_VERSION=${TINKEY_VERSION} \
--build-arg ALPINE_VERSION=${ALPINE_VERSION} \
--build-arg MODULE_SWAPPER_VERSION=${MODULE_SWAPPER_VERSION} \
--build-arg TFLINT_BP_PLUGIN=${TFLINT_BP_PLUGIN} \
--build-arg TFLINT_BP_PLUGIN_VERSION=${TFLINT_BP_PLUGIN_VERSION} \
-t ${DOCKER_IMAGE_DEVELOPER_TOOLS}:${DOCKER_TAG_VERSION_DEVELOPER_TOOLS} "./developer-tools"
docker build \
--build-arg BASE_IMAGE_VERSION=${DOCKER_TAG_VERSION_DEVELOPER_TOOLS} \
Expand Down
4 changes: 2 additions & 2 deletions infra/build/developer-tools/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,8 @@ RUN /build/install_kubectl.sh ${KUBECTL_VERSION}
ARG MODULE_SWAPPER_VERSION
RUN /build/install_module-swapper.sh ${MODULE_SWAPPER_VERSION}

ARG TFLINT_BP_PLUGIN
RUN /build/install_tflint_plugin.sh ${TFLINT_BP_PLUGIN}
ARG TFLINT_BP_PLUGIN_VERSION
RUN /build/install_tflint_plugin.sh ${TFLINT_BP_PLUGIN_VERSION}

WORKDIR /opt/kitchen
ADD ./build/data/Gemfile .
Expand Down
4 changes: 2 additions & 2 deletions infra/build/developer-tools/build/install_tflint_plugin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ set -u
mkdir -p /build/install_tflint_plugin
cd /build/install_tflint_plugin

TFLINT_BP_PLUGIN=$1
wget -nv "https://github.com/GoogleCloudPlatform/cloud-foundation-toolkit/releases/download/tflint-ruleset-blueprint%2Fv${TFLINT_BP_PLUGIN}/tflint-ruleset-blueprint_linux_amd64.zip"
TFLINT_BP_PLUGIN_VERSION=$1
wget -nv "https://github.com/GoogleCloudPlatform/cloud-foundation-toolkit/releases/download/tflint-ruleset-blueprint%2Fv${TFLINT_BP_PLUGIN_VERSION}/tflint-ruleset-blueprint_linux_amd64.zip"
unzip -q tflint-ruleset-blueprint_linux_amd64.zip
mkdir -p ~/.tflint.d/plugins
install -o 0 -g 0 -m 0755 tflint-ruleset-blueprint ~/.tflint.d/plugins
Expand Down

0 comments on commit db0cef4

Please sign in to comment.