From 1aabef1e863768c2dd6e5be3cedaa5a7bcc18213 Mon Sep 17 00:00:00 2001 From: cw-sakamoto Date: Tue, 11 Jun 2024 15:47:40 +0900 Subject: [PATCH 1/4] fix actions --- .github/scripts/lint-chart.sh | 33 +++++++++++++++++++++++++++++++++ .github/workflows/lint.yml | 8 +++++--- .github/workflows/publish.yml | 14 ++++++++++---- .github/workflows/test.yml | 10 ++++++---- 4 files changed, 54 insertions(+), 11 deletions(-) create mode 100755 .github/scripts/lint-chart.sh diff --git a/.github/scripts/lint-chart.sh b/.github/scripts/lint-chart.sh new file mode 100755 index 00000000..8f0d5475 --- /dev/null +++ b/.github/scripts/lint-chart.sh @@ -0,0 +1,33 @@ +#!/bin/sh +# Usage: +# lint-chart.sh [dir] +# Description: +# Check that the number of nindents matches the actual indents +# + +err=$(for file in "${1}"/*.yaml; do + i="0" + while IFS= read -r line; do + i="$(expr "${i}" + 1)" + if echo "${line}" | grep nindent >/dev/null; then + indent=$(echo "${line}" | grep -o '^ \+' | awk '{print length($0)}') + args=$(echo "${line}"| grep -o 'nindent [0-9]\+' | grep -o '[0-9]\+') + # Check that the number of nindents matches the actual indents + if [ "${indent}" != "${args}" ]; then + printf "%s on line %d: indent mismatch:\n%s\n" "${file}" "${i}" "${line}" + fi + # nindent should use {{ instead of {{- + if ! (echo "$line" | grep '{{-') > /dev/null; then + printf "%s on line %d: \`{{-\` should be used for nindent:\n%s\n" "${file}" "${i}" "${line}" + fi + fi + done < "${file}" +done) + + +if [ -n "${err}" ]; then + echo "${err}" 1>&2 + exit 255 +else + echo "PASS ${1}" +fi diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index c865cf52..546d2bc5 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -2,8 +2,8 @@ name: Lint Helm Chart on: push: - branches: - - "!gh-pages" + branches-ignore: + - "gh-pages" permissions: contents: read @@ -14,6 +14,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 + with: + fetch-depth: 0 - name: Setup Helm run: make ci:enable:helm @@ -28,4 +30,4 @@ jobs: run: make ci:diff:chart | xargs -I{} /bin/bash -c "cd ./{} && ../.github/scripts/check-version.sh || exit 255" - name: Check lint - run: make ci:diff | xargs -I{} /bin/bash -c "cd ./{} && make lint || exit 255" \ No newline at end of file + run: make ci:diff | xargs -I{} /bin/bash -c "cd ./{} && make lint || exit 255" diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index d692adb6..92bad11d 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -14,13 +14,15 @@ permissions: jobs: publish: runs-on: ubuntu-latest - env: + env: DOCKER_REGISTRY_USERNAME: ${{ secrets.DOCKER_REGISTRY_USERNAME }} DOCKER_REGISTRY_PASSWORD: ${{ secrets.DOCKER_REGISTRY_PASSWORD }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} steps: - name: Checkout uses: actions/checkout@v4 + with: + fetch-depth: 0 - name: Setup Helm run: make ci:enable:helm @@ -40,7 +42,11 @@ jobs: - name: Commit and push working-directory: .dist run: | - git add . + # https://github.com/orgs/community/discussions/26560 + git config user.email "41898282+github-actions[bot]@users.noreply.github.com" + git config user.name "github-actions[bot]" + + git add . git commit --allow-empty-message -m "$GITHUB_SHA" git push origin gh-pages @@ -59,7 +65,7 @@ jobs: make ci:notify -e TITLE="Release chatwork/charts {}:${version} (gogo)" \ -e BODY="$(echo -e "changelog\n${changelog}")"; ' - + - name: Notification failed if: failure() run: | @@ -68,4 +74,4 @@ jobs: make ci:notify -e TITLE="CircleCI: Failed push chatwork/charts {}:${version} (devil)" \ -e BODY="$(git log -1 --pretty=format:"%h - %an : %s" ${CIRCLE_BRANCH})"; ' - + diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4014bd69..b0d65a8e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -5,18 +5,20 @@ on: workflows: ["Lint Helm Chart"] types: - completed - branches: - - "!gh-pages" + branches-ignore: + - "gh-pages" permissions: contents: read jobs: - lint: + test: runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4 + with: + fetch-depth: 0 - name: Setup K8s run: make ci:enable:k8s @@ -31,4 +33,4 @@ jobs: run: make ci:diff | xargs -I{} /bin/bash -c "cd ./{} && kubectl create namespace {} --dry-run -o yaml | kubectl apply -f - || exit 255" - name: Test - run: RC=0; for target in `make ci:diff`;do cd ./$target; kubectl config set-context --current --namespace=$target; make install && make test && make uninstall || RC=255; cd ..; done; exit $RC \ No newline at end of file + run: RC=0; for target in `make ci:diff`;do cd ./$target; kubectl config set-context --current --namespace=$target; make install && make test && make uninstall || RC=255; cd ..; done; exit $RC From 99824445a2326dd6981c1b46f1b50b11d77a6a1d Mon Sep 17 00:00:00 2001 From: cw-sakamoto Date: Tue, 11 Jun 2024 15:47:53 +0900 Subject: [PATCH 2/4] fix each Makefile for ci --- akka/Makefile | 2 +- argoproj-crd/Makefile | 2 +- aws-ebs-csi-driver/Makefile | 2 +- aws-secret-operator/Makefile | 2 +- burrow/Makefile | 2 +- docker-registry/Makefile | 2 +- dynamodb/Makefile | 2 +- elasticmq/Makefile | 2 +- elasticsearch/Makefile | 2 +- envoy/Makefile | 4 ++-- example/Makefile | 2 +- fluent-bit/Makefile | 2 +- fluentd/Makefile | 2 +- gcp-credentials/Makefile | 2 +- kube-schedule-scaler/Makefile | 2 +- mailcatcher/Makefile | 2 +- mysql/Makefile | 2 +- newrelic-php-agent/Makefile | 2 +- php/Makefile | 2 +- postfix/Makefile | 2 +- raw/Makefile | 2 +- regcred/Makefile | 2 +- twistlock-console/Makefile | 2 +- twistlock-defender/Makefile | 2 +- 24 files changed, 25 insertions(+), 25 deletions(-) diff --git a/akka/Makefile b/akka/Makefile index ca8edc28..00838c9e 100644 --- a/akka/Makefile +++ b/akka/Makefile @@ -11,7 +11,7 @@ lint: lint-default lint-local-akka-http lint-cluster-discovery-dns lint-cluster- .PHONY: lint-default lint-default: @echo "=> Indent check default values.yaml" - ../.circleci/lint-chart.sh $$PWD/templates + ../.github/scripts/lint-chart.sh $$PWD/templates @echo "=> Linting default values.yaml" helm lint --strict @echo "=> Validating default value.yaml" diff --git a/argoproj-crd/Makefile b/argoproj-crd/Makefile index a4bc20e0..9242b419 100644 --- a/argoproj-crd/Makefile +++ b/argoproj-crd/Makefile @@ -14,7 +14,7 @@ lint: lint-default .PHONY: lint-default lint-default: @echo "=> Indent check default values.yaml" - ../.circleci/lint-chart.sh $$PWD/templates + ../.github/scripts/lint-chart.sh $$PWD/templates @echo "=> Linting default values.yaml" helm lint --strict @echo "" diff --git a/aws-ebs-csi-driver/Makefile b/aws-ebs-csi-driver/Makefile index ddc6111c..d68b08aa 100644 --- a/aws-ebs-csi-driver/Makefile +++ b/aws-ebs-csi-driver/Makefile @@ -12,7 +12,7 @@ lint: lint-default .PHONY: lint-default lint-default: @echo "=> Indent check default values.yaml" - ../.circleci/lint-chart.sh $$PWD/templates + ../.github/scripts/lint-chart.sh $$PWD/templates @echo "=> Linting default values.yaml" helm lint --strict @echo "=> Validating default value.yaml" diff --git a/aws-secret-operator/Makefile b/aws-secret-operator/Makefile index 8d3c697a..6684e1af 100644 --- a/aws-secret-operator/Makefile +++ b/aws-secret-operator/Makefile @@ -11,7 +11,7 @@ lint: lint-default .PHONY: lint-default lint-default: @echo "=> Indent check default values.yaml" - ../.circleci/lint-chart.sh $$PWD/templates + ../.github/scripts/lint-chart.sh $$PWD/templates @echo "=> Linting default values.yaml" helm lint --strict @echo "=> Validating default value.yaml" diff --git a/burrow/Makefile b/burrow/Makefile index cf18eaaf..7c1ef082 100644 --- a/burrow/Makefile +++ b/burrow/Makefile @@ -12,7 +12,7 @@ lint: lint-default .PHONY: lint-default lint-default: @echo "=> Indent check default values.yaml" - ../.circleci/lint-chart.sh $$PWD/templates + ../.github/scripts/lint-chart.sh $$PWD/templates @echo "=> Linting default values.yaml" helm lint --strict @echo "=> Validating default value.yaml" diff --git a/docker-registry/Makefile b/docker-registry/Makefile index db1797dc..d074c90d 100644 --- a/docker-registry/Makefile +++ b/docker-registry/Makefile @@ -12,7 +12,7 @@ lint: lint-default .PHONY: lint-default lint-default: @echo "=> Indent check default values.yaml" - ../.circleci/lint-chart.sh $$PWD/templates + ../.github/scripts/lint-chart.sh $$PWD/templates @echo "=> Linting default values.yaml" helm lint --strict @echo "=> Validating default value.yaml" diff --git a/dynamodb/Makefile b/dynamodb/Makefile index 1f2e8859..e07ee62f 100644 --- a/dynamodb/Makefile +++ b/dynamodb/Makefile @@ -11,7 +11,7 @@ lint: lint-default .PHONY: lint-default lint-default: @echo "=> Indent check default values.yaml" - ../.circleci/lint-chart.sh $$PWD/templates + ../.github/scripts/lint-chart.sh $$PWD/templates @echo "=> Linting default values.yaml" helm lint --strict @echo "=> Validating default value.yaml" diff --git a/elasticmq/Makefile b/elasticmq/Makefile index 1f2e8859..e07ee62f 100644 --- a/elasticmq/Makefile +++ b/elasticmq/Makefile @@ -11,7 +11,7 @@ lint: lint-default .PHONY: lint-default lint-default: @echo "=> Indent check default values.yaml" - ../.circleci/lint-chart.sh $$PWD/templates + ../.github/scripts/lint-chart.sh $$PWD/templates @echo "=> Linting default values.yaml" helm lint --strict @echo "=> Validating default value.yaml" diff --git a/elasticsearch/Makefile b/elasticsearch/Makefile index 2679350d..ca5c50df 100644 --- a/elasticsearch/Makefile +++ b/elasticsearch/Makefile @@ -11,7 +11,7 @@ lint: lint-default .PHONY: lint-default lint-default: @echo "=> Indent check default values.yaml" - ../.circleci/lint-chart.sh $$PWD/templates + ../.github/scripts/lint-chart.sh $$PWD/templates @echo "=> Linting default values.yaml" helm lint --strict @echo "=> Validating default value.yaml" diff --git a/envoy/Makefile b/envoy/Makefile index 6e9d7504..b1548737 100644 --- a/envoy/Makefile +++ b/envoy/Makefile @@ -11,7 +11,7 @@ lint: lint-default lint-xds .PHONY: lint-default lint-default: @echo "=> Indent check default values.yaml" - ../.circleci/lint-chart.sh $$PWD/templates + ../.github/scripts/lint-chart.sh $$PWD/templates @echo "=> Linting default values.yaml" helm lint --strict @echo "=> Validating default value.yaml" @@ -21,7 +21,7 @@ lint-default: .PHONY: lint-xds lint-xds: @echo "=> Indent check default values.yaml" - ../.circleci/lint-chart.sh $$PWD/templates + ../.github/scripts/lint-chart.sh $$PWD/templates @echo "=> Linting default values.yaml" helm lint -f example/xds.yaml --strict @echo "=> Validating default value.yaml" diff --git a/example/Makefile b/example/Makefile index 1f2e8859..e07ee62f 100644 --- a/example/Makefile +++ b/example/Makefile @@ -11,7 +11,7 @@ lint: lint-default .PHONY: lint-default lint-default: @echo "=> Indent check default values.yaml" - ../.circleci/lint-chart.sh $$PWD/templates + ../.github/scripts/lint-chart.sh $$PWD/templates @echo "=> Linting default values.yaml" helm lint --strict @echo "=> Validating default value.yaml" diff --git a/fluent-bit/Makefile b/fluent-bit/Makefile index 2679350d..ca5c50df 100644 --- a/fluent-bit/Makefile +++ b/fluent-bit/Makefile @@ -11,7 +11,7 @@ lint: lint-default .PHONY: lint-default lint-default: @echo "=> Indent check default values.yaml" - ../.circleci/lint-chart.sh $$PWD/templates + ../.github/scripts/lint-chart.sh $$PWD/templates @echo "=> Linting default values.yaml" helm lint --strict @echo "=> Validating default value.yaml" diff --git a/fluentd/Makefile b/fluentd/Makefile index 3d360b3e..f66d98e7 100644 --- a/fluentd/Makefile +++ b/fluentd/Makefile @@ -11,7 +11,7 @@ lint: lint-daemonset lint-statefulset lint-use-udp lint-use-udp .PHONY: lint-default lint-default: @echo "=> Indent check default values.yaml" - ../.circleci/lint-chart.sh $$PWD/templates + ../.github/scripts/lint-chart.sh $$PWD/templates @echo "=> Linting default values.yaml" helm lint --strict @echo "=> Validating default value.yaml" diff --git a/gcp-credentials/Makefile b/gcp-credentials/Makefile index 8d3c697a..6684e1af 100644 --- a/gcp-credentials/Makefile +++ b/gcp-credentials/Makefile @@ -11,7 +11,7 @@ lint: lint-default .PHONY: lint-default lint-default: @echo "=> Indent check default values.yaml" - ../.circleci/lint-chart.sh $$PWD/templates + ../.github/scripts/lint-chart.sh $$PWD/templates @echo "=> Linting default values.yaml" helm lint --strict @echo "=> Validating default value.yaml" diff --git a/kube-schedule-scaler/Makefile b/kube-schedule-scaler/Makefile index 8d3c697a..6684e1af 100644 --- a/kube-schedule-scaler/Makefile +++ b/kube-schedule-scaler/Makefile @@ -11,7 +11,7 @@ lint: lint-default .PHONY: lint-default lint-default: @echo "=> Indent check default values.yaml" - ../.circleci/lint-chart.sh $$PWD/templates + ../.github/scripts/lint-chart.sh $$PWD/templates @echo "=> Linting default values.yaml" helm lint --strict @echo "=> Validating default value.yaml" diff --git a/mailcatcher/Makefile b/mailcatcher/Makefile index 6c6e7ea1..a418bca3 100644 --- a/mailcatcher/Makefile +++ b/mailcatcher/Makefile @@ -11,7 +11,7 @@ lint: lint-default .PHONY: lint-default lint-default: @echo "=> Indent check default values.yaml" - ../.circleci/lint-chart.sh $$PWD/templates + ../.github/scripts/lint-chart.sh $$PWD/templates @echo "=> Linting default values.yaml" helm lint --strict @echo "=> Validating default value.yaml" diff --git a/mysql/Makefile b/mysql/Makefile index fbf95988..7cdcf835 100644 --- a/mysql/Makefile +++ b/mysql/Makefile @@ -11,7 +11,7 @@ lint: lint-default .PHONY: lint-default lint-default: @echo "=> Indent check default values.yaml" - ../.circleci/lint-chart.sh $$PWD/templates + ../.github/scripts/lint-chart.sh $$PWD/templates @echo "=> Linting default values.yaml" helm lint --strict @echo "=> Validating default value.yaml" diff --git a/newrelic-php-agent/Makefile b/newrelic-php-agent/Makefile index 1f2e8859..e07ee62f 100644 --- a/newrelic-php-agent/Makefile +++ b/newrelic-php-agent/Makefile @@ -11,7 +11,7 @@ lint: lint-default .PHONY: lint-default lint-default: @echo "=> Indent check default values.yaml" - ../.circleci/lint-chart.sh $$PWD/templates + ../.github/scripts/lint-chart.sh $$PWD/templates @echo "=> Linting default values.yaml" helm lint --strict @echo "=> Validating default value.yaml" diff --git a/php/Makefile b/php/Makefile index a8db6d98..b798a942 100644 --- a/php/Makefile +++ b/php/Makefile @@ -11,7 +11,7 @@ lint: lint-default .PHONY: lint-default lint-default: @echo "=> Indent check default values.yaml" - ../.circleci/lint-chart.sh $$PWD/templates + ../.github/scripts/lint-chart.sh $$PWD/templates @echo "=> Linting default values.yaml" helm lint --strict @echo "=> Validating default value.yaml" diff --git a/postfix/Makefile b/postfix/Makefile index 33f3b2f4..620a9ee6 100644 --- a/postfix/Makefile +++ b/postfix/Makefile @@ -14,7 +14,7 @@ lint: lint-daemonset lint-daemonset-mailcatcher lint-deployment lint-deployment- .PHONY: lint-daemonset lint-daemonset: @echo "=> Indent check default values.yaml" - ../.circleci/lint-chart.sh $$PWD/templates + ../.github/scripts/lint-chart.sh $$PWD/templates @echo "=> Linting default values.yaml" helm lint --strict @echo "=> Validating default value.yaml" diff --git a/raw/Makefile b/raw/Makefile index b7f91bee..c27f183d 100644 --- a/raw/Makefile +++ b/raw/Makefile @@ -11,7 +11,7 @@ lint: lint-default .PHONY: lint-default lint-default: @echo "=> Indent check default values.yaml" - ../.circleci/lint-chart.sh $$PWD/templates + ../.github/scripts/lint-chart.sh $$PWD/templates @echo "=> Linting default values.yaml" helm lint --strict @echo "=> Validating default value.yaml" diff --git a/regcred/Makefile b/regcred/Makefile index 8d3c697a..6684e1af 100644 --- a/regcred/Makefile +++ b/regcred/Makefile @@ -11,7 +11,7 @@ lint: lint-default .PHONY: lint-default lint-default: @echo "=> Indent check default values.yaml" - ../.circleci/lint-chart.sh $$PWD/templates + ../.github/scripts/lint-chart.sh $$PWD/templates @echo "=> Linting default values.yaml" helm lint --strict @echo "=> Validating default value.yaml" diff --git a/twistlock-console/Makefile b/twistlock-console/Makefile index fd2d541d..76fc006d 100644 --- a/twistlock-console/Makefile +++ b/twistlock-console/Makefile @@ -11,7 +11,7 @@ lint: lint-default .PHONY: lint-default lint-default: @echo "=> Indent check default values.yaml" - ../.circleci/lint-chart.sh $$PWD/templates + ../.github/scripts/lint-chart.sh $$PWD/templates @echo "=> Linting default values.yaml" helm lint --strict @echo "=> Validating default value.yaml" diff --git a/twistlock-defender/Makefile b/twistlock-defender/Makefile index fd2d541d..76fc006d 100644 --- a/twistlock-defender/Makefile +++ b/twistlock-defender/Makefile @@ -11,7 +11,7 @@ lint: lint-default .PHONY: lint-default lint-default: @echo "=> Indent check default values.yaml" - ../.circleci/lint-chart.sh $$PWD/templates + ../.github/scripts/lint-chart.sh $$PWD/templates @echo "=> Linting default values.yaml" helm lint --strict @echo "=> Validating default value.yaml" From 44edc503a6fb1d66076936802571c9a3b27b9d41 Mon Sep 17 00:00:00 2001 From: cw-sakamoto Date: Wed, 12 Jun 2024 09:41:30 +0900 Subject: [PATCH 3/4] fix Makefile --- Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 86f506c6..3b16f2b9 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ KIND_VERSION = 0.20.0 KUBERNETES_VERSION = 1.28.0 KIND_NODE_HASH = b7a4cad12c197af3ba43202d3efe03246b3f0793f162afb40a33c923952d5b31 HELM_VERSION = 3.13.2 -KUBEVAL_VERSION = 0.15.0 +KUBEVAL_VERSION = 0.16.1 .PHONY: apply apply: @@ -45,7 +45,8 @@ ci\:enable\:helm: ci\:enable\:kubeval: @mkdir -p .bin/ @if [ ! -f "./.bin/kubeval" ]; then \ - curl -sSL https://github.com/instrumenta/kubeval/releases/download/$(KUBEVAL_VERSION)/kubeval-linux-amd64.tar.gz | tar zxvf - -O linux-amd64/kubeval > ./.bin/kubeval; \ + curl -sSL https://github.com/instrumenta/kubeval/releases/download/v${KUBEVAL_VERSION}/kubeval-linux-amd64.tar.gz | tar zxvf -C /tmp/ + mv /tmp/kubeval ./.bin/kubeval chmod +x ./.bin/kubeval; \ fi @sudo mv ./.bin/kubeval /usr/local/bin/kubeval; From 455eef095bb330e4a47a03660ba9a480147dc288 Mon Sep 17 00:00:00 2001 From: cw-sakamoto Date: Wed, 12 Jun 2024 12:16:54 +0900 Subject: [PATCH 4/4] fix actions and Makefile --- .github/workflows/lint.yml | 5 +++++ .github/workflows/publish.yml | 13 ++++++++++--- .github/workflows/test.yml | 8 +++++++- Makefile | 7 ++++--- 4 files changed, 26 insertions(+), 7 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 546d2bc5..516f294a 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -12,6 +12,11 @@ jobs: lint: runs-on: ubuntu-latest steps: + - name: Dump GitHub context + id: github_context_step + continue-on-error: true + run: echo '${{ toJSON(github) }}' + - name: Checkout uses: actions/checkout@v4 with: diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 92bad11d..5470ca19 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -2,11 +2,10 @@ name: Publish Helm Chart on: workflow_run: - workflows: ["Test Helm Chart"] + workflows: + - "Test Helm Chart" types: - completed - branches: - - "master" permissions: contents: write @@ -14,11 +13,19 @@ permissions: jobs: publish: runs-on: ubuntu-latest + if: | + ${{ github.event.workflow_run.conclusion == 'success' }} && + ${{ github.ref_name == 'master' }} env: DOCKER_REGISTRY_USERNAME: ${{ secrets.DOCKER_REGISTRY_USERNAME }} DOCKER_REGISTRY_PASSWORD: ${{ secrets.DOCKER_REGISTRY_PASSWORD }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} steps: + - name: Dump GitHub context + id: github_context_step + continue-on-error: true + run: echo '${{ toJSON(github) }}' + - name: Checkout uses: actions/checkout@v4 with: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b0d65a8e..b4aef21b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -2,7 +2,8 @@ name: Test Helm Chart on: workflow_run: - workflows: ["Lint Helm Chart"] + workflows: + - "Lint Helm Chart" types: - completed branches-ignore: @@ -15,6 +16,11 @@ jobs: test: runs-on: ubuntu-latest steps: + - name: Dump GitHub context + id: github_context_step + continue-on-error: true + run: echo '${{ toJSON(github) }}' + - name: Checkout uses: actions/checkout@v4 with: diff --git a/Makefile b/Makefile index 3b16f2b9..e8a76f7e 100644 --- a/Makefile +++ b/Makefile @@ -44,10 +44,11 @@ ci\:enable\:helm: .PHONY: ci\:enable\:kubeval ci\:enable\:kubeval: @mkdir -p .bin/ + @mkdir -p /tmp/kubeval @if [ ! -f "./.bin/kubeval" ]; then \ - curl -sSL https://github.com/instrumenta/kubeval/releases/download/v${KUBEVAL_VERSION}/kubeval-linux-amd64.tar.gz | tar zxvf -C /tmp/ - mv /tmp/kubeval ./.bin/kubeval - chmod +x ./.bin/kubeval; \ + curl -sSL https://github.com/instrumenta/kubeval/releases/download/v${KUBEVAL_VERSION}/kubeval-linux-amd64.tar.gz | tar zxv -C /tmp/kubeval; \ + ls -l /tmp/kubeval/ && mv /tmp/kubeval/kubeval ./.bin/kubeval; \ + chmod +x ./.bin/kubeval; \ fi @sudo mv ./.bin/kubeval /usr/local/bin/kubeval;