diff --git a/infra/build/Makefile b/infra/build/Makefile index 74e48b55d38..a59e588703f 100644 --- a/infra/build/Makefile +++ b/infra/build/Makefile @@ -55,7 +55,7 @@ OPA_VERSION := 0.52.0 # Updated by Update Tooling Workflow GCRANE_VERSION := 0.16.1 -DOCKER_TAG_VERSION_DEVELOPER_TOOLS := 1.16.1 +DOCKER_TAG_VERSION_DEVELOPER_TOOLS := 1.16.2 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}') diff --git a/infra/build/developer-tools-krm/build/install_asmcli.sh b/infra/build/developer-tools-krm/build/install_asmcli.sh index 837cd8d1f0e..4a366651b3d 100755 --- a/infra/build/developer-tools-krm/build/install_asmcli.sh +++ b/infra/build/developer-tools-krm/build/install_asmcli.sh @@ -16,9 +16,12 @@ set -e set -u -cd /build +mkdir -p /build/install_asmcli +cd /build/install_asmcli ASMCLI_VERSION=$1 curl https://storage.googleapis.com/csm-artifacts/asm/asmcli_${ASMCLI_VERSION} > asmcli install -o 0 -g 0 -m 0755 asmcli /usr/local/bin/asmcli + +rm -rf /build/install_asmcli diff --git a/infra/build/developer-tools-krm/build/install_gator.sh b/infra/build/developer-tools-krm/build/install_gator.sh index 5cf6255af5a..dc8b9fe0d69 100755 --- a/infra/build/developer-tools-krm/build/install_gator.sh +++ b/infra/build/developer-tools-krm/build/install_gator.sh @@ -16,10 +16,13 @@ set -e set -u -cd /build +mkdir -p /build/install_gator +cd /build/install_gator GATOR_VERSION=$1 -wget -q https://github.com/open-policy-agent/gatekeeper/releases/download/v${GATOR_VERSION}/gator-v${GATOR_VERSION}-linux-amd64.tar.gz +wget -nv "https://github.com/open-policy-agent/gatekeeper/releases/download/v${GATOR_VERSION}/gator-v${GATOR_VERSION}-linux-amd64.tar.gz" tar -xf gator-v${GATOR_VERSION}-linux-amd64.tar.gz install -o 0 -g 0 -m 0755 gator /usr/local/bin/gator + +rm -rf /build/install_gator diff --git a/infra/build/developer-tools-krm/build/install_kind.sh b/infra/build/developer-tools-krm/build/install_kind.sh index 4638173df3e..e1dc9fcf80b 100755 --- a/infra/build/developer-tools-krm/build/install_kind.sh +++ b/infra/build/developer-tools-krm/build/install_kind.sh @@ -16,9 +16,12 @@ set -e set -u -cd /build +mkdir -p /build/install_kind +cd /build/install_kind KIND_VERSION=$1 -wget -q https://kind.sigs.k8s.io/dl/v${KIND_VERSION}/kind-linux-amd64 +wget -nv "https://kind.sigs.k8s.io/dl/v${KIND_VERSION}/kind-linux-amd64" install -o 0 -g 0 -m 0755 kind-linux-amd64 /usr/local/bin/kind + +rm -rf /build/install_kind diff --git a/infra/build/developer-tools-krm/build/install_opa.sh b/infra/build/developer-tools-krm/build/install_opa.sh index 396d9669567..da34e29b75b 100755 --- a/infra/build/developer-tools-krm/build/install_opa.sh +++ b/infra/build/developer-tools-krm/build/install_opa.sh @@ -16,9 +16,12 @@ set -e set -u -cd /build +mkdir -p /build/install_opa +cd /build/install_opa OPA_VERSION=$1 -wget -q https://openpolicyagent.org/downloads/v${OPA_VERSION}/opa_linux_amd64_static -O opa +wget -nv "https://openpolicyagent.org/downloads/v${OPA_VERSION}/opa_linux_amd64_static" -O opa install -o 0 -g 0 -m 0755 opa /usr/local/bin/opa + +rm -rf /build/install_opa diff --git a/infra/build/developer-tools/build/install_bats.sh b/infra/build/developer-tools/build/install_bats.sh index a2af5c41f9e..e17d28ed022 100755 --- a/infra/build/developer-tools/build/install_bats.sh +++ b/infra/build/developer-tools/build/install_bats.sh @@ -16,29 +16,29 @@ set -e set -u +mkdir -p /build/install_bats +cd /build/install_bats + BATS_VERSION=$1 BATS_SUPPORT_VERSION=$2 BATS_ASSERT_VERSION=$3 BATS_MOCK_VERSION=$4 -cd /build -wget "https://github.com/sstephenson/bats/archive/v${BATS_VERSION}.zip" -unzip "v${BATS_VERSION}.zip" +wget -nv "https://github.com/sstephenson/bats/archive/v${BATS_VERSION}.zip" +unzip -q "v${BATS_VERSION}.zip" cd "bats-${BATS_VERSION}" ./install.sh /usr/local -rm -rf "v${BATS_VERSION}" "bats-${BATS_VERSION}" -wget "https://github.com/ztombol/bats-support/archive/v${BATS_SUPPORT_VERSION}.zip" -unzip "v${BATS_SUPPORT_VERSION}.zip" +wget -nv "https://github.com/ztombol/bats-support/archive/v${BATS_SUPPORT_VERSION}.zip" +unzip -q "v${BATS_SUPPORT_VERSION}.zip" cp -r "bats-support-${BATS_SUPPORT_VERSION}" /usr/local/bats-support -rm -rf "v${BATS_SUPPORT_VERSION}.zip" "bats-support-${BATS_SUPPORT_VERSION}" -wget "https://github.com/jasonkarns/bats-assert-1/archive/v${BATS_ASSERT_VERSION}.zip" -unzip "v${BATS_ASSERT_VERSION}.zip" +wget -nv "https://github.com/jasonkarns/bats-assert-1/archive/v${BATS_ASSERT_VERSION}.zip" +unzip -q "v${BATS_ASSERT_VERSION}.zip" cp -r "bats-assert-${BATS_ASSERT_VERSION}" /usr/local/bats-assert -rm -rf "v${BATS_ASSERT_VERSION}.zip" "bats-assert-${BATS_ASSERT_VERSION}" -wget "https://github.com/jasonkarns/bats-mock/archive/v${BATS_MOCK_VERSION}.zip" -unzip "v${BATS_MOCK_VERSION}.zip" +wget -nv "https://github.com/jasonkarns/bats-mock/archive/v${BATS_MOCK_VERSION}.zip" +unzip -q "v${BATS_MOCK_VERSION}.zip" cp -r "bats-mock-${BATS_MOCK_VERSION}" /usr/local/bats-mock -rm -rf "v${BATS_MOCK_VERSION}.zip" "bats-mock-${BATS_MOCK_VERSION}" + +rm -rf /build/install_bats diff --git a/infra/build/developer-tools/build/install_cft_cli.sh b/infra/build/developer-tools/build/install_cft_cli.sh index ec23fbf45fe..9ad82f6c39a 100755 --- a/infra/build/developer-tools/build/install_cft_cli.sh +++ b/infra/build/developer-tools/build/install_cft_cli.sh @@ -16,12 +16,15 @@ set -e set -u -CFT_CLI_VERSION=$1 +mkdir -p /build/install_cft_cli +cd /build/install_cft_cli -cd /build +CFT_CLI_VERSION=$1 -if ! wget "https://github.com/GoogleCloudPlatform/cloud-foundation-toolkit/releases/download/cli%2Fv${CFT_CLI_VERSION}/cft-linux-amd64"; then - wget "https://github.com/GoogleCloudPlatform/cloud-foundation-toolkit/releases/download/v${CFT_CLI_VERSION}/cft-linux-amd64" +if ! wget -nv "https://github.com/GoogleCloudPlatform/cloud-foundation-toolkit/releases/download/cli%2Fv${CFT_CLI_VERSION}/cft-linux-amd64"; then + wget -nv "https://github.com/GoogleCloudPlatform/cloud-foundation-toolkit/releases/download/v${CFT_CLI_VERSION}/cft-linux-amd64" fi install -o 0 -g 0 -m 0755 cft-linux-amd64 /usr/local/bin/cft + +rm -rf /build/install_cft_cli diff --git a/infra/build/developer-tools/build/install_cloud_sdk.sh b/infra/build/developer-tools/build/install_cloud_sdk.sh index 2a7e6b9ed6b..7afff2464a0 100755 --- a/infra/build/developer-tools/build/install_cloud_sdk.sh +++ b/infra/build/developer-tools/build/install_cloud_sdk.sh @@ -20,7 +20,7 @@ CLOUD_SDK_VERSION=$1 cd /build -wget "https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-${CLOUD_SDK_VERSION}-linux-x86_64.tar.gz" +wget -nv "https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-${CLOUD_SDK_VERSION}-linux-x86_64.tar.gz" tar -C /usr/local -xzf "google-cloud-sdk-${CLOUD_SDK_VERSION}-linux-x86_64.tar.gz" rm "google-cloud-sdk-${CLOUD_SDK_VERSION}-linux-x86_64.tar.gz" diff --git a/infra/build/developer-tools/build/install_gsuite_terraform_provider.sh b/infra/build/developer-tools/build/install_gsuite_terraform_provider.sh index c841cd51755..18e66f15cb5 100755 --- a/infra/build/developer-tools/build/install_gsuite_terraform_provider.sh +++ b/infra/build/developer-tools/build/install_gsuite_terraform_provider.sh @@ -16,12 +16,14 @@ set -e set -u -GSUITE_PROVIDER_VERSION=$1 +mkdir -p /build/install_gsuite_terraform_provider +cd /build/install_gsuite_terraform_provider -cd /build +GSUITE_PROVIDER_VERSION=$1 -wget "https://github.com/DeviaVir/terraform-provider-gsuite/releases/download/v${GSUITE_PROVIDER_VERSION}/terraform-provider-gsuite_${GSUITE_PROVIDER_VERSION}_linux_amd64.tgz" -tar xzf "terraform-provider-gsuite_${GSUITE_PROVIDER_VERSION}_linux_amd64.tgz" -rm "terraform-provider-gsuite_${GSUITE_PROVIDER_VERSION}_linux_amd64.tgz" +wget -nv "https://github.com/DeviaVir/terraform-provider-gsuite/releases/download/v${GSUITE_PROVIDER_VERSION}/terraform-provider-gsuite_${GSUITE_PROVIDER_VERSION}_linux_amd64.tgz" +tar -xzf "terraform-provider-gsuite_${GSUITE_PROVIDER_VERSION}_linux_amd64.tgz" install -o 0 -g 0 -m 0755 -d ~/.terraform.d/plugins/ install -o 0 -g 0 -m 0755 "terraform-provider-gsuite_v${GSUITE_PROVIDER_VERSION}" ~/.terraform.d/plugins/ + +rm -rf /build/install_gsuite_terraform_provider diff --git a/infra/build/developer-tools/build/install_hadolint.sh b/infra/build/developer-tools/build/install_hadolint.sh index f32c21cd87f..4d570face90 100755 --- a/infra/build/developer-tools/build/install_hadolint.sh +++ b/infra/build/developer-tools/build/install_hadolint.sh @@ -16,7 +16,10 @@ set -e set -u -cd /build +mkdir -p /build/install_hadolint +cd /build/install_hadolint -wget https://github.com/hadolint/hadolint/releases/download/v1.15.0/hadolint-Linux-x86_64 +wget -nv "https://github.com/hadolint/hadolint/releases/download/v1.15.0/hadolint-Linux-x86_64" install -o 0 -g 0 -m 0755 hadolint-Linux-x86_64 /usr/local/bin/hadolint + +rm -rf /build/install_hadolint diff --git a/infra/build/developer-tools/build/install_kpt.sh b/infra/build/developer-tools/build/install_kpt.sh index 6a3a2747e1a..8852514e45b 100755 --- a/infra/build/developer-tools/build/install_kpt.sh +++ b/infra/build/developer-tools/build/install_kpt.sh @@ -16,11 +16,13 @@ set -e set -u -KPT_VERSION=$1 +mkdir -p /build/install_kpt +cd /build/install_kpt -cd /build +KPT_VERSION=$1 -wget "https://github.com/GoogleContainerTools/kpt/releases/download/v${KPT_VERSION}/kpt_linux_amd64-${KPT_VERSION}.tar.gz" -tar xzf "kpt_linux_amd64-${KPT_VERSION}.tar.gz" -rm "kpt_linux_amd64-${KPT_VERSION}.tar.gz" +wget -nv "https://github.com/GoogleContainerTools/kpt/releases/download/v${KPT_VERSION}/kpt_linux_amd64-${KPT_VERSION}.tar.gz" +tar -xzf "kpt_linux_amd64-${KPT_VERSION}.tar.gz" install -o 0 -g 0 -m 0755 kpt /usr/local/bin/ + +rm -rf /build/install_kpt diff --git a/infra/build/developer-tools/build/install_kubectl.sh b/infra/build/developer-tools/build/install_kubectl.sh index 3fee9bc7aee..6ef0fc016a6 100755 --- a/infra/build/developer-tools/build/install_kubectl.sh +++ b/infra/build/developer-tools/build/install_kubectl.sh @@ -16,9 +16,12 @@ set -e set -u -cd /build +mkdir -p /build/install_kubectl +cd /build/install_kubectl KUBECTL_VERSION=$1 -wget https://storage.googleapis.com/kubernetes-release/release/v${KUBECTL_VERSION}/bin/linux/amd64/kubectl +wget -nv "https://storage.googleapis.com/kubernetes-release/release/v${KUBECTL_VERSION}/bin/linux/amd64/kubectl" install -o 0 -g 0 -m 0755 kubectl /usr/local/bin/kubectl + +rm -rf /build/install_kubectl diff --git a/infra/build/developer-tools/build/install_kustomize.sh b/infra/build/developer-tools/build/install_kustomize.sh index 42cb4af3f14..917e95c74e7 100755 --- a/infra/build/developer-tools/build/install_kustomize.sh +++ b/infra/build/developer-tools/build/install_kustomize.sh @@ -16,10 +16,13 @@ set -e set -u -cd /build +mkdir -p /build/install_kustomize +cd /build/install_kustomize KUSTOMIZE_VERSION=$1 -wget -q https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize/v${KUSTOMIZE_VERSION}/kustomize_v${KUSTOMIZE_VERSION}_linux_amd64.tar.gz -tar xzf ./kustomize_v${KUSTOMIZE_VERSION}_linux_amd64.tar.gz +wget -nv https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize/v${KUSTOMIZE_VERSION}/kustomize_v${KUSTOMIZE_VERSION}_linux_amd64.tar.gz +tar -xzf kustomize_v${KUSTOMIZE_VERSION}_linux_amd64.tar.gz install -o 0 -g 0 -m 0755 kustomize /usr/local/bin/kustomize + +rm -rf /build/install_kustomize diff --git a/infra/build/developer-tools/build/install_protoc.sh b/infra/build/developer-tools/build/install_protoc.sh index d79d96fd285..1dff967feb1 100755 --- a/infra/build/developer-tools/build/install_protoc.sh +++ b/infra/build/developer-tools/build/install_protoc.sh @@ -21,11 +21,11 @@ PROTOC_GEN_GO_VERSION=$2 PROTOC_GEN_GO_GRPC_VERSION=$3 PROTOC_GEN_GO_INJECT_TAG=$4 -cd /build +mkdir -p /build/install_protoc +cd /build/install_protoc curl -LO "https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-linux-x86_64.zip" -unzip "protoc-${PROTOC_VERSION}-linux-x86_64.zip" -d $HOME/.local -rm "protoc-${PROTOC_VERSION}-linux-x86_64.zip" +unzip -q "protoc-${PROTOC_VERSION}-linux-x86_64.zip" -d $HOME/.local chmod 755 $HOME/.local/bin/protoc cp $HOME/.local/bin/protoc /usr/local/bin/ cp -R $HOME/.local/include/ /usr/local/include/ @@ -33,3 +33,5 @@ cp -R $HOME/.local/include/ /usr/local/include/ go install google.golang.org/protobuf/cmd/protoc-gen-go@v${PROTOC_GEN_GO_VERSION} go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v${PROTOC_GEN_GO_GRPC_VERSION} go install github.com/favadi/protoc-go-inject-tag@v${PROTOC_GEN_GO_INJECT_TAG} + +rm -rf /build/install_protoc diff --git a/infra/build/developer-tools/build/install_shellcheck.sh b/infra/build/developer-tools/build/install_shellcheck.sh index 48b7db20a84..f3ecae8e31d 100755 --- a/infra/build/developer-tools/build/install_shellcheck.sh +++ b/infra/build/developer-tools/build/install_shellcheck.sh @@ -16,9 +16,11 @@ set -e set -u -cd /build +mkdir -p /build/install_shellcheck +cd /build/install_shellcheck -wget https://github.com/koalaman/shellcheck/releases/download/v0.6.0/shellcheck-v0.6.0.linux.x86_64.tar.xz +wget -nv "https://github.com/koalaman/shellcheck/releases/download/v0.6.0/shellcheck-v0.6.0.linux.x86_64.tar.xz" tar -xf shellcheck-v0.6.0.linux.x86_64.tar.xz install -o 0 -g 0 -m 0755 shellcheck-v0.6.0/shellcheck /usr/local/bin/shellcheck -rm -rf shellcheck-v0.6.0 shellcheck-v0.6.0.linux.x86_64.tar.xz + +rm -rf /build/install_shellcheck diff --git a/infra/build/developer-tools/build/install_terraform.sh b/infra/build/developer-tools/build/install_terraform.sh index aa45508013f..ebacc2e89bb 100755 --- a/infra/build/developer-tools/build/install_terraform.sh +++ b/infra/build/developer-tools/build/install_terraform.sh @@ -16,10 +16,13 @@ set -e set -u -cd /build +mkdir -p /build/install_terraform +cd /build/install_terraform TERRAFORM_VERSION=$1 -wget -q https://releases.hashicorp.com/terraform/${TERRAFORM_VERSION}/terraform_${TERRAFORM_VERSION}_linux_amd64.zip -unzip ./terraform_${TERRAFORM_VERSION}_linux_amd64.zip +wget -nv "https://releases.hashicorp.com/terraform/${TERRAFORM_VERSION}/terraform_${TERRAFORM_VERSION}_linux_amd64.zip" +unzip -q terraform_${TERRAFORM_VERSION}_linux_amd64.zip install -o 0 -g 0 -m 0755 terraform /usr/local/bin/terraform + +rm -rf /build/install_terraform diff --git a/infra/build/developer-tools/build/install_terraform_docs.sh b/infra/build/developer-tools/build/install_terraform_docs.sh index 9c9c6f2c8b7..c4b84c9edfe 100755 --- a/infra/build/developer-tools/build/install_terraform_docs.sh +++ b/infra/build/developer-tools/build/install_terraform_docs.sh @@ -16,10 +16,13 @@ set -e set -u -cd /build +mkdir -p /build/install_terraform_docs +cd /build/install_terraform_docs TERRAFORM_DOCS_VERSION=$1 -wget -q "https://github.com/segmentio/terraform-docs/releases/download/v${TERRAFORM_DOCS_VERSION}/terraform-docs-v${TERRAFORM_DOCS_VERSION}-linux-amd64.tar.gz" -tar xzf ./terraform-docs-v${TERRAFORM_DOCS_VERSION}-linux-amd64.tar.gz +wget -nv "https://github.com/segmentio/terraform-docs/releases/download/v${TERRAFORM_DOCS_VERSION}/terraform-docs-v${TERRAFORM_DOCS_VERSION}-linux-amd64.tar.gz" +tar -xzf terraform-docs-v${TERRAFORM_DOCS_VERSION}-linux-amd64.tar.gz install -o 0 -g 0 -m 0755 "terraform-docs" /usr/local/bin/terraform-docs + +rm -rf /build/install_terraform_docs diff --git a/infra/build/developer-tools/build/install_terragrunt.sh b/infra/build/developer-tools/build/install_terragrunt.sh index 54d3520eb00..435ca0315e8 100755 --- a/infra/build/developer-tools/build/install_terragrunt.sh +++ b/infra/build/developer-tools/build/install_terragrunt.sh @@ -16,9 +16,12 @@ set -e set -u -cd /build +mkdir -p /build/install_terragrunt +cd /build/install_terragrunt TERRAGRUNT_VERSION=$1 -wget -q https://github.com/gruntwork-io/terragrunt/releases/download/v${TERRAGRUNT_VERSION}/terragrunt_linux_amd64 +wget -nv "https://github.com/gruntwork-io/terragrunt/releases/download/v${TERRAGRUNT_VERSION}/terragrunt_linux_amd64" install -o 0 -g 0 -m 0755 terragrunt_linux_amd64 /usr/local/bin/terragrunt + +rm -rf /build/install_terragrunt diff --git a/infra/build/developer-tools/build/install_tflint.sh b/infra/build/developer-tools/build/install_tflint.sh index d6efa0e8af0..7562310a988 100755 --- a/infra/build/developer-tools/build/install_tflint.sh +++ b/infra/build/developer-tools/build/install_tflint.sh @@ -16,10 +16,13 @@ set -e set -u -TF_LINT_VERSION=$1 +mkdir -p /build/install_tflint +cd /build/install_tflint -cd /build +TF_LINT_VERSION=$1 -wget "https://github.com/terraform-linters/tflint/releases/download/v${TF_LINT_VERSION}/tflint_linux_amd64.zip" -unzip tflint_linux_amd64.zip +wget -nv "https://github.com/terraform-linters/tflint/releases/download/v${TF_LINT_VERSION}/tflint_linux_amd64.zip" +unzip -q tflint_linux_amd64.zip install -o 0 -g 0 -m 0755 tflint /usr/local/bin/tflint + +rm -rf /build/install_tflint diff --git a/infra/build/developer-tools/build/install_tinkey.sh b/infra/build/developer-tools/build/install_tinkey.sh index fc5ddccf5fc..47fd5bb3c2a 100755 --- a/infra/build/developer-tools/build/install_tinkey.sh +++ b/infra/build/developer-tools/build/install_tinkey.sh @@ -16,16 +16,15 @@ set -e set -u -cd /build +mkdir -p /build/install_tinkey +cd /build/install_tinkey TINKEY_VERSION=$1 -mkdir ./tinkey +gsutil cp "gs://tinkey/tinkey-${TINKEY_VERSION}.tar.gz" . +tar -xzf "tinkey-${TINKEY_VERSION}.tar.gz" -gsutil cp "gs://tinkey/tinkey-${TINKEY_VERSION}.tar.gz" ./tinkey -tar -xzvf "./tinkey/tinkey-${TINKEY_VERSION}.tar.gz" -C ./tinkey +install -o 0 -g 0 -m 0755 tinkey_deploy.jar /usr/bin/ +install -o 0 -g 0 -m 0755 tinkey /usr/bin/ -install -o 0 -g 0 -m 0755 ./tinkey/tinkey_deploy.jar /usr/bin/ -install -o 0 -g 0 -m 0755 ./tinkey/tinkey /usr/bin/ - -rm -rf ./tinkey +rm -rf /build/install_tinkey