diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 46c7333316..6ae40730bf 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -23,7 +23,7 @@ jobs: uses: actions/checkout@v2 - name: Lint - run: ./travis/kyaml-pre-commit.sh + run: ./scripts/kyaml-pre-commit.sh env: KUSTOMIZE_DOCKER_E2E: false # don't need to do e2e tests for linting diff --git a/Makefile b/Makefile index cf299c7bc4..eb4c64d856 100644 --- a/Makefile +++ b/Makefile @@ -221,10 +221,10 @@ test-unit-kustomize-all: \ test-unit-kustomize-plugins test-unit-cmd-all: - ./travis/kyaml-pre-commit.sh + ./scripts/kyaml-pre-commit.sh test-go-mod: - ./travis/check-go-mod.sh + ./scripts/check-go-mod.sh .PHONY: test-examples-e2e-kustomize: $(MYGOBIN)/mdrip $(MYGOBIN)/kind diff --git a/api/internal/plugins/doc.go b/api/internal/plugins/doc.go index 83e428352d..74d8ae3787 100644 --- a/api/internal/plugins/doc.go +++ b/api/internal/plugins/doc.go @@ -94,7 +94,7 @@ TO GENERATE CODE cd $repo/plugin/builtin go generate ./... -See travis/kyaml-pre-commit.sh for canonical way +See scripts/kyaml-pre-commit.sh for canonical way to execute the above. This creates diff --git a/docs/contributing/windows/index.html b/docs/contributing/windows/index.html index dfd340618c..c786c4635d 100644 --- a/docs/contributing/windows/index.html +++ b/docs/contributing/windows/index.html @@ -514,7 +514,7 @@

Step 2 - Install Go Packages

  • Navigate to the Kustomize travis directory
  • Now Execute: diff --git a/docs/zh/contributing/windows/index.html b/docs/zh/contributing/windows/index.html index 4545a364c7..28a22f5d27 100644 --- a/docs/zh/contributing/windows/index.html +++ b/docs/zh/contributing/windows/index.html @@ -514,7 +514,7 @@

    Step 2 - Install Go Packages

  • Navigate to the Kustomize travis directory
  • Now Execute: diff --git a/examples/README.md b/examples/README.md index d1c1dd1d7a..2819d5408b 100644 --- a/examples/README.md +++ b/examples/README.md @@ -5,7 +5,7 @@ English | [简体中文](zh/README.md) To run these examples, your `$PATH` must contain `kustomize`. See the [installation instructions](../docs/INSTALL.md). -These examples are [tested](../travis/kyaml-pre-commit.sh) +These examples are [tested](../scripts/kyaml-pre-commit.sh) to work with the latest _released_ version of kustomize. Basic Usage diff --git a/examples/zh/README.md b/examples/zh/README.md index 1673e15984..b4a69360a5 100644 --- a/examples/zh/README.md +++ b/examples/zh/README.md @@ -4,7 +4,7 @@ 这些示例默认 `kustomize` 在您的 `$PATH` 中。 -这些示例通过了 [pre-commit](../../travis/kyaml-pre-commit.sh) 测试,并且应该与 HEAD 一起使用。 +这些示例通过了 [pre-commit](../../scripts/kyaml-pre-commit.sh) 测试,并且应该与 HEAD 一起使用。 ``` go get sigs.k8s.io/kustomize/v3/cmd/kustomize diff --git a/travis/Invoke-PreCommit.ps1 b/scripts/Invoke-PreCommit.ps1 similarity index 100% rename from travis/Invoke-PreCommit.ps1 rename to scripts/Invoke-PreCommit.ps1 diff --git a/travis/check-go-mod.sh b/scripts/check-go-mod.sh similarity index 100% rename from travis/check-go-mod.sh rename to scripts/check-go-mod.sh diff --git a/travis/kyaml-pre-commit.sh b/scripts/kyaml-pre-commit.sh similarity index 100% rename from travis/kyaml-pre-commit.sh rename to scripts/kyaml-pre-commit.sh diff --git a/site/content/en/contributing/windows/_index.md b/site/content/en/contributing/windows/_index.md index 4430b4273a..a0ec49a134 100644 --- a/site/content/en/contributing/windows/_index.md +++ b/site/content/en/contributing/windows/_index.md @@ -59,7 +59,7 @@ Usage: C:\_go\bin\mdrip.exe {fileName}... - In your GoRoot src - ```Example: C:\_go\src``` - Navigate to the Kustomize `travis` directory - - ```Example: C:\_go\src\sigs.k8s.io\kustomize\travis``` + - ```Example: C:\_go\src\sigs.k8s.io\kustomize\scripts``` - Now Execute: - ```.\Invoke-PreCommit.ps1``` diff --git a/site/content/zh/contributing/windows/_index.md b/site/content/zh/contributing/windows/_index.md index 4430b4273a..a0ec49a134 100644 --- a/site/content/zh/contributing/windows/_index.md +++ b/site/content/zh/contributing/windows/_index.md @@ -59,7 +59,7 @@ Usage: C:\_go\bin\mdrip.exe {fileName}... - In your GoRoot src - ```Example: C:\_go\src``` - Navigate to the Kustomize `travis` directory - - ```Example: C:\_go\src\sigs.k8s.io\kustomize\travis``` + - ```Example: C:\_go\src\sigs.k8s.io\kustomize\scripts``` - Now Execute: - ```.\Invoke-PreCommit.ps1``` diff --git a/travis/consider-early-travis-exit.sh b/travis/consider-early-travis-exit.sh deleted file mode 100644 index b979c8eea4..0000000000 --- a/travis/consider-early-travis-exit.sh +++ /dev/null @@ -1,40 +0,0 @@ -# Copyright 2019 The Kubernetes Authors. -# SPDX-License-Identifier: Apache-2.0 - -# Exits with status 0 if it can be determined that the -# current PR should not trigger all travis checks. -# -# This could be done with a "git ...|grep -vqE" oneliner -# but as travis triggering is refined it's useful to check -# travis logs to see how branch files were considered. -function consider-early-travis-exit { - if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then - echo "Unknown pull request." - return - fi - # Might use this to improve checks on multi-commit PRs. - echo "TRAVIS_COMMIT_RANGE=$TRAVIS_COMMIT_RANGE" - echo "Branch Files ('T'==trigger tests, ' '=ignore):" - echo "---" - local triggers=0 - local invisibles=0 - for fn in $(git diff --name-only HEAD origin/master); do - if [[ "$fn" =~ (\.md$)|(^docs/) ]]; then - echo " $fn" - let invisibles+=1 - else - echo " T $fn" - let triggers+=1 - fi - done - echo "---" - printf >&2 "%6d files invisible to travis.\n" $invisibles - printf >&2 "%6d files trigger travis.\n" $triggers - if [ $triggers -eq 0 ]; then - echo "No files triggered travis test, exiting early." - # see https://github.com/travis-ci/travis-build/blob/master/lib/travis/build/templates/header.sh - travis_terminate 0 - fi -} -consider-early-travis-exit -unset -f consider-early-travis-exit