From cafbeeec7a433bee4c20f35bd058ac938d1f3061 Mon Sep 17 00:00:00 2001 From: Kurnianto Trilaksono Date: Sun, 7 Jan 2024 00:33:57 +0800 Subject: [PATCH 01/21] add github workflow --- .github/workflows/release-api.yml | 88 +++++++++++++++++++++++ .github/workflows/release-cmd-config.yml | 86 +++++++++++++++++++++++ .github/workflows/release-kustomize.yml | 89 ++++++++++++++++++++++++ .github/workflows/release-kyaml.yml | 85 ++++++++++++++++++++++ 4 files changed, 348 insertions(+) create mode 100644 .github/workflows/release-api.yml create mode 100644 .github/workflows/release-cmd-config.yml create mode 100644 .github/workflows/release-kustomize.yml create mode 100644 .github/workflows/release-kyaml.yml diff --git a/.github/workflows/release-api.yml b/.github/workflows/release-api.yml new file mode 100644 index 0000000000..3b327d3ea0 --- /dev/null +++ b/.github/workflows/release-api.yml @@ -0,0 +1,88 @@ +name: release-api + +on: + workflow_dispatch: + inputs: + release_type: + type: choice + description: release type (major, minor, or patch). + options: + - major + - minor + - patch + required: true + release_branch: + type: string + description: release branch name "release-api-v*" + required: true + +jobs: + pre-build: + name: Pre-build + runs-on: ubuntu-latest + steps: + - name: Checkout to release branch + uses: actions/checkout@v4 + with: + fetch-depth: 0 + ref: ${{ inputs.release_branch }} + - name: Unit test + id: unit_test + run: | + echo "Executing unit test" + make test-unit-all >> "${GITHUB_OUTPUT}" + - name: Notify build result + uses: ShaunLWM/action-join@master + env: + JOIN_API_KEY: ${{ secrets.JOIN_API_KEY }} + JOIN_DEVICE_ID: ${{ secrets.JOIN_DEVICE_ID }} + JOIN_TEXT: Your project has been built. + JOIN_TITLE: Build Complete + build: + name: Build + runs-on: ubuntu-latest + steps: + - name: Pin kyaml, cmd/config + run: | + gorepomod pin kyaml --doIt + gorepomod pin cmd/config --doIt + - name: Build api + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Notify build result + uses: ShaunLWM/action-join@master + env: + JOIN_API_KEY: ${{ secrets.JOIN_API_KEY }} + JOIN_DEVICE_ID: ${{ secrets.JOIN_DEVICE_ID }} + JOIN_TEXT: Your project has been built. + JOIN_TITLE: Build Complete + e2e-test: + name: End-to-end Testing + runs-on: ubuntu-latest + steps: + - name: End-to-end testing + id: e2e_test + run: make verify-kustomize-e2e + - name: Notify build result + uses: ShaunLWM/action-join@master + env: + JOIN_API_KEY: ${{ secrets.JOIN_API_KEY }} + JOIN_DEVICE_ID: ${{ secrets.JOIN_DEVICE_ID }} + JOIN_TEXT: Your project has been built. + JOIN_TITLE: Build Complete + release: + name: Release + runs-on: ubuntu-latest + steps: + - name: Release kyaml + run: | + make install-local-tools + gorepomod release kyaml ${{ inputs.release_type }} --doIt + - name: Notify build result + uses: ShaunLWM/action-join@master + env: + JOIN_API_KEY: ${{ secrets.JOIN_API_KEY }} + JOIN_DEVICE_ID: ${{ secrets.JOIN_DEVICE_ID }} + JOIN_TEXT: Your project has been built. + JOIN_TITLE: Build Complete diff --git a/.github/workflows/release-cmd-config.yml b/.github/workflows/release-cmd-config.yml new file mode 100644 index 0000000000..d1da1858b0 --- /dev/null +++ b/.github/workflows/release-cmd-config.yml @@ -0,0 +1,86 @@ +name: release-cmd-config + +on: + workflow_dispatch: + inputs: + release_type: + type: choice + description: release type (major, minor, or patch). + options: + - major + - minor + - patch + required: true + release_branch: + type: string + description: release branch name "release-cmd/config-v*" + required: true + +jobs: + pre-build: + name: Pre-build + runs-on: ubuntu-latest + steps: + - name: Fetch changes + uses: actions/checkout@v4 + with: + fetch-depth: 0 + ref: ${{ inputs.release_branch }} + - name: Unit test + id: unit_test + run: | + echo "Executing unit test" + make test-unit-all >> "${GITHUB_OUTPUT}" + - name: Notify build result + uses: ShaunLWM/action-join@master + env: + JOIN_API_KEY: ${{ secrets.JOIN_API_KEY }} + JOIN_DEVICE_ID: ${{ secrets.JOIN_DEVICE_ID }} + JOIN_TEXT: Your project has been built. + JOIN_TITLE: Build Complete + build: + name: Build + runs-on: ubuntu-latest + steps: + - name: Pin kyaml + run: | + gorepomod pin kyaml --doIt + - name: Build test + run: | + make install-local-tools + make build-kustomize-api + - name: Notify build result + uses: ShaunLWM/action-join@master + env: + JOIN_API_KEY: ${{ secrets.JOIN_API_KEY }} + JOIN_DEVICE_ID: ${{ secrets.JOIN_DEVICE_ID }} + JOIN_TEXT: Your project has been built. + JOIN_TITLE: Build Complete + e2e-test: + name: End-to-end Testing + runs-on: ubuntu-latest + steps: + - name: End-to-end testing + run: make verify-kustomize-e2e + - name: Notify build result + uses: ShaunLWM/action-join@master + env: + JOIN_API_KEY: ${{ secrets.JOIN_API_KEY }} + JOIN_DEVICE_ID: ${{ secrets.JOIN_DEVICE_ID }} + JOIN_TEXT: Your project has been built. + JOIN_TITLE: Build Complete + release: + name: Release + runs-on: ubuntu-latest + steps: + - name: Release cmd/config + run: | + make install-local-tools + gorepomod release cmd/config ${{ inputs.release_type }} --doIt + - name: Notify build result + uses: ShaunLWM/action-join@master + env: + JOIN_API_KEY: ${{ secrets.JOIN_API_KEY }} + JOIN_DEVICE_ID: ${{ secrets.JOIN_DEVICE_ID }} + JOIN_TEXT: Your project has been built. + JOIN_TITLE: Build Complete diff --git a/.github/workflows/release-kustomize.yml b/.github/workflows/release-kustomize.yml new file mode 100644 index 0000000000..819bc08723 --- /dev/null +++ b/.github/workflows/release-kustomize.yml @@ -0,0 +1,89 @@ +name: release-kustomize + +on: + workflow_dispatch: + inputs: + release_type: + type: choice + description: release type (major, minor, or patch). + options: + - major + - minor + - patch + required: true + release_branch: + type: string + description: release branch name "release-kustomize-v*" + required: true + +jobs: + pre-build: + name: Pre-build + runs-on: ubuntu-latest + steps: + - name: Fetch changes + uses: actions/checkout@v4 + with: + fetch-depth: 0 + ref: ${{ inputs.release_branch }} + - name: Unit test + id: unit_test + run: | + echo "Executing unit test" + make test-unit-all >> "${GITHUB_OUTPUT}" + - name: Notify build result + uses: ShaunLWM/action-join@master + env: + JOIN_API_KEY: ${{ secrets.JOIN_API_KEY }} + JOIN_DEVICE_ID: ${{ secrets.JOIN_DEVICE_ID }} + JOIN_TEXT: Your project has been built. + JOIN_TITLE: Build Complete + build: + name: Build + runs-on: ubuntu-latest + steps: + - name: Pin kyaml, cmd/config, and api + run: | + gorepomod pin kyaml --doIt + gorepomod pin cmd/config --doIt + gorepomod pin api --doIt + - name: Build test + run: | + make install-local-tools + make build-kustomize-api + - name: Notify build result + uses: ShaunLWM/action-join@master + env: + JOIN_API_KEY: ${{ secrets.JOIN_API_KEY }} + JOIN_DEVICE_ID: ${{ secrets.JOIN_DEVICE_ID }} + JOIN_TEXT: Your project has been built. + JOIN_TITLE: Build Complete + e2e-test: + name: End-to-end Testing + runs-on: ubuntu-latest + steps: + - name: End-to-end testing + id: e2e_test + run: make verify-kustomize-e2e + - name: Notify build result + uses: ShaunLWM/action-join@master + env: + JOIN_API_KEY: ${{ secrets.JOIN_API_KEY }} + JOIN_DEVICE_ID: ${{ secrets.JOIN_DEVICE_ID }} + JOIN_TEXT: Your project has been built. + JOIN_TITLE: Build Complete + release: + name: Release + runs-on: ubuntu-latest + steps: + - name: Release kyaml + run: | + make install-local-tools + gorepomod release kustomize ${{ inputs.release_type }} --doIt + - name: Notify build result + uses: ShaunLWM/action-join@master + env: + JOIN_API_KEY: ${{ secrets.JOIN_API_KEY }} + JOIN_DEVICE_ID: ${{ secrets.JOIN_DEVICE_ID }} + JOIN_TEXT: Your project has been built. + JOIN_TITLE: Build Complete diff --git a/.github/workflows/release-kyaml.yml b/.github/workflows/release-kyaml.yml new file mode 100644 index 0000000000..2246f5e279 --- /dev/null +++ b/.github/workflows/release-kyaml.yml @@ -0,0 +1,85 @@ +name: release-kyaml + +on: + workflow_dispatch: + inputs: + release_type: + type: choice + description: release type (major, minor, or patch). + options: + - major + - minor + - patch + required: true + release_branch: + type: string + description: release branch name "release-kyaml-v*" + required: true + +jobs: + pre-build: + name: Pre-build + runs-on: ubuntu-latest + outputs: + unit_test_result: ${{ steps.unit_test.outputs }} + steps: + - name: Fetch changes + uses: actions/checkout@v4 + with: + fetch-depth: 0 + ref: ${{ inputs.release_branch }} + - name: Unit test + id: unit_test + run: | + echo "Executing unit test" + make test-unit-all >> "${GITHUB_OUTPUT}" + - name: Notify test result + uses: ShaunLWM/action-join@master + env: + JOIN_API_KEY: ${{ secrets.JOIN_API_KEY }} + JOIN_DEVICE_ID: ${{ secrets.JOIN_DEVICE_ID }} + JOIN_TEXT: Your project has been built. + JOIN_TITLE: Build Complete + build: + name: Build + runs-on: ubuntu-latest + steps: + - name: Build test + run: | + make install-local-tools + make build-kustomize-api + - name: Notify build result + uses: ShaunLWM/action-join@master + env: + JOIN_API_KEY: ${{ secrets.JOIN_API_KEY }} + JOIN_DEVICE_ID: ${{ secrets.JOIN_DEVICE_ID }} + JOIN_TEXT: Your project has been built. + JOIN_TITLE: Build Complete + e2e-test: + name: End-to-end Testing + runs-on: ubuntu-latest + steps: + - name: End-to-end testing + run: make verify-kustomize-e2e + - name: Notify build result + uses: ShaunLWM/action-join@master + env: + JOIN_API_KEY: ${{ secrets.JOIN_API_KEY }} + JOIN_DEVICE_ID: ${{ secrets.JOIN_DEVICE_ID }} + JOIN_TEXT: Your project has been built. + JOIN_TITLE: Build Complete + release: + name: Release + runs-on: ubuntu-latest + steps: + - name: Release kyaml + run: | + make install-local-tools + gorepomod release kyaml ${{ inputs.release_type }} + - name: Notify build result + uses: ShaunLWM/action-join@master + env: + JOIN_API_KEY: ${{ secrets.JOIN_API_KEY }} + JOIN_DEVICE_ID: ${{ secrets.JOIN_DEVICE_ID }} + JOIN_TEXT: Your project has been built. + JOIN_TITLE: Build Complete From 27c1191e2e587671a0ccd83c7f4bf4be99356fb2 Mon Sep 17 00:00:00 2001 From: Kurnianto Trilaksono Date: Sun, 28 Jan 2024 14:54:33 +0800 Subject: [PATCH 02/21] make create-release.sh work with CI --- .github/workflows/release-api.yml | 28 ------------------------ .github/workflows/release-cmd-config.yml | 28 ------------------------ .github/workflows/release-kustomize.yml | 28 ------------------------ .github/workflows/release-kyaml.yml | 28 ------------------------ releasing/create-release.sh | 22 ++++++++++++++++++- 5 files changed, 21 insertions(+), 113 deletions(-) diff --git a/.github/workflows/release-api.yml b/.github/workflows/release-api.yml index 3b327d3ea0..fd9b3532dd 100644 --- a/.github/workflows/release-api.yml +++ b/.github/workflows/release-api.yml @@ -31,13 +31,6 @@ jobs: run: | echo "Executing unit test" make test-unit-all >> "${GITHUB_OUTPUT}" - - name: Notify build result - uses: ShaunLWM/action-join@master - env: - JOIN_API_KEY: ${{ secrets.JOIN_API_KEY }} - JOIN_DEVICE_ID: ${{ secrets.JOIN_DEVICE_ID }} - JOIN_TEXT: Your project has been built. - JOIN_TITLE: Build Complete build: name: Build runs-on: ubuntu-latest @@ -50,13 +43,6 @@ jobs: uses: actions/checkout@v4 with: fetch-depth: 0 - - name: Notify build result - uses: ShaunLWM/action-join@master - env: - JOIN_API_KEY: ${{ secrets.JOIN_API_KEY }} - JOIN_DEVICE_ID: ${{ secrets.JOIN_DEVICE_ID }} - JOIN_TEXT: Your project has been built. - JOIN_TITLE: Build Complete e2e-test: name: End-to-end Testing runs-on: ubuntu-latest @@ -64,13 +50,6 @@ jobs: - name: End-to-end testing id: e2e_test run: make verify-kustomize-e2e - - name: Notify build result - uses: ShaunLWM/action-join@master - env: - JOIN_API_KEY: ${{ secrets.JOIN_API_KEY }} - JOIN_DEVICE_ID: ${{ secrets.JOIN_DEVICE_ID }} - JOIN_TEXT: Your project has been built. - JOIN_TITLE: Build Complete release: name: Release runs-on: ubuntu-latest @@ -79,10 +58,3 @@ jobs: run: | make install-local-tools gorepomod release kyaml ${{ inputs.release_type }} --doIt - - name: Notify build result - uses: ShaunLWM/action-join@master - env: - JOIN_API_KEY: ${{ secrets.JOIN_API_KEY }} - JOIN_DEVICE_ID: ${{ secrets.JOIN_DEVICE_ID }} - JOIN_TEXT: Your project has been built. - JOIN_TITLE: Build Complete diff --git a/.github/workflows/release-cmd-config.yml b/.github/workflows/release-cmd-config.yml index d1da1858b0..125786f46a 100644 --- a/.github/workflows/release-cmd-config.yml +++ b/.github/workflows/release-cmd-config.yml @@ -31,13 +31,6 @@ jobs: run: | echo "Executing unit test" make test-unit-all >> "${GITHUB_OUTPUT}" - - name: Notify build result - uses: ShaunLWM/action-join@master - env: - JOIN_API_KEY: ${{ secrets.JOIN_API_KEY }} - JOIN_DEVICE_ID: ${{ secrets.JOIN_DEVICE_ID }} - JOIN_TEXT: Your project has been built. - JOIN_TITLE: Build Complete build: name: Build runs-on: ubuntu-latest @@ -49,26 +42,12 @@ jobs: run: | make install-local-tools make build-kustomize-api - - name: Notify build result - uses: ShaunLWM/action-join@master - env: - JOIN_API_KEY: ${{ secrets.JOIN_API_KEY }} - JOIN_DEVICE_ID: ${{ secrets.JOIN_DEVICE_ID }} - JOIN_TEXT: Your project has been built. - JOIN_TITLE: Build Complete e2e-test: name: End-to-end Testing runs-on: ubuntu-latest steps: - name: End-to-end testing run: make verify-kustomize-e2e - - name: Notify build result - uses: ShaunLWM/action-join@master - env: - JOIN_API_KEY: ${{ secrets.JOIN_API_KEY }} - JOIN_DEVICE_ID: ${{ secrets.JOIN_DEVICE_ID }} - JOIN_TEXT: Your project has been built. - JOIN_TITLE: Build Complete release: name: Release runs-on: ubuntu-latest @@ -77,10 +56,3 @@ jobs: run: | make install-local-tools gorepomod release cmd/config ${{ inputs.release_type }} --doIt - - name: Notify build result - uses: ShaunLWM/action-join@master - env: - JOIN_API_KEY: ${{ secrets.JOIN_API_KEY }} - JOIN_DEVICE_ID: ${{ secrets.JOIN_DEVICE_ID }} - JOIN_TEXT: Your project has been built. - JOIN_TITLE: Build Complete diff --git a/.github/workflows/release-kustomize.yml b/.github/workflows/release-kustomize.yml index 819bc08723..8233c1e631 100644 --- a/.github/workflows/release-kustomize.yml +++ b/.github/workflows/release-kustomize.yml @@ -31,13 +31,6 @@ jobs: run: | echo "Executing unit test" make test-unit-all >> "${GITHUB_OUTPUT}" - - name: Notify build result - uses: ShaunLWM/action-join@master - env: - JOIN_API_KEY: ${{ secrets.JOIN_API_KEY }} - JOIN_DEVICE_ID: ${{ secrets.JOIN_DEVICE_ID }} - JOIN_TEXT: Your project has been built. - JOIN_TITLE: Build Complete build: name: Build runs-on: ubuntu-latest @@ -51,13 +44,6 @@ jobs: run: | make install-local-tools make build-kustomize-api - - name: Notify build result - uses: ShaunLWM/action-join@master - env: - JOIN_API_KEY: ${{ secrets.JOIN_API_KEY }} - JOIN_DEVICE_ID: ${{ secrets.JOIN_DEVICE_ID }} - JOIN_TEXT: Your project has been built. - JOIN_TITLE: Build Complete e2e-test: name: End-to-end Testing runs-on: ubuntu-latest @@ -65,13 +51,6 @@ jobs: - name: End-to-end testing id: e2e_test run: make verify-kustomize-e2e - - name: Notify build result - uses: ShaunLWM/action-join@master - env: - JOIN_API_KEY: ${{ secrets.JOIN_API_KEY }} - JOIN_DEVICE_ID: ${{ secrets.JOIN_DEVICE_ID }} - JOIN_TEXT: Your project has been built. - JOIN_TITLE: Build Complete release: name: Release runs-on: ubuntu-latest @@ -80,10 +59,3 @@ jobs: run: | make install-local-tools gorepomod release kustomize ${{ inputs.release_type }} --doIt - - name: Notify build result - uses: ShaunLWM/action-join@master - env: - JOIN_API_KEY: ${{ secrets.JOIN_API_KEY }} - JOIN_DEVICE_ID: ${{ secrets.JOIN_DEVICE_ID }} - JOIN_TEXT: Your project has been built. - JOIN_TITLE: Build Complete diff --git a/.github/workflows/release-kyaml.yml b/.github/workflows/release-kyaml.yml index 2246f5e279..5307066ebf 100644 --- a/.github/workflows/release-kyaml.yml +++ b/.github/workflows/release-kyaml.yml @@ -33,13 +33,6 @@ jobs: run: | echo "Executing unit test" make test-unit-all >> "${GITHUB_OUTPUT}" - - name: Notify test result - uses: ShaunLWM/action-join@master - env: - JOIN_API_KEY: ${{ secrets.JOIN_API_KEY }} - JOIN_DEVICE_ID: ${{ secrets.JOIN_DEVICE_ID }} - JOIN_TEXT: Your project has been built. - JOIN_TITLE: Build Complete build: name: Build runs-on: ubuntu-latest @@ -48,26 +41,12 @@ jobs: run: | make install-local-tools make build-kustomize-api - - name: Notify build result - uses: ShaunLWM/action-join@master - env: - JOIN_API_KEY: ${{ secrets.JOIN_API_KEY }} - JOIN_DEVICE_ID: ${{ secrets.JOIN_DEVICE_ID }} - JOIN_TEXT: Your project has been built. - JOIN_TITLE: Build Complete e2e-test: name: End-to-end Testing runs-on: ubuntu-latest steps: - name: End-to-end testing run: make verify-kustomize-e2e - - name: Notify build result - uses: ShaunLWM/action-join@master - env: - JOIN_API_KEY: ${{ secrets.JOIN_API_KEY }} - JOIN_DEVICE_ID: ${{ secrets.JOIN_DEVICE_ID }} - JOIN_TEXT: Your project has been built. - JOIN_TITLE: Build Complete release: name: Release runs-on: ubuntu-latest @@ -76,10 +55,3 @@ jobs: run: | make install-local-tools gorepomod release kyaml ${{ inputs.release_type }} - - name: Notify build result - uses: ShaunLWM/action-join@master - env: - JOIN_API_KEY: ${{ secrets.JOIN_API_KEY }} - JOIN_DEVICE_ID: ${{ secrets.JOIN_DEVICE_ID }} - JOIN_TEXT: Your project has been built. - JOIN_TITLE: Build Complete diff --git a/releasing/create-release.sh b/releasing/create-release.sh index 26f00c403e..f0bc39f157 100755 --- a/releasing/create-release.sh +++ b/releasing/create-release.sh @@ -23,14 +23,27 @@ set -o errexit set -o nounset set -o pipefail +declare -a RELEASE_TYPES=("major" "minor" "patch") + if [[ -z "${1-}" ]]; then echo "Usage: $0 TAG" echo " TAG: the tag to build or release, e.g. api/v1.2.3" exit 1 fi +if [[ -z "${2-}" ]]; then + echo "Release type not specified, using default value: patch" + release_type="patch" +elif [[ ! "${RELEASE_TYPES[*]}" =~ "${2}" ]]; then + echo "Unsupported release type, only input these values: major, minor, patch." + exit 1 +fi + git_tag=$1 +release_type=$2 + echo "release tag: $git_tag" +echo "release type: $release_type" # Build the release binaries for every OS/arch combination. # It builds compressed artifacts on $release_dir. @@ -81,6 +94,8 @@ function build_kustomize_binary { } function create_release { + source ./helpers.sh + git_tag=$1 # Take everything before the last slash. @@ -97,6 +112,12 @@ function create_release { additional_release_artifacts_arg="" + echo "release tag: $git_tag" + createBranch $git_tag "creating release branch $git_tag..." + + # Trigger workflow for respective modeule release + gh workflow run "release-${module}" -f "release_type=${release_type}" -f "release_branch=${git_tag}" + # build `kustomize` binary if [[ "$module" == "kustomize" ]]; then release_artifact_dir=$(mktemp -d) @@ -122,6 +143,5 @@ function create_release { --notes-file "$changelog_file" } - ## create release create_release "$git_tag" From 5a64ea9ce61e662f802f89145be8426dfacd7f43 Mon Sep 17 00:00:00 2001 From: Kurnianto Trilaksono Date: Sun, 28 Jan 2024 22:04:56 +0800 Subject: [PATCH 03/21] add create release branch script, gh workflow triggers, gh workflow permissions, and release branch check --- .github/workflows/release-api.yml | 52 +++++++++++++----- .github/workflows/release-cmd-config.yml | 67 ++++++++++++++++++++---- .github/workflows/release-kustomize.yml | 46 +++++++++++----- .github/workflows/release-kyaml.yml | 52 +++++++++++++----- releasing/create-release.sh | 16 +++--- releasing/helpers.sh | 10 +++- 6 files changed, 186 insertions(+), 57 deletions(-) diff --git a/.github/workflows/release-api.yml b/.github/workflows/release-api.yml index fd9b3532dd..cb062fad32 100644 --- a/.github/workflows/release-api.yml +++ b/.github/workflows/release-api.yml @@ -11,50 +11,74 @@ on: - minor - patch required: true + default: 'patch' release_branch: type: string description: release branch name "release-api-v*" required: true + default: 'master' jobs: pre-build: name: Pre-build runs-on: ubuntu-latest steps: - - name: Checkout to release branch + - name: Fetch changes uses: actions/checkout@v4 with: fetch-depth: 0 ref: ${{ inputs.release_branch }} + - name: Set up Go 1.x + uses: actions/setup-go@v5 + with: + go-version-file: go.work - name: Unit test id: unit_test + working-directory: $GITHUB_WORKSPACE run: | echo "Executing unit test" make test-unit-all >> "${GITHUB_OUTPUT}" build: name: Build runs-on: ubuntu-latest + needs: pre-build steps: - - name: Pin kyaml, cmd/config - run: | - gorepomod pin kyaml --doIt - gorepomod pin cmd/config --doIt - - name: Build api + - name: Fetch changes uses: actions/checkout@v4 with: fetch-depth: 0 - e2e-test: - name: End-to-end Testing - runs-on: ubuntu-latest - steps: - - name: End-to-end testing - id: e2e_test - run: make verify-kustomize-e2e + ref: ${{ inputs.release_branch }} + - name: Set up Go 1.x + uses: actions/setup-go@v5 + with: + go-version-file: go.work + - name: Install local tools + run: | + make install-local-tools + - name: Pin kyaml, cmd/config + run: | + gorepomod pin kyaml --local --doIt + gorepomod pin cmd/config --local --doIt + - name: Build api + run: | + make build-kustomize-api release: name: Release runs-on: ubuntu-latest + needs: build + permissions: + contents: write steps: + - name: Fetch changes + uses: actions/checkout@v4 + with: + fetch-depth: 0 + ref: ${{ inputs.release_branch }} + - name: Set up Go 1.x + uses: actions/setup-go@v5 + with: + go-version-file: go.work - name: Release kyaml run: | make install-local-tools - gorepomod release kyaml ${{ inputs.release_type }} --doIt + gorepomod release kyaml ${{ inputs.release_type }} --local --doIt diff --git a/.github/workflows/release-cmd-config.yml b/.github/workflows/release-cmd-config.yml index 125786f46a..c1421aab73 100644 --- a/.github/workflows/release-cmd-config.yml +++ b/.github/workflows/release-cmd-config.yml @@ -11,10 +11,12 @@ on: - minor - patch required: true + default: 'patch' release_branch: type: string description: release branch name "release-cmd/config-v*" required: true + default: 'master' jobs: pre-build: @@ -26,33 +28,76 @@ jobs: with: fetch-depth: 0 ref: ${{ inputs.release_branch }} + - name: Set up Go 1.x + uses: actions/setup-go@v5 + with: + go-version-file: go.work - name: Unit test id: unit_test run: | echo "Executing unit test" - make test-unit-all >> "${GITHUB_OUTPUT}" + go install github.com/jstemmer/go-junit-report@latest + make test-unit-all | go-junit-report -set-exit-code > report.xml build: name: Build runs-on: ubuntu-latest + needs: pre-build + env: + GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} + permissions: + contents: write steps: + - name: Fetch changes + uses: actions/checkout@v4 + with: + fetch-depth: 0 + ref: ${{ inputs.release_branch }} + - name: Set up Go 1.x + uses: actions/setup-go@v5 + with: + go-version-file: go.work + - name: Install local tools + run: | + make install-local-tools - name: Pin kyaml run: | - gorepomod pin kyaml --doIt + git remote add upstream "https://x-access-token:${GITHUB_TOKEN}@github.com/antoooks/kustomize.git" + git remote -v + gorepomod pin kyaml --local --doIt - name: Build test run: | - make install-local-tools make build-kustomize-api - e2e-test: - name: End-to-end Testing - runs-on: ubuntu-latest - steps: - - name: End-to-end testing - run: make verify-kustomize-e2e release: name: Release runs-on: ubuntu-latest + needs: build + env: + GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} + permissions: + contents: write steps: - - name: Release cmd/config + - name: Fetch changes + uses: actions/checkout@v4 + with: + fetch-depth: 0 + ref: ${{ inputs.release_branch }} + - name: Set up Go 1.x + uses: actions/setup-go@v5 + with: + go-version-file: go.work + - name: Install local tools run: | make install-local-tools - gorepomod release cmd/config ${{ inputs.release_type }} --doIt + - name: Pin kyaml + run: | + git config --global user.email "development@email.com" + git config --global user.name "Development" + git remote add upstream "https://x-access-token:${GITHUB_TOKEN}@github.com/antoooks/kustomize.git" + git remote -v + gorepomod pin kyaml --local --doIt + git add --all + git commit -m "pin kyaml" + git push + - name: Release cmd/config + run: | + gorepomod release cmd/config ${{ inputs.release_type }} --local --doIt diff --git a/.github/workflows/release-kustomize.yml b/.github/workflows/release-kustomize.yml index 8233c1e631..7d5e7fb54f 100644 --- a/.github/workflows/release-kustomize.yml +++ b/.github/workflows/release-kustomize.yml @@ -11,10 +11,12 @@ on: - minor - patch required: true + default: 'patch' release_branch: type: string description: release branch name "release-kustomize-v*" required: true + default: 'master' jobs: pre-build: @@ -30,32 +32,50 @@ jobs: id: unit_test run: | echo "Executing unit test" - make test-unit-all >> "${GITHUB_OUTPUT}" + go install github.com/jstemmer/go-junit-report@latest + make test-unit-all | go-junit-report -set-exit-code > report.xml build: name: Build runs-on: ubuntu-latest + needs: pre-build steps: + - name: Fetch changes + uses: actions/checkout@v4 + with: + fetch-depth: 0 + ref: ${{ inputs.release_branch }} + - name: Set up Go 1.x + uses: actions/setup-go@v5 + with: + go-version-file: go.work + - name: Install local tools + run: | + make install-local-tools - name: Pin kyaml, cmd/config, and api run: | - gorepomod pin kyaml --doIt - gorepomod pin cmd/config --doIt - gorepomod pin api --doIt + gorepomod pin kyaml --local --doIt + gorepomod pin cmd/config --local --doIt + gorepomod pin api --local --doIt - name: Build test run: | - make install-local-tools make build-kustomize-api - e2e-test: - name: End-to-end Testing - runs-on: ubuntu-latest - steps: - - name: End-to-end testing - id: e2e_test - run: make verify-kustomize-e2e release: name: Release runs-on: ubuntu-latest + needs: build + permissions: + contents: write steps: + - name: Fetch changes + uses: actions/checkout@v4 + with: + fetch-depth: 0 + ref: ${{ inputs.release_branch }} + - name: Set up Go 1.x + uses: actions/setup-go@v5 + with: + go-version-file: go.work - name: Release kyaml run: | make install-local-tools - gorepomod release kustomize ${{ inputs.release_type }} --doIt + gorepomod release kustomize ${{ inputs.release_type }} --local --doIt diff --git a/.github/workflows/release-kyaml.yml b/.github/workflows/release-kyaml.yml index 5307066ebf..747544b1a0 100644 --- a/.github/workflows/release-kyaml.yml +++ b/.github/workflows/release-kyaml.yml @@ -11,47 +11,75 @@ on: - minor - patch required: true + default: 'patch' release_branch: type: string description: release branch name "release-kyaml-v*" required: true + default: 'master' jobs: pre-build: name: Pre-build runs-on: ubuntu-latest - outputs: - unit_test_result: ${{ steps.unit_test.outputs }} steps: - name: Fetch changes uses: actions/checkout@v4 with: fetch-depth: 0 ref: ${{ inputs.release_branch }} + - name: Set up Go 1.x + uses: actions/setup-go@v5 + with: + go-version-file: go.work - name: Unit test id: unit_test run: | echo "Executing unit test" - make test-unit-all >> "${GITHUB_OUTPUT}" + go install github.com/jstemmer/go-junit-report@latest + make test-unit-all | go-junit-report -set-exit-code > report.xml + - name: Test Summary + uses: test-summary/action@v1 + with: + paths: | + ./report.xml + if: always() build: name: Build + needs: pre-build runs-on: ubuntu-latest steps: + - name: Fetch changes + uses: actions/checkout@v4 + with: + fetch-depth: 0 + ref: ${{ inputs.release_branch }} + - name: Set up Go 1.x + uses: actions/setup-go@v5 + with: + go-version-file: go.work - name: Build test run: | - make install-local-tools make build-kustomize-api - e2e-test: - name: End-to-end Testing - runs-on: ubuntu-latest - steps: - - name: End-to-end testing - run: make verify-kustomize-e2e release: name: Release + needs: build runs-on: ubuntu-latest + permissions: + contents: write steps: + - name: Fetch changes + uses: actions/checkout@v4 + with: + fetch-depth: 0 + ref: ${{ inputs.release_branch }} + - name: Set up Go 1.x + uses: actions/setup-go@v5 + with: + go-version-file: go.work - name: Release kyaml run: | - make install-local-tools - gorepomod release kyaml ${{ inputs.release_type }} + git config --global user.email "development@email.com" + git config --global user.name "Development" + make install-tools + gorepomod release kyaml ${{ inputs.release_type }} --local --doIt diff --git a/releasing/create-release.sh b/releasing/create-release.sh index f0bc39f157..cd668ece65 100755 --- a/releasing/create-release.sh +++ b/releasing/create-release.sh @@ -94,29 +94,33 @@ function build_kustomize_binary { } function create_release { - source ./helpers.sh + source ./releasing/helpers.sh git_tag=$1 # Take everything before the last slash. # This is expected to match $module. module=${git_tag%/*} + module_slugified=$(echo $module | iconv -t ascii//TRANSLIT | sed -E -e 's/[^[:alnum:]]+/-/g' -e 's/^-+|-+$//g' | tr '[:upper:]' '[:lower:]') # Take everything after the last slash. version=${git_tag##*/} + release_branch="release-${module_slugified}/${version}" + + # Create release branch release-{module}/{version} + echo "Creating release..." + createBranch $release_branch "create release branch $release_branch" + # Generate the changelog for this release # using the last two tags for the module changelog_file=$(mktemp) - ./releasing/compile-changelog.sh "$module" "$git_tag" "$changelog_file" + ./releasing/compile-changelog.sh "$module" "HEAD" "$changelog_file" additional_release_artifacts_arg="" - echo "release tag: $git_tag" - createBranch $git_tag "creating release branch $git_tag..." - # Trigger workflow for respective modeule release - gh workflow run "release-${module}" -f "release_type=${release_type}" -f "release_branch=${git_tag}" + gh workflow run "release-${module}.yml" -f "release_type=${release_type}" -f "release_branch=${release_branch}" # build `kustomize` binary if [[ "$module" == "kustomize" ]]; then diff --git a/releasing/helpers.sh b/releasing/helpers.sh index 4da68f1515..acec8eedc3 100644 --- a/releasing/helpers.sh +++ b/releasing/helpers.sh @@ -2,12 +2,20 @@ # Copyright 2022 The Kubernetes Authors. # SPDX-License-Identifier: Apache-2.0 +ORIGIN_MASTER="feat/5449-add-release-automation" +UPSTREAM_REPO="upstream" +UPSTREAM_MASTER="master" function createBranch { branch=$1 title=$2 echo "Making branch $branch : \"$title\"" - git branch -D $branch # delete if it exists + # Check if release branch exists + if git show-ref --quiet "refs/heads/${branch}"; then + git fetch --tags upstream master + git checkout $ORIGIN_MASTER + git branch -D $branch # delete if it exists + fi git checkout -b $branch git commit -a -m "$title" git push -f origin $branch From cba01935311e2e857a1006c1ae51daf8830859aa Mon Sep 17 00:00:00 2001 From: Kurnianto Trilaksono Date: Sat, 3 Feb 2024 15:14:52 +0800 Subject: [PATCH 04/21] make gorepomod release work with automation and refactor ci steps --- .github/workflows/release-api.yml | 34 ++++++++++++++++++++-- .github/workflows/release-cmd-config.yml | 36 +++++++++++++++--------- .github/workflows/release-kustomize.yml | 18 ++++++++++++ .github/workflows/release-kyaml.yml | 5 ++++ cmd/gorepomod/internal/git/runner.go | 3 +- releasing/create-release.sh | 4 +-- 6 files changed, 81 insertions(+), 19 deletions(-) diff --git a/.github/workflows/release-api.yml b/.github/workflows/release-api.yml index cb062fad32..ba487ae53c 100644 --- a/.github/workflows/release-api.yml +++ b/.github/workflows/release-api.yml @@ -57,11 +57,26 @@ jobs: make install-local-tools - name: Pin kyaml, cmd/config run: | + + # Prepare git + git config --global user.email "development@kustomize.io" + git config --global user.name "Development" + git remote add upstream "https://x-access-token:${GITHUB_TOKEN}@github.com/antoooks/kustomize.git" + git remote -v + + # Pin dependencies: kyaml, cmd/config gorepomod pin kyaml --local --doIt gorepomod pin cmd/config --local --doIt - name: Build api run: | make build-kustomize-api + - name: Commit pinned dependencies + run: | + + # Commit pinned dependencies and handle no commit + git add --all + git commit -m "pin kyaml, cmd/config" || true + git push release: name: Release runs-on: ubuntu-latest @@ -78,7 +93,22 @@ jobs: uses: actions/setup-go@v5 with: go-version-file: go.work - - name: Release kyaml + cache-dependency-path: "**/*.sum" + - name: Pin kyaml, cmd/config + run: | + + # Prepare git + git config --global user.email "development@kustomize.io" + git config --global user.name "Development" + git remote add upstream "https://x-access-token:${GITHUB_TOKEN}@github.com/antoooks/kustomize.git" + git remote -v + + # Pin dependencies: kyaml, cmd/config + gorepomod pin kyaml --local --doIt + gorepomod pin cmd/config --local --doIt + - name: Release api run: | + + # Release api make install-local-tools - gorepomod release kyaml ${{ inputs.release_type }} --local --doIt + gorepomod release api ${{ inputs.release_type }} --local --doIt diff --git a/.github/workflows/release-cmd-config.yml b/.github/workflows/release-cmd-config.yml index c1421aab73..1dd2c2c0a0 100644 --- a/.github/workflows/release-cmd-config.yml +++ b/.github/workflows/release-cmd-config.yml @@ -32,9 +32,12 @@ jobs: uses: actions/setup-go@v5 with: go-version-file: go.work + cache-dependency-path: "**/*.sum" - name: Unit test id: unit_test run: | + + # Run unit test echo "Executing unit test" go install github.com/jstemmer/go-junit-report@latest make test-unit-all | go-junit-report -set-exit-code > report.xml @@ -56,17 +59,31 @@ jobs: uses: actions/setup-go@v5 with: go-version-file: go.work + cache-dependency-path: "**/*.sum" - name: Install local tools run: | make install-local-tools - name: Pin kyaml run: | + + # Prepare git + git config --global user.email "development@kustomize.io" + git config --global user.name "Development" git remote add upstream "https://x-access-token:${GITHUB_TOKEN}@github.com/antoooks/kustomize.git" - git remote -v + git remote -v + + # Pin dependencies: kyaml gorepomod pin kyaml --local --doIt - name: Build test run: | make build-kustomize-api + - name: Commit pinned dependencies + run: | + + # Commit pinned dependencies and handle no commit + git add --all + git commit -m "pin kyaml, cmd/config" || true + git push release: name: Release runs-on: ubuntu-latest @@ -85,19 +102,10 @@ jobs: uses: actions/setup-go@v5 with: go-version-file: go.work - - name: Install local tools - run: | - make install-local-tools - - name: Pin kyaml - run: | - git config --global user.email "development@email.com" - git config --global user.name "Development" - git remote add upstream "https://x-access-token:${GITHUB_TOKEN}@github.com/antoooks/kustomize.git" - git remote -v - gorepomod pin kyaml --local --doIt - git add --all - git commit -m "pin kyaml" - git push + cache-dependency-path: "**/*.sum" - name: Release cmd/config run: | + + # Release cmd/config + make install-local-tools gorepomod release cmd/config ${{ inputs.release_type }} --local --doIt diff --git a/.github/workflows/release-kustomize.yml b/.github/workflows/release-kustomize.yml index 7d5e7fb54f..f639bc8f27 100644 --- a/.github/workflows/release-kustomize.yml +++ b/.github/workflows/release-kustomize.yml @@ -53,12 +53,27 @@ jobs: make install-local-tools - name: Pin kyaml, cmd/config, and api run: | + + # Prepare git + git config --global user.email "development@kustomize.io" + git config --global user.name "Development" + git remote add upstream "https://x-access-token:${GITHUB_TOKEN}@github.com/antoooks/kustomize.git" + git remote -v + + # Pin dependencies: kyaml, cmd/config, api gorepomod pin kyaml --local --doIt gorepomod pin cmd/config --local --doIt gorepomod pin api --local --doIt - name: Build test run: | make build-kustomize-api + - name: Commit pinned dependencies + run: | + + # Commit pinned dependencies and handle no commit + git add --all + git commit -m "pin kyaml, cmd/config, api" || true + git push release: name: Release runs-on: ubuntu-latest @@ -75,7 +90,10 @@ jobs: uses: actions/setup-go@v5 with: go-version-file: go.work + cache-dependency-path: "**/*.sum" - name: Release kyaml run: | + + # Release kustomize make install-local-tools gorepomod release kustomize ${{ inputs.release_type }} --local --doIt diff --git a/.github/workflows/release-kyaml.yml b/.github/workflows/release-kyaml.yml index 747544b1a0..5e9911a401 100644 --- a/.github/workflows/release-kyaml.yml +++ b/.github/workflows/release-kyaml.yml @@ -32,6 +32,7 @@ jobs: uses: actions/setup-go@v5 with: go-version-file: go.work + cache-dependency-path: "**/*.sum" - name: Unit test id: unit_test run: | @@ -58,6 +59,7 @@ jobs: uses: actions/setup-go@v5 with: go-version-file: go.work + cache-dependency-path: "**/*.sum" - name: Build test run: | make build-kustomize-api @@ -77,8 +79,11 @@ jobs: uses: actions/setup-go@v5 with: go-version-file: go.work + cache-dependency-path: "**/*.sum" - name: Release kyaml run: | + + # Release kyaml git config --global user.email "development@email.com" git config --global user.name "Development" make install-tools diff --git a/cmd/gorepomod/internal/git/runner.go b/cmd/gorepomod/internal/git/runner.go index dac244d58e..5b49f9a5fe 100644 --- a/cmd/gorepomod/internal/git/runner.go +++ b/cmd/gorepomod/internal/git/runner.go @@ -258,7 +258,8 @@ func (gr *Runner) AssureOnMainBranch() error { // CheckoutMainBranch does that. func (gr *Runner) CheckoutMainBranch() error { gr.comment("checking out main branch") - return gr.runNoOut(noHarmDone, "checkout", mainBranch) + fullBranchSpec := fmt.Sprintf("%s/%s", remoteOrigin, mainBranch) + return gr.runNoOut(noHarmDone, "checkout", fullBranchSpec) } // FetchRemote does that. diff --git a/releasing/create-release.sh b/releasing/create-release.sh index cd668ece65..41b636290b 100755 --- a/releasing/create-release.sh +++ b/releasing/create-release.sh @@ -106,7 +106,7 @@ function create_release { # Take everything after the last slash. version=${git_tag##*/} - release_branch="release-${module_slugified}/${version}" + release_branch="release-${module}/${version}" # Create release branch release-{module}/{version} echo "Creating release..." @@ -120,7 +120,7 @@ function create_release { additional_release_artifacts_arg="" # Trigger workflow for respective modeule release - gh workflow run "release-${module}.yml" -f "release_type=${release_type}" -f "release_branch=${release_branch}" + gh workflow run "release-${module_slugified}.yml" -f "release_type=${release_type}" -f "release_branch=${release_branch}" # build `kustomize` binary if [[ "$module" == "kustomize" ]]; then From 2a64528c66dcc9d6387cda936526aa8e5d5b3848 Mon Sep 17 00:00:00 2001 From: Kurnianto Trilaksono Date: Sat, 3 Feb 2024 20:44:31 +0800 Subject: [PATCH 05/21] change how create-release parameter works --- .github/workflows/release-api.yml | 24 ++++++----- .github/workflows/release-cmd-config.yml | 15 ++++++- .github/workflows/release-kustomize.yml | 18 ++++++++ .github/workflows/release-kyaml.yml | 11 +++-- cmd/gorepomod/internal/repo/manager.go | 19 ++++---- releasing/create-release.sh | 55 ++++++++++++++++-------- 6 files changed, 102 insertions(+), 40 deletions(-) diff --git a/.github/workflows/release-api.yml b/.github/workflows/release-api.yml index ba487ae53c..081ad10d7b 100644 --- a/.github/workflows/release-api.yml +++ b/.github/workflows/release-api.yml @@ -32,12 +32,21 @@ jobs: uses: actions/setup-go@v5 with: go-version-file: go.work + cache-dependency-path: "**/*.sum" - name: Unit test id: unit_test - working-directory: $GITHUB_WORKSPACE run: | + + # Run unit test echo "Executing unit test" - make test-unit-all >> "${GITHUB_OUTPUT}" + go install github.com/jstemmer/go-junit-report@latest + make test-unit-all | go-junit-report -set-exit-code > report.xml + - name: Test Summary + uses: test-summary/action@v1 + with: + paths: | + ./report.xml + if: always() build: name: Build runs-on: ubuntu-latest @@ -94,21 +103,16 @@ jobs: with: go-version-file: go.work cache-dependency-path: "**/*.sum" - - name: Pin kyaml, cmd/config + - name: Create release draft run: | # Prepare git git config --global user.email "development@kustomize.io" git config --global user.name "Development" - git remote add upstream "https://x-access-token:${GITHUB_TOKEN}@github.com/antoooks/kustomize.git" - git remote -v - - # Pin dependencies: kyaml, cmd/config - gorepomod pin kyaml --local --doIt - gorepomod pin cmd/config --local --doIt + ./releasing/compile-changelog.sh api HEAD - name: Release api run: | - + # Release api make install-local-tools gorepomod release api ${{ inputs.release_type }} --local --doIt diff --git a/.github/workflows/release-cmd-config.yml b/.github/workflows/release-cmd-config.yml index 1dd2c2c0a0..161ecfe277 100644 --- a/.github/workflows/release-cmd-config.yml +++ b/.github/workflows/release-cmd-config.yml @@ -41,6 +41,12 @@ jobs: echo "Executing unit test" go install github.com/jstemmer/go-junit-report@latest make test-unit-all | go-junit-report -set-exit-code > report.xml + - name: Test Summary + uses: test-summary/action@v1 + with: + paths: | + ./report.xml + if: always() build: name: Build runs-on: ubuntu-latest @@ -103,9 +109,16 @@ jobs: with: go-version-file: go.work cache-dependency-path: "**/*.sum" + - name: Create release draft + run: | + + # Prepare git + git config --global user.email "development@kustomize.io" + git config --global user.name "Development" + ./releasing/compile-changelog.sh cmd/config HEAD - name: Release cmd/config run: | - + # Release cmd/config make install-local-tools gorepomod release cmd/config ${{ inputs.release_type }} --local --doIt diff --git a/.github/workflows/release-kustomize.yml b/.github/workflows/release-kustomize.yml index f639bc8f27..f8303b4b0e 100644 --- a/.github/workflows/release-kustomize.yml +++ b/.github/workflows/release-kustomize.yml @@ -34,6 +34,17 @@ jobs: echo "Executing unit test" go install github.com/jstemmer/go-junit-report@latest make test-unit-all | go-junit-report -set-exit-code > report.xml + - name: Set up Go 1.x + uses: actions/setup-go@v5 + with: + go-version-file: go.work + cache-dependency-path: "**/*.sum" + - name: Test Summary + uses: test-summary/action@v1 + with: + paths: | + ./report.xml + if: always() build: name: Build runs-on: ubuntu-latest @@ -91,6 +102,13 @@ jobs: with: go-version-file: go.work cache-dependency-path: "**/*.sum" + - name: Create release changelog + run: | + + # Prepare git + git config --global user.email "development@kustomize.io" + git config --global user.name "Development" + ./releasing/compile-changelog.sh kustomize HEAD - name: Release kyaml run: | diff --git a/.github/workflows/release-kyaml.yml b/.github/workflows/release-kyaml.yml index 5e9911a401..268fe43097 100644 --- a/.github/workflows/release-kyaml.yml +++ b/.github/workflows/release-kyaml.yml @@ -43,7 +43,7 @@ jobs: uses: test-summary/action@v1 with: paths: | - ./report.xml + ./report.xml if: always() build: name: Build @@ -80,11 +80,16 @@ jobs: with: go-version-file: go.work cache-dependency-path: "**/*.sum" + - name: Create release changelog + run: | + + # Prepare git + git config --global user.email "development@kustomize.io" + git config --global user.name "Development" + ./releasing/compile-changelog.sh kyaml HEAD - name: Release kyaml run: | # Release kyaml - git config --global user.email "development@email.com" - git config --global user.name "Development" make install-tools gorepomod release kyaml ${{ inputs.release_type }} --local --doIt diff --git a/cmd/gorepomod/internal/repo/manager.go b/cmd/gorepomod/internal/repo/manager.go index 79f9eeba3a..07b84c770d 100644 --- a/cmd/gorepomod/internal/repo/manager.go +++ b/cmd/gorepomod/internal/repo/manager.go @@ -176,15 +176,16 @@ func (mgr *Manager) Release( if err := gr.AssureCleanWorkspace(); err != nil { return err } - if err := gr.CheckoutReleaseBranch(mgr.remoteName, relBranch); err != nil { - return err - } - if err := gr.MergeFromRemoteMain(mgr.remoteName); err != nil { - return err - } - if err := gr.PushBranchToRemote(mgr.remoteName, relBranch); err != nil { - return err - } + // Deprecated: no need to create new release branch + // if err := gr.CheckoutReleaseBranch(mgr.remoteName, relBranch); err != nil { + // return err + // } + // if err := gr.MergeFromRemoteMain(mgr.remoteName); err != nil { + // return err + // } + // if err := gr.PushBranchToRemote(mgr.remoteName, relBranch); err != nil { + // return err + // } if err := gr.CreateLocalReleaseTag(relTag, relBranch); err != nil { return err } diff --git a/releasing/create-release.sh b/releasing/create-release.sh index 41b636290b..81a571e3f3 100755 --- a/releasing/create-release.sh +++ b/releasing/create-release.sh @@ -24,12 +24,8 @@ set -o nounset set -o pipefail declare -a RELEASE_TYPES=("major" "minor" "patch") - -if [[ -z "${1-}" ]]; then - echo "Usage: $0 TAG" - echo " TAG: the tag to build or release, e.g. api/v1.2.3" - exit 1 -fi +upstream_master="master" +origin_master="master" if [[ -z "${2-}" ]]; then echo "Release type not specified, using default value: patch" @@ -39,10 +35,10 @@ elif [[ ! "${RELEASE_TYPES[*]}" =~ "${2}" ]]; then exit 1 fi -git_tag=$1 +module=$1 release_type=$2 -echo "release tag: $git_tag" +echo "module: $module" echo "release type: $release_type" # Build the release binaries for every OS/arch combination. @@ -94,28 +90,31 @@ function build_kustomize_binary { } function create_release { - source ./releasing/helpers.sh - - git_tag=$1 # Take everything before the last slash. # This is expected to match $module. - module=${git_tag%/*} + module=$1 module_slugified=$(echo $module | iconv -t ascii//TRANSLIT | sed -E -e 's/[^[:alnum:]]+/-/g' -e 's/^-+|-+$//g' | tr '[:upper:]' '[:lower:]') # Take everything after the last slash. version=${git_tag##*/} - release_branch="release-${module}/${version}" + determineNextVersion $@ + + release_branch="release-${module}/${nextVersion}" + git_tag="${module}/${nextVersion}" # Create release branch release-{module}/{version} - echo "Creating release..." - createBranch $release_branch "create release branch $release_branch" + echo "Creating release branch $release_branch..." + git fetch --tags upstream $upstream_master + git branch $release_branch $origin_master + git commit -a -m "create release branch $release_branch" || true + git push -f origin $release_branch # Generate the changelog for this release # using the last two tags for the module changelog_file=$(mktemp) - ./releasing/compile-changelog.sh "$module" "HEAD" "$changelog_file" + ./releasing/compile-changelog.sh "${module}" "${git_tag}" "${changelog_file}" additional_release_artifacts_arg="" @@ -125,7 +124,7 @@ function create_release { # build `kustomize` binary if [[ "$module" == "kustomize" ]]; then release_artifact_dir=$(mktemp -d) - build_kustomize_binary "$version" "$release_artifact_dir" + build_kustomize_binary "$nextVersion" "$release_artifact_dir" # additional_release_artifacts_arg+="$release_artifact_dir/*" additional_release_artifacts_arg=("$release_artifact_dir"/*) @@ -147,5 +146,27 @@ function create_release { --notes-file "$changelog_file" } +function determineNextVersion { + currentTag=$(git tag --list "${module}*" --sort=-creatordate | head -n1) + currentVersion=$(echo ${currentTag##*/} | cut -d'v' -f2) + majorVer=$(echo $currentVersion | cut -d'.' -f1) + minorVer=$(echo $currentVersion | cut -d'.' -f2) + patchVer=$(echo $currentVersion | cut -d'.' -f3) + + if [[ ${release_type} == "major" ]]; then + majorVer="$(($majorVer + 1))" + elif [[ ${release_type} == "minor" ]]; then + minorVer="$(($minorVer + 1))" + elif [[ ${release_type} == "patch" ]]; then + patchVer="$(($patchVer + 1))" + else + echo "Error: release_type not supported. Available values 'major', 'minor', 'patch'" + exit 1 + fi + + nextVersion="$majorVer.$minorVer.$patchVer" + return +} + ## create release create_release "$git_tag" From 825f6203b06749a68e9439382e406592f160739a Mon Sep 17 00:00:00 2001 From: Kurnianto Trilaksono Date: Sun, 4 Feb 2024 01:38:11 +0800 Subject: [PATCH 06/21] fix workflow --- .github/workflows/release-api.yml | 13 ++++--- .github/workflows/release-cmd-config.yml | 13 ++++--- .github/workflows/release-kustomize.yml | 15 +++++--- .github/workflows/release-kyaml.yml | 13 ++++--- releasing/create-release.sh | 45 +++++++++++------------- 5 files changed, 58 insertions(+), 41 deletions(-) diff --git a/.github/workflows/release-api.yml b/.github/workflows/release-api.yml index 081ad10d7b..51a6538559 100644 --- a/.github/workflows/release-api.yml +++ b/.github/workflows/release-api.yml @@ -103,16 +103,21 @@ jobs: with: go-version-file: go.work cache-dependency-path: "**/*.sum" - - name: Create release draft + - name: Release api run: | # Prepare git git config --global user.email "development@kustomize.io" git config --global user.name "Development" - ./releasing/compile-changelog.sh api HEAD - - name: Release api - run: | # Release api make install-local-tools gorepomod release api ${{ inputs.release_type }} --local --doIt + - name: Create release changelog + run: | + + # Create release draft + changelog_file=$(mktemp) + currentBranch=$(git rev-parse --abbrev-ref HEAD) + currentTag=${currentBranch#*-} + ./releasing/compile-changelog.sh "api" "${currentTag}" "${changelog_file}" \ No newline at end of file diff --git a/.github/workflows/release-cmd-config.yml b/.github/workflows/release-cmd-config.yml index 161ecfe277..8d09eb9f18 100644 --- a/.github/workflows/release-cmd-config.yml +++ b/.github/workflows/release-cmd-config.yml @@ -109,16 +109,21 @@ jobs: with: go-version-file: go.work cache-dependency-path: "**/*.sum" - - name: Create release draft + - name: Release cmd/config run: | # Prepare git git config --global user.email "development@kustomize.io" git config --global user.name "Development" - ./releasing/compile-changelog.sh cmd/config HEAD - - name: Release cmd/config - run: | # Release cmd/config make install-local-tools gorepomod release cmd/config ${{ inputs.release_type }} --local --doIt + - name: Create release changelog + run: | + + # Create release draft + changelog_file=$(mktemp) + currentBranch=$(git rev-parse --abbrev-ref HEAD) + currentTag=${currentBranch#*-} + ./releasing/compile-changelog.sh "cmd/config" "${currentTag}" "${changelog_file}" \ No newline at end of file diff --git a/.github/workflows/release-kustomize.yml b/.github/workflows/release-kustomize.yml index f8303b4b0e..4af49ad94e 100644 --- a/.github/workflows/release-kustomize.yml +++ b/.github/workflows/release-kustomize.yml @@ -102,16 +102,21 @@ jobs: with: go-version-file: go.work cache-dependency-path: "**/*.sum" - - name: Create release changelog + - name: Release kyaml run: | - + # Prepare git git config --global user.email "development@kustomize.io" git config --global user.name "Development" - ./releasing/compile-changelog.sh kustomize HEAD - - name: Release kyaml - run: | # Release kustomize make install-local-tools gorepomod release kustomize ${{ inputs.release_type }} --local --doIt + - name: Create release changelog + run: | + + # Create release draft + changelog_file=$(mktemp) + currentBranch=$(git rev-parse --abbrev-ref HEAD) + currentTag=${currentBranch#*-} + ./releasing/compile-changelog.sh "kustomize" "${currentTag}" "${changelog_file}" \ No newline at end of file diff --git a/.github/workflows/release-kyaml.yml b/.github/workflows/release-kyaml.yml index 268fe43097..cd107b8b28 100644 --- a/.github/workflows/release-kyaml.yml +++ b/.github/workflows/release-kyaml.yml @@ -80,16 +80,21 @@ jobs: with: go-version-file: go.work cache-dependency-path: "**/*.sum" - - name: Create release changelog + - name: Release kyaml run: | # Prepare git git config --global user.email "development@kustomize.io" git config --global user.name "Development" - ./releasing/compile-changelog.sh kyaml HEAD - - name: Release kyaml - run: | # Release kyaml make install-tools gorepomod release kyaml ${{ inputs.release_type }} --local --doIt + - name: Create release changelog + run: | + + # Create release draft + changelog_file=$(mktemp) + currentBranch=$(git rev-parse --abbrev-ref HEAD) + currentTag=${currentBranch#*-} + ./releasing/compile-changelog.sh "kyaml" "${currentTag}" "${changelog_file}" diff --git a/releasing/create-release.sh b/releasing/create-release.sh index 81a571e3f3..910130d2b6 100755 --- a/releasing/create-release.sh +++ b/releasing/create-release.sh @@ -35,12 +35,6 @@ elif [[ ! "${RELEASE_TYPES[*]}" =~ "${2}" ]]; then exit 1 fi -module=$1 -release_type=$2 - -echo "module: $module" -echo "release type: $release_type" - # Build the release binaries for every OS/arch combination. # It builds compressed artifacts on $release_dir. function build_kustomize_binary { @@ -93,17 +87,9 @@ function create_release { # Take everything before the last slash. # This is expected to match $module. - module=$1 + module=${git_tag%/*} module_slugified=$(echo $module | iconv -t ascii//TRANSLIT | sed -E -e 's/[^[:alnum:]]+/-/g' -e 's/^-+|-+$//g' | tr '[:upper:]' '[:lower:]') - # Take everything after the last slash. - version=${git_tag##*/} - - determineNextVersion $@ - - release_branch="release-${module}/${nextVersion}" - git_tag="${module}/${nextVersion}" - # Create release branch release-{module}/{version} echo "Creating release branch $release_branch..." git fetch --tags upstream $upstream_master @@ -111,11 +97,6 @@ function create_release { git commit -a -m "create release branch $release_branch" || true git push -f origin $release_branch - # Generate the changelog for this release - # using the last two tags for the module - changelog_file=$(mktemp) - ./releasing/compile-changelog.sh "${module}" "${git_tag}" "${changelog_file}" - additional_release_artifacts_arg="" # Trigger workflow for respective modeule release @@ -147,6 +128,7 @@ function create_release { } function determineNextVersion { + module=$1 currentTag=$(git tag --list "${module}*" --sort=-creatordate | head -n1) currentVersion=$(echo ${currentTag##*/} | cut -d'v' -f2) majorVer=$(echo $currentVersion | cut -d'.' -f1) @@ -164,9 +146,24 @@ function determineNextVersion { exit 1 fi - nextVersion="$majorVer.$minorVer.$patchVer" - return + echo "$majorVer.$minorVer.$patchVer" +} + +main() { + + module=$1 + release_type=$2 + nextVersion=$(determineNextVersion $module) + + release_branch="release-${module}/v${nextVersion}" + git_tag="${module}/${nextVersion}" + + echo "module: $module" + echo "release type: $release_type" + echo "tag: ${git_tag}" + + ## create release + create_release "$git_tag" } -## create release -create_release "$git_tag" +main $@ \ No newline at end of file From 4a813b48902fb28d086288447a79a5e1bff34447 Mon Sep 17 00:00:00 2001 From: Kurnianto Trilaksono Date: Sun, 4 Feb 2024 09:48:05 +0800 Subject: [PATCH 07/21] split build-kustomize-libarry from create-release --- .github/workflows/release-api.yml | 10 ++- .github/workflows/release-cmd-config.yml | 8 ++- .github/workflows/release-kustomize.yml | 11 ++-- .github/workflows/release-kyaml.yml | 10 +++ releasing/build-kustomize-library.sh | 79 ++++++++++++++++++++++++ releasing/create-release.sh | 74 ---------------------- 6 files changed, 111 insertions(+), 81 deletions(-) create mode 100755 releasing/build-kustomize-library.sh diff --git a/.github/workflows/release-api.yml b/.github/workflows/release-api.yml index 51a6538559..bc320498a7 100644 --- a/.github/workflows/release-api.yml +++ b/.github/workflows/release-api.yml @@ -90,6 +90,8 @@ jobs: name: Release runs-on: ubuntu-latest needs: build + env: + GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} permissions: contents: write steps: @@ -120,4 +122,10 @@ jobs: changelog_file=$(mktemp) currentBranch=$(git rev-parse --abbrev-ref HEAD) currentTag=${currentBranch#*-} - ./releasing/compile-changelog.sh "api" "${currentTag}" "${changelog_file}" \ No newline at end of file + ./releasing/compile-changelog.sh "api" "${currentTag}" "${changelog_file}" + + # Create github releases + gh release create "${currentTag}" \ + --title "${currentTag}" \ + --draft \ + --notes-file "${changelog_file}" diff --git a/.github/workflows/release-cmd-config.yml b/.github/workflows/release-cmd-config.yml index 8d09eb9f18..a690a68fb8 100644 --- a/.github/workflows/release-cmd-config.yml +++ b/.github/workflows/release-cmd-config.yml @@ -126,4 +126,10 @@ jobs: changelog_file=$(mktemp) currentBranch=$(git rev-parse --abbrev-ref HEAD) currentTag=${currentBranch#*-} - ./releasing/compile-changelog.sh "cmd/config" "${currentTag}" "${changelog_file}" \ No newline at end of file + ./releasing/compile-changelog.sh "cmd/config" "${currentTag}" "${changelog_file}" + + # Create github releases + gh release create "${currentTag}" \ + --title "${currentTag}" \ + --draft \ + --notes-file "${changelog_file}" diff --git a/.github/workflows/release-kustomize.yml b/.github/workflows/release-kustomize.yml index 4af49ad94e..4b6baa68e3 100644 --- a/.github/workflows/release-kustomize.yml +++ b/.github/workflows/release-kustomize.yml @@ -49,6 +49,8 @@ jobs: name: Build runs-on: ubuntu-latest needs: pre-build + env: + GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} steps: - name: Fetch changes uses: actions/checkout@v4 @@ -89,6 +91,8 @@ jobs: name: Release runs-on: ubuntu-latest needs: build + env: + GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} permissions: contents: write steps: @@ -112,11 +116,8 @@ jobs: # Release kustomize make install-local-tools gorepomod release kustomize ${{ inputs.release_type }} --local --doIt - - name: Create release changelog + - name: Build kustomize library and create release run: | # Create release draft - changelog_file=$(mktemp) - currentBranch=$(git rev-parse --abbrev-ref HEAD) - currentTag=${currentBranch#*-} - ./releasing/compile-changelog.sh "kustomize" "${currentTag}" "${changelog_file}" \ No newline at end of file + ./releasing/build-kustomize-library.sh diff --git a/.github/workflows/release-kyaml.yml b/.github/workflows/release-kyaml.yml index cd107b8b28..dd79dedbd8 100644 --- a/.github/workflows/release-kyaml.yml +++ b/.github/workflows/release-kyaml.yml @@ -66,6 +66,8 @@ jobs: release: name: Release needs: build + env: + GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} runs-on: ubuntu-latest permissions: contents: write @@ -98,3 +100,11 @@ jobs: currentBranch=$(git rev-parse --abbrev-ref HEAD) currentTag=${currentBranch#*-} ./releasing/compile-changelog.sh "kyaml" "${currentTag}" "${changelog_file}" + + # Create github releases + gh release create "${currentTag}" \ + --title "${currentTag}" \ + --draft \ + --notes-file "${changelog_file}" + env: + GH_TOKEN: ${{ secrets.GH_TOKEN }} \ No newline at end of file diff --git a/releasing/build-kustomize-library.sh b/releasing/build-kustomize-library.sh new file mode 100755 index 0000000000..7a95ca09b2 --- /dev/null +++ b/releasing/build-kustomize-library.sh @@ -0,0 +1,79 @@ +#!/bin/bash +# Copyright 2024 The Kubernetes Authors. +# SPDX-License-Identifier: Apache-2.0 + +# Build the release binaries for every OS/arch combination. +# It builds compressed artifacts on $release_dir. +function build_kustomize_binary { + echo "build kustomize binaries" + version=$1 + + release_dir=$2 + echo "build release artifacts to $release_dir" + + mkdir -p "output" + # build date in ISO8601 format + build_date=$(date -u +'%Y-%m-%dT%H:%M:%SZ') + for os in linux darwin windows; do + arch_list=(amd64 arm64) + if [ "$os" == "linux" ]; then + arch_list=(amd64 arm64 s390x ppc64le) + fi + for arch in "${arch_list[@]}" ; do + echo "Building $os-$arch" + # CGO_ENABLED=0 GOWORK=off GOOS=$os GOARCH=$arch go build -o output/kustomize -ldflags\ + binary_name="kustomize" + [[ "$os" == "windows" ]] && binary_name="kustomize.exe" + CGO_ENABLED=0 GOOS=$os GOARCH=$arch go build -o output/$binary_name -ldflags\ + "-s -w\ + -X sigs.k8s.io/kustomize/api/provenance.version=$version\ + -X sigs.k8s.io/kustomize/api/provenance.gitCommit=$(git rev-parse HEAD)\ + -X sigs.k8s.io/kustomize/api/provenance.buildDate=$build_date"\ + kustomize/main.go + if [ "$os" == "windows" ]; then + zip -j "${release_dir}/kustomize_${version}_${os}_${arch}.zip" output/$binary_name + else + tar cvfz "${release_dir}/kustomize_${version}_${os}_${arch}.tar.gz" -C output $binary_name + fi + rm output/$binary_name + done + done + + # create checksums.txt + pushd "${release_dir}" + for release in *; do + echo "generate checksum: $release" + sha256sum "$release" >> checksums.txt + done + popd + + rmdir output +} + +main() { + + currentBranch=$(git rev-parse --abbrev-ref HEAD) + currentTag=${currentBranch#*-} + version=${currentBranch##*/} + + if grep -q -E '^[0-9]+(\.[0-9]+)*$' <<< "$version" + then + printf "%s is NOT in semver format.\n" "$version" + exit 1 + fi + + release_artifact_dir=$(mktemp -d) + + additional_release_artifacts_arg=("$release_artifact_dir"/*) + + build_kustomize_binary "${version}" "${release_artifact_dir}" + + # create github releases + gh release create "${currentTag}" \ + --title "${currentTag}"\ + --draft \ + --notes-file "${changelog_file}"\ + "${additional_release_artifacts_arg[@]}" +} + +main $@ \ No newline at end of file diff --git a/releasing/create-release.sh b/releasing/create-release.sh index 910130d2b6..7c36884026 100755 --- a/releasing/create-release.sh +++ b/releasing/create-release.sh @@ -35,54 +35,6 @@ elif [[ ! "${RELEASE_TYPES[*]}" =~ "${2}" ]]; then exit 1 fi -# Build the release binaries for every OS/arch combination. -# It builds compressed artifacts on $release_dir. -function build_kustomize_binary { - echo "build kustomize binaries" - version=$1 - - release_dir=$2 - echo "build release artifacts to $release_dir" - - mkdir -p "output" - # build date in ISO8601 format - build_date=$(date -u +'%Y-%m-%dT%H:%M:%SZ') - for os in linux darwin windows; do - arch_list=(amd64 arm64) - if [ "$os" == "linux" ]; then - arch_list=(amd64 arm64 s390x ppc64le) - fi - for arch in "${arch_list[@]}" ; do - echo "Building $os-$arch" - # CGO_ENABLED=0 GOWORK=off GOOS=$os GOARCH=$arch go build -o output/kustomize -ldflags\ - binary_name="kustomize" - [[ "$os" == "windows" ]] && binary_name="kustomize.exe" - CGO_ENABLED=0 GOOS=$os GOARCH=$arch go build -o output/$binary_name -ldflags\ - "-s -w\ - -X sigs.k8s.io/kustomize/api/provenance.version=$version\ - -X sigs.k8s.io/kustomize/api/provenance.gitCommit=$(git rev-parse HEAD)\ - -X sigs.k8s.io/kustomize/api/provenance.buildDate=$build_date"\ - kustomize/main.go - if [ "$os" == "windows" ]; then - zip -j "${release_dir}/kustomize_${version}_${os}_${arch}.zip" output/$binary_name - else - tar cvfz "${release_dir}/kustomize_${version}_${os}_${arch}.tar.gz" -C output $binary_name - fi - rm output/$binary_name - done - done - - # create checksums.txt - pushd "${release_dir}" - for release in *; do - echo "generate checksum: $release" - sha256sum "$release" >> checksums.txt - done - popd - - rmdir output -} - function create_release { # Take everything before the last slash. @@ -97,34 +49,8 @@ function create_release { git commit -a -m "create release branch $release_branch" || true git push -f origin $release_branch - additional_release_artifacts_arg="" - # Trigger workflow for respective modeule release gh workflow run "release-${module_slugified}.yml" -f "release_type=${release_type}" -f "release_branch=${release_branch}" - - # build `kustomize` binary - if [[ "$module" == "kustomize" ]]; then - release_artifact_dir=$(mktemp -d) - build_kustomize_binary "$nextVersion" "$release_artifact_dir" - - # additional_release_artifacts_arg+="$release_artifact_dir/*" - additional_release_artifacts_arg=("$release_artifact_dir"/*) - - # create github releases - gh release create "$git_tag" \ - --title "$git_tag"\ - --draft \ - --notes-file "$changelog_file"\ - "${additional_release_artifacts_arg[@]}" - - return - fi - - # create github releases - gh release create "$git_tag" \ - --title "$git_tag"\ - --draft \ - --notes-file "$changelog_file" } function determineNextVersion { From 216d9b75907b64bbf52e3e4c4d7a1edebd20896d Mon Sep 17 00:00:00 2001 From: Kurnianto Trilaksono Date: Sun, 4 Feb 2024 11:08:10 +0800 Subject: [PATCH 08/21] fix tagging logic --- .github/workflows/release-api.yml | 4 +++- .github/workflows/release-cmd-config.yml | 4 +++- .github/workflows/release-kyaml.yml | 4 +++- cmd/gorepomod/internal/git/runner.go | 10 ++++++++++ cmd/gorepomod/internal/repo/manager.go | 15 ++++++++++----- releasing/build-kustomize-library.sh | 5 +++-- releasing/create-release.sh | 5 ++++- 7 files changed, 36 insertions(+), 11 deletions(-) diff --git a/.github/workflows/release-api.yml b/.github/workflows/release-api.yml index bc320498a7..528fa5b522 100644 --- a/.github/workflows/release-api.yml +++ b/.github/workflows/release-api.yml @@ -121,7 +121,9 @@ jobs: # Create release draft changelog_file=$(mktemp) currentBranch=$(git rev-parse --abbrev-ref HEAD) - currentTag=${currentBranch#*-} + module=$(echo "${currentBranch}" | cut -d'-' -f1) + version=${currentBranch##*-} + currentTag="${module}/${version}" ./releasing/compile-changelog.sh "api" "${currentTag}" "${changelog_file}" # Create github releases diff --git a/.github/workflows/release-cmd-config.yml b/.github/workflows/release-cmd-config.yml index a690a68fb8..09bff739d0 100644 --- a/.github/workflows/release-cmd-config.yml +++ b/.github/workflows/release-cmd-config.yml @@ -125,7 +125,9 @@ jobs: # Create release draft changelog_file=$(mktemp) currentBranch=$(git rev-parse --abbrev-ref HEAD) - currentTag=${currentBranch#*-} + module=$(echo "${currentBranch}" | cut -d'-' -f1) + version=${currentBranch##*-} + currentTag="${module}/${version}" ./releasing/compile-changelog.sh "cmd/config" "${currentTag}" "${changelog_file}" # Create github releases diff --git a/.github/workflows/release-kyaml.yml b/.github/workflows/release-kyaml.yml index dd79dedbd8..8ccc514cad 100644 --- a/.github/workflows/release-kyaml.yml +++ b/.github/workflows/release-kyaml.yml @@ -98,7 +98,9 @@ jobs: # Create release draft changelog_file=$(mktemp) currentBranch=$(git rev-parse --abbrev-ref HEAD) - currentTag=${currentBranch#*-} + module=$(echo "${currentBranch}" | cut -d'-' -f1) + version=${currentBranch##*-} + currentTag="${module}/${version}" ./releasing/compile-changelog.sh "kyaml" "${currentTag}" "${changelog_file}" # Create github releases diff --git a/cmd/gorepomod/internal/git/runner.go b/cmd/gorepomod/internal/git/runner.go index 5b49f9a5fe..c5fee5e0e9 100644 --- a/cmd/gorepomod/internal/git/runner.go +++ b/cmd/gorepomod/internal/git/runner.go @@ -389,3 +389,13 @@ func (gr *Runner) GetLatestTag(releaseBranch string) (string, error) { func (gr *Runner) GetMainBranch() string { return string(mainBranch) } + +func (gr *Runner) GetCurrentVersion() string { + currentBranchName, err := gr.run(noHarmDone, "rev-parse", "--abbrev-ref", "HEAD") + if err != nil { + _ = fmt.Errorf("error getting current version") + } + // Assuming release branch has this format: release-path/to/module-vX.Y.Z + splitBranchName := strings.Split(currentBranchName, "-") + return splitBranchName[len(splitBranchName)-1] +} diff --git a/cmd/gorepomod/internal/repo/manager.go b/cmd/gorepomod/internal/repo/manager.go index 07b84c770d..06aefdc3c4 100644 --- a/cmd/gorepomod/internal/repo/manager.go +++ b/cmd/gorepomod/internal/repo/manager.go @@ -141,7 +141,14 @@ func (mgr *Manager) Release( target.ShortName(), reps) } - newVersion := target.VersionLocal().Bump(bump) + gr := git.NewLoud(mgr.AbsPath(), doIt, localFlag) + + newVersionString := gr.GetCurrentVersion() + newVersion, err := semver.Parse(newVersionString) + + if err != nil { + _ = fmt.Errorf("error parsing version string") + } if newVersion.Equals(target.VersionRemote()) { return fmt.Errorf( @@ -153,13 +160,11 @@ func (mgr *Manager) Release( newVersion, target.VersionRemote()) } - gr := git.NewLoud(mgr.AbsPath(), doIt, localFlag) - relBranch, relTag := determineBranchAndTag(target, newVersion) fmt.Printf( - "Releasing %s, stepping from %s to %s\n", - target.ShortName(), target.VersionLocal(), newVersion) + "Releasing %s, with version %s\n", + target.ShortName(), newVersion) if err := gr.AssureCleanWorkspace(); err != nil { return err diff --git a/releasing/build-kustomize-library.sh b/releasing/build-kustomize-library.sh index 7a95ca09b2..234b184c20 100755 --- a/releasing/build-kustomize-library.sh +++ b/releasing/build-kustomize-library.sh @@ -53,8 +53,9 @@ function build_kustomize_binary { main() { currentBranch=$(git rev-parse --abbrev-ref HEAD) - currentTag=${currentBranch#*-} - version=${currentBranch##*/} + module=$(echo "${currentBranch}" | cut -d'-' -f1) + version=${currentBranch##*-} + currentTag="${module}/${version}" if grep -q -E '^[0-9]+(\.[0-9]+)*$' <<< "$version" then diff --git a/releasing/create-release.sh b/releasing/create-release.sh index 7c36884026..9043471967 100755 --- a/releasing/create-release.sh +++ b/releasing/create-release.sh @@ -81,7 +81,10 @@ main() { release_type=$2 nextVersion=$(determineNextVersion $module) - release_branch="release-${module}/v${nextVersion}" + # Release branch naming format: release-{module}-{version} + release_branch="release-${module}-v${nextVersion}" + + # Release tag naming format: {module}/{version} git_tag="${module}/${nextVersion}" echo "module: $module" From 608ad4543e9f353072ead66c0598a57d52a1b04f Mon Sep 17 00:00:00 2001 From: Kurnianto Trilaksono Date: Sun, 4 Feb 2024 15:09:17 +0800 Subject: [PATCH 09/21] add testing, add GetCurrentVersionFromHead --- cmd/gorepomod/gorepomod_test.go | 37 ++++++++++++++++++++++++++ cmd/gorepomod/internal/git/runner.go | 4 +-- cmd/gorepomod/internal/repo/manager.go | 2 +- 3 files changed, 40 insertions(+), 3 deletions(-) diff --git a/cmd/gorepomod/gorepomod_test.go b/cmd/gorepomod/gorepomod_test.go index 1d6dd68e38..223127f885 100644 --- a/cmd/gorepomod/gorepomod_test.go +++ b/cmd/gorepomod/gorepomod_test.go @@ -85,3 +85,40 @@ func TestPinCommand(t *testing.T) { assert.Greater(t, len(string(out)), 1) } } + +func TestReleaseCommand(t *testing.T) { + // Assuming gorepomod is installed + var testCases = map[string]struct { + isFork bool + cmd string + }{ + "upstreamWithLocalFlag": { + isFork: false, + cmd: "cd ../.. && gorepomod release kyaml --local", + }, + "upstreamWithNoLocalFlag": { + isFork: false, + cmd: "cd ../.. && gorepomod release kyaml", + }, + "forkWithLocalFlag": { + isFork: true, + cmd: "cd ../.. && gorepomod release kyaml --local", + }, + "forkWithNoLocalFlag": { + isFork: true, + cmd: "cd ../.. && gorepomod release kyaml", + }, + } + + for _, tc := range testCases { + bash, err := exec.LookPath("bash") + if err != nil { + t.Error("bash not found") + } + out, err := exec.Command(bash, "-c", tc.cmd).Output() + if err != nil { + assert.Error(t, err, "exit status 1") + } + assert.Greater(t, len(string(out)), 1) + } +} diff --git a/cmd/gorepomod/internal/git/runner.go b/cmd/gorepomod/internal/git/runner.go index c5fee5e0e9..8db6759cbf 100644 --- a/cmd/gorepomod/internal/git/runner.go +++ b/cmd/gorepomod/internal/git/runner.go @@ -390,12 +390,12 @@ func (gr *Runner) GetMainBranch() string { return string(mainBranch) } -func (gr *Runner) GetCurrentVersion() string { +func (gr *Runner) GetCurrentVersionFromHead() string { currentBranchName, err := gr.run(noHarmDone, "rev-parse", "--abbrev-ref", "HEAD") if err != nil { _ = fmt.Errorf("error getting current version") } // Assuming release branch has this format: release-path/to/module-vX.Y.Z splitBranchName := strings.Split(currentBranchName, "-") - return splitBranchName[len(splitBranchName)-1] + return string(splitBranchName[len(splitBranchName)-1]) } diff --git a/cmd/gorepomod/internal/repo/manager.go b/cmd/gorepomod/internal/repo/manager.go index 06aefdc3c4..a2b5753caa 100644 --- a/cmd/gorepomod/internal/repo/manager.go +++ b/cmd/gorepomod/internal/repo/manager.go @@ -143,7 +143,7 @@ func (mgr *Manager) Release( gr := git.NewLoud(mgr.AbsPath(), doIt, localFlag) - newVersionString := gr.GetCurrentVersion() + newVersionString := gr.GetCurrentVersionFromHead() newVersion, err := semver.Parse(newVersionString) if err != nil { From 1e2d9b706e28cb9125cae8ce0fc3c652841791da Mon Sep 17 00:00:00 2001 From: Kurnianto Trilaksono Date: Sun, 4 Feb 2024 18:19:49 +0800 Subject: [PATCH 10/21] handle getting version from current release branch --- cmd/gorepomod/internal/git/runner.go | 2 +- cmd/gorepomod/internal/repo/manager.go | 25 ++++++++++++++++++++++++- 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/cmd/gorepomod/internal/git/runner.go b/cmd/gorepomod/internal/git/runner.go index 8db6759cbf..34ca8c8911 100644 --- a/cmd/gorepomod/internal/git/runner.go +++ b/cmd/gorepomod/internal/git/runner.go @@ -391,7 +391,7 @@ func (gr *Runner) GetMainBranch() string { } func (gr *Runner) GetCurrentVersionFromHead() string { - currentBranchName, err := gr.run(noHarmDone, "rev-parse", "--abbrev-ref", "HEAD") + currentBranchName, err := gr.run(noHarmDone, "rev-parse", "--abbrev-ref", "release-kyaml-v0.16.3") if err != nil { _ = fmt.Errorf("error getting current version") } diff --git a/cmd/gorepomod/internal/repo/manager.go b/cmd/gorepomod/internal/repo/manager.go index a2b5753caa..81aecd2724 100644 --- a/cmd/gorepomod/internal/repo/manager.go +++ b/cmd/gorepomod/internal/repo/manager.go @@ -6,6 +6,7 @@ package repo import ( "fmt" "strconv" + "strings" "sigs.k8s.io/kustomize/cmd/gorepomod/internal/edit" "sigs.k8s.io/kustomize/cmd/gorepomod/internal/git" @@ -144,11 +145,33 @@ func (mgr *Manager) Release( gr := git.NewLoud(mgr.AbsPath(), doIt, localFlag) newVersionString := gr.GetCurrentVersionFromHead() - newVersion, err := semver.Parse(newVersionString) + + if len(newVersionString) == 0 { + return fmt.Errorf("error getting version from remote") + } + + // TODO(antoooks): workaround to determine new version from release branch + // because Parse() function is buggy. Use Parse() after it's fixed + newVersionStringSplit := strings.Split(newVersionString[1:], ".") + + major, err := strconv.Atoi(strings.TrimSpace(newVersionStringSplit[0])) + + if err != nil { + _ = fmt.Errorf("error parsing version string") + } + + minor, err := strconv.Atoi(strings.TrimSpace(newVersionStringSplit[1])) + + if err != nil { + _ = fmt.Errorf("error parsing version string") + } + + patch, err := strconv.Atoi(strings.TrimSpace(newVersionStringSplit[2])) if err != nil { _ = fmt.Errorf("error parsing version string") } + newVersion := semver.New(major, minor, patch) if newVersion.Equals(target.VersionRemote()) { return fmt.Errorf( From 63c0f7c7fad843957d07ad2d33f5f017d86312e1 Mon Sep 17 00:00:00 2001 From: Kurnianto Trilaksono Date: Sun, 4 Feb 2024 18:21:17 +0800 Subject: [PATCH 11/21] add deprecation notice --- cmd/gorepomod/internal/repo/manager.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmd/gorepomod/internal/repo/manager.go b/cmd/gorepomod/internal/repo/manager.go index 81aecd2724..4079af32f5 100644 --- a/cmd/gorepomod/internal/repo/manager.go +++ b/cmd/gorepomod/internal/repo/manager.go @@ -204,7 +204,8 @@ func (mgr *Manager) Release( if err := gr.AssureCleanWorkspace(); err != nil { return err } - // Deprecated: no need to create new release branch + // Deprecated: no need to create new release branch, + // gorepomod will determine new version to publish based on release branch // if err := gr.CheckoutReleaseBranch(mgr.remoteName, relBranch); err != nil { // return err // } From e6ae913999e3abfe3d5668f0adbab1bdb7b03fb5 Mon Sep 17 00:00:00 2001 From: Kurnianto Trilaksono Date: Sun, 4 Feb 2024 19:18:08 +0800 Subject: [PATCH 12/21] fix build-kustomize and workflow --- .github/workflows/release-api.yml | 15 +++++++-------- .github/workflows/release-cmd-config.yml | 13 +++++-------- .github/workflows/release-kustomize.yml | 16 ++++++++++++---- .github/workflows/release-kyaml.yml | 9 ++++----- cmd/gorepomod/internal/git/runner.go | 23 ++++++++++++----------- cmd/gorepomod/internal/repo/manager.go | 15 ++------------- cmd/gorepomod/main.go | 7 ++++--- releasing/build-kustomize-library.sh | 6 ++---- 8 files changed, 48 insertions(+), 56 deletions(-) diff --git a/.github/workflows/release-api.yml b/.github/workflows/release-api.yml index 528fa5b522..9878c23eca 100644 --- a/.github/workflows/release-api.yml +++ b/.github/workflows/release-api.yml @@ -36,13 +36,13 @@ jobs: - name: Unit test id: unit_test run: | - + # Run unit test echo "Executing unit test" go install github.com/jstemmer/go-junit-report@latest make test-unit-all | go-junit-report -set-exit-code > report.xml - name: Test Summary - uses: test-summary/action@v1 + uses: test-summary/action@v2 with: paths: | ./report.xml @@ -51,6 +51,8 @@ jobs: name: Build runs-on: ubuntu-latest needs: pre-build + env: + GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} steps: - name: Fetch changes uses: actions/checkout@v4 @@ -74,8 +76,8 @@ jobs: git remote -v # Pin dependencies: kyaml, cmd/config - gorepomod pin kyaml --local --doIt - gorepomod pin cmd/config --local --doIt + gorepomod pin kyaml v0.16.0 --local --doIt + gorepomod pin cmd/config v0.13.0 --local --doIt - name: Build api run: | make build-kustomize-api @@ -120,10 +122,7 @@ jobs: # Create release draft changelog_file=$(mktemp) - currentBranch=$(git rev-parse --abbrev-ref HEAD) - module=$(echo "${currentBranch}" | cut -d'-' -f1) - version=${currentBranch##*-} - currentTag="${module}/${version}" + currentTag=$(git describe --tags) ./releasing/compile-changelog.sh "api" "${currentTag}" "${changelog_file}" # Create github releases diff --git a/.github/workflows/release-cmd-config.yml b/.github/workflows/release-cmd-config.yml index 09bff739d0..6bcfb51d95 100644 --- a/.github/workflows/release-cmd-config.yml +++ b/.github/workflows/release-cmd-config.yml @@ -36,13 +36,13 @@ jobs: - name: Unit test id: unit_test run: | - + # Run unit test echo "Executing unit test" go install github.com/jstemmer/go-junit-report@latest make test-unit-all | go-junit-report -set-exit-code > report.xml - name: Test Summary - uses: test-summary/action@v1 + uses: test-summary/action@v2 with: paths: | ./report.xml @@ -79,7 +79,7 @@ jobs: git remote -v # Pin dependencies: kyaml - gorepomod pin kyaml --local --doIt + gorepomod pin kyaml v0.16.0 --local --doIt - name: Build test run: | make build-kustomize-api @@ -88,7 +88,7 @@ jobs: # Commit pinned dependencies and handle no commit git add --all - git commit -m "pin kyaml, cmd/config" || true + git commit -m "pin kyaml" || true git push release: name: Release @@ -124,10 +124,7 @@ jobs: # Create release draft changelog_file=$(mktemp) - currentBranch=$(git rev-parse --abbrev-ref HEAD) - module=$(echo "${currentBranch}" | cut -d'-' -f1) - version=${currentBranch##*-} - currentTag="${module}/${version}" + currentTag=$(git describe --tags) ./releasing/compile-changelog.sh "cmd/config" "${currentTag}" "${changelog_file}" # Create github releases diff --git a/.github/workflows/release-kustomize.yml b/.github/workflows/release-kustomize.yml index 4b6baa68e3..040206207a 100644 --- a/.github/workflows/release-kustomize.yml +++ b/.github/workflows/release-kustomize.yml @@ -28,9 +28,16 @@ jobs: with: fetch-depth: 0 ref: ${{ inputs.release_branch }} + - name: Set up Go 1.x + uses: actions/setup-go@v5 + with: + go-version-file: go.work + cache-dependency-path: "**/*.sum" - name: Unit test id: unit_test run: | + + # Run unit test echo "Executing unit test" go install github.com/jstemmer/go-junit-report@latest make test-unit-all | go-junit-report -set-exit-code > report.xml @@ -40,7 +47,7 @@ jobs: go-version-file: go.work cache-dependency-path: "**/*.sum" - name: Test Summary - uses: test-summary/action@v1 + uses: test-summary/action@v2 with: paths: | ./report.xml @@ -74,9 +81,10 @@ jobs: git remote -v # Pin dependencies: kyaml, cmd/config, api - gorepomod pin kyaml --local --doIt - gorepomod pin cmd/config --local --doIt - gorepomod pin api --local --doIt + # TODO: delete hardcoded version after stable + gorepomod pin kyaml v0.16.0 --doIt + gorepomod pin cmd/config v0.13.0 --doIt + gorepomod pin api v0.16.0 --doIt - name: Build test run: | make build-kustomize-api diff --git a/.github/workflows/release-kyaml.yml b/.github/workflows/release-kyaml.yml index 8ccc514cad..4517766deb 100644 --- a/.github/workflows/release-kyaml.yml +++ b/.github/workflows/release-kyaml.yml @@ -36,11 +36,13 @@ jobs: - name: Unit test id: unit_test run: | + + # Run unit test echo "Executing unit test" go install github.com/jstemmer/go-junit-report@latest make test-unit-all | go-junit-report -set-exit-code > report.xml - name: Test Summary - uses: test-summary/action@v1 + uses: test-summary/action@v2 with: paths: | ./report.xml @@ -97,10 +99,7 @@ jobs: # Create release draft changelog_file=$(mktemp) - currentBranch=$(git rev-parse --abbrev-ref HEAD) - module=$(echo "${currentBranch}" | cut -d'-' -f1) - version=${currentBranch##*-} - currentTag="${module}/${version}" + currentTag=$(git describe --tags) ./releasing/compile-changelog.sh "kyaml" "${currentTag}" "${changelog_file}" # Create github releases diff --git a/cmd/gorepomod/internal/git/runner.go b/cmd/gorepomod/internal/git/runner.go index 34ca8c8911..629f216bf0 100644 --- a/cmd/gorepomod/internal/git/runner.go +++ b/cmd/gorepomod/internal/git/runner.go @@ -366,21 +366,22 @@ func (gr *Runner) DeleteTagFromRemote( return gr.runNoOut(undoPainful, "push", string(remote), ":"+refsTags+tag) } -func (gr *Runner) GetLatestTag(releaseBranch string) (string, error) { +func (gr *Runner) GetLatestTag(releaseTag string) (string, error) { var latestTag string - // Assuming release branch has this format: release-path/to/module-vX.Y.Z - // and each release branch maintains tags, extract version from latest `releaseBranch` - gr.comment("extract version from latest release branch") - filteredBranchList, err := gr.run(noHarmDone, "branch", "-a", "--list", "*"+releaseBranch+"*", "--sort=-committerdate") - if len(filteredBranchList) < 1 { - _ = fmt.Errorf("latest tag not found for %s", releaseBranch) + // Assuming release branch has this format: module/vX.Y.Z + gr.comment("extract version from latest release tag") + + // Using `creatordate` sort key as it is more accurate + filteredTagList, err := gr.run(noHarmDone, "tag", "-l", "--sort=-creatordate", releaseTag+"*") + if len(filteredTagList) < 1 { + _ = fmt.Errorf("latest tag not found for %s", releaseTag) return "", err } - newestBranch := strings.Split(strings.ReplaceAll(filteredBranchList, "\r\n", "\n"), "\n") - split := strings.Split(newestBranch[0], "-") + newestTag := strings.Split(strings.ReplaceAll(filteredTagList, "\r\n", "\n"), "\n") + split := strings.Split(newestTag[0], "/") latestTag = split[len(split)-1] if err != nil { - _ = fmt.Errorf("error getting latest tag for %s", releaseBranch) + _ = fmt.Errorf("error getting latest tag for %s", releaseTag) } return latestTag, nil @@ -391,7 +392,7 @@ func (gr *Runner) GetMainBranch() string { } func (gr *Runner) GetCurrentVersionFromHead() string { - currentBranchName, err := gr.run(noHarmDone, "rev-parse", "--abbrev-ref", "release-kyaml-v0.16.3") + currentBranchName, err := gr.run(noHarmDone, "rev-parse", "--abbrev-ref", "HEAD") if err != nil { _ = fmt.Errorf("error getting current version") } diff --git a/cmd/gorepomod/internal/repo/manager.go b/cmd/gorepomod/internal/repo/manager.go index 4079af32f5..6b21af458e 100644 --- a/cmd/gorepomod/internal/repo/manager.go +++ b/cmd/gorepomod/internal/repo/manager.go @@ -84,8 +84,8 @@ func (mgr *Manager) List() error { // Auto-update local tags gr := git.NewQuiet(mgr.AbsPath(), false, false) for _, module := range mgr.modules { - releaseBranch := fmt.Sprintf("release-%s", module.ShortName()) - _, err := gr.GetLatestTag(releaseBranch) + releaseTag := string(module.ShortName()) + _, err := gr.GetLatestTag(releaseTag) if err != nil { return fmt.Errorf("failed getting latest tags for %s", module) } @@ -204,17 +204,6 @@ func (mgr *Manager) Release( if err := gr.AssureCleanWorkspace(); err != nil { return err } - // Deprecated: no need to create new release branch, - // gorepomod will determine new version to publish based on release branch - // if err := gr.CheckoutReleaseBranch(mgr.remoteName, relBranch); err != nil { - // return err - // } - // if err := gr.MergeFromRemoteMain(mgr.remoteName); err != nil { - // return err - // } - // if err := gr.PushBranchToRemote(mgr.remoteName, relBranch); err != nil { - // return err - // } if err := gr.CreateLocalReleaseTag(relTag, relBranch); err != nil { return err } diff --git a/cmd/gorepomod/main.go b/cmd/gorepomod/main.go index 9fe091800d..22258ec3e5 100644 --- a/cmd/gorepomod/main.go +++ b/cmd/gorepomod/main.go @@ -83,9 +83,9 @@ func actualMain() error { if v.IsZero() { // Always use latest tag while does not removing manual usage capability - releaseBranch := fmt.Sprintf("release-%s", targetModule.ShortName()) - fmt.Printf("new version not specified, fall back to latest version according to release branch: %s-*\n", releaseBranch) - latest, err := gr.GetLatestTag(releaseBranch) + releaseTag := string(targetModule.ShortName()) + fmt.Printf("new version not specified, fall back to latest version according to release tag: %s/*\n", releaseTag) + latest, err := gr.GetLatestTag(releaseTag) if err != nil { v = targetModule.VersionLocal() err = mgr.Pin(args.DoIt(), targetModule, v) @@ -94,6 +94,7 @@ func actualMain() error { } return nil } + fmt.Printf("setting release tag to %s ...\n", latest) v, err = semver.Parse(latest) if err != nil { v = targetModule.VersionLocal() diff --git a/releasing/build-kustomize-library.sh b/releasing/build-kustomize-library.sh index 234b184c20..16486f552b 100755 --- a/releasing/build-kustomize-library.sh +++ b/releasing/build-kustomize-library.sh @@ -52,10 +52,8 @@ function build_kustomize_binary { main() { - currentBranch=$(git rev-parse --abbrev-ref HEAD) - module=$(echo "${currentBranch}" | cut -d'-' -f1) - version=${currentBranch##*-} - currentTag="${module}/${version}" + currentTag=$(git describe --tags) + version=${currentTag##*/} if grep -q -E '^[0-9]+(\.[0-9]+)*$' <<< "$version" then From 898772b753acb1f7c3ae2137fee5b676fc63d570 Mon Sep 17 00:00:00 2001 From: Kurnianto Trilaksono Date: Tue, 13 Feb 2024 01:15:54 +0700 Subject: [PATCH 13/21] remove hardcoded versions --- .github/workflows/release-api.yml | 4 ++-- .github/workflows/release-cmd-config.yml | 2 +- .github/workflows/release-kustomize.yml | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/release-api.yml b/.github/workflows/release-api.yml index 9878c23eca..1350a7b7f0 100644 --- a/.github/workflows/release-api.yml +++ b/.github/workflows/release-api.yml @@ -76,8 +76,8 @@ jobs: git remote -v # Pin dependencies: kyaml, cmd/config - gorepomod pin kyaml v0.16.0 --local --doIt - gorepomod pin cmd/config v0.13.0 --local --doIt + gorepomod pin kyaml --local --doIt + gorepomod pin cmd/config --local --doIt - name: Build api run: | make build-kustomize-api diff --git a/.github/workflows/release-cmd-config.yml b/.github/workflows/release-cmd-config.yml index 6bcfb51d95..cc233d58b4 100644 --- a/.github/workflows/release-cmd-config.yml +++ b/.github/workflows/release-cmd-config.yml @@ -79,7 +79,7 @@ jobs: git remote -v # Pin dependencies: kyaml - gorepomod pin kyaml v0.16.0 --local --doIt + gorepomod pin kyaml --local --doIt - name: Build test run: | make build-kustomize-api diff --git a/.github/workflows/release-kustomize.yml b/.github/workflows/release-kustomize.yml index 040206207a..c066596837 100644 --- a/.github/workflows/release-kustomize.yml +++ b/.github/workflows/release-kustomize.yml @@ -77,14 +77,14 @@ jobs: # Prepare git git config --global user.email "development@kustomize.io" git config --global user.name "Development" + # TODO: change to kustomize token and url git remote add upstream "https://x-access-token:${GITHUB_TOKEN}@github.com/antoooks/kustomize.git" git remote -v # Pin dependencies: kyaml, cmd/config, api - # TODO: delete hardcoded version after stable - gorepomod pin kyaml v0.16.0 --doIt - gorepomod pin cmd/config v0.13.0 --doIt - gorepomod pin api v0.16.0 --doIt + gorepomod pin kyaml --local --doIt + gorepomod pin cmd/config --local --doIt + gorepomod pin api --local --doIt - name: Build test run: | make build-kustomize-api From cb1f7a6167bd65be23b1aedc8686eebd75e0687d Mon Sep 17 00:00:00 2001 From: Kurnianto Trilaksono Date: Tue, 20 Feb 2024 00:20:37 +0800 Subject: [PATCH 14/21] improve persing to clean CRLF --- cmd/gorepomod/internal/repo/manager.go | 24 +++--------------------- cmd/gorepomod/internal/semver/semver.go | 1 + 2 files changed, 4 insertions(+), 21 deletions(-) diff --git a/cmd/gorepomod/internal/repo/manager.go b/cmd/gorepomod/internal/repo/manager.go index 6b21af458e..acfa844866 100644 --- a/cmd/gorepomod/internal/repo/manager.go +++ b/cmd/gorepomod/internal/repo/manager.go @@ -144,34 +144,16 @@ func (mgr *Manager) Release( gr := git.NewLoud(mgr.AbsPath(), doIt, localFlag) - newVersionString := gr.GetCurrentVersionFromHead() + newVersionString := strings.Split(gr.GetCurrentVersionFromHead(), "/") if len(newVersionString) == 0 { return fmt.Errorf("error getting version from remote") } - // TODO(antoooks): workaround to determine new version from release branch - // because Parse() function is buggy. Use Parse() after it's fixed - newVersionStringSplit := strings.Split(newVersionString[1:], ".") - - major, err := strconv.Atoi(strings.TrimSpace(newVersionStringSplit[0])) - - if err != nil { - _ = fmt.Errorf("error parsing version string") - } - - minor, err := strconv.Atoi(strings.TrimSpace(newVersionStringSplit[1])) - - if err != nil { - _ = fmt.Errorf("error parsing version string") - } - - patch, err := strconv.Atoi(strings.TrimSpace(newVersionStringSplit[2])) - + newVersion, err := semver.Parse(newVersionString[1]) if err != nil { - _ = fmt.Errorf("error parsing version string") + return fmt.Errorf("error parsing version string: \"%s\"", newVersionString) } - newVersion := semver.New(major, minor, patch) if newVersion.Equals(target.VersionRemote()) { return fmt.Errorf( diff --git a/cmd/gorepomod/internal/semver/semver.go b/cmd/gorepomod/internal/semver/semver.go index e8d445f401..e84b6d29e8 100644 --- a/cmd/gorepomod/internal/semver/semver.go +++ b/cmd/gorepomod/internal/semver/semver.go @@ -38,6 +38,7 @@ func (v Versions) Less(i, j int) bool { return v[j].LessThan(v[i]) } func (v Versions) Swap(i, j int) { v[i], v[j] = v[j], v[i] } func Parse(raw string) (SemVer, error) { + raw = strings.Trim(raw, "\r\n") if len(raw) < 6 { // e.g. minimal length is 6, e.g. "v1.2.3" return zero, fmt.Errorf("%q too short to be a version", raw) From 8b5ea3d0fd5da18e847d607cea14de0b22e2b95c Mon Sep 17 00:00:00 2001 From: Kurnianto Trilaksono Date: Sun, 12 May 2024 20:13:41 +0800 Subject: [PATCH 15/21] make create-release script to work with release branch and bugixes --- .github/workflows/release-api.yml | 6 +-- .github/workflows/release-cmd-config.yml | 4 +- .github/workflows/release-kustomize.yml | 34 ++++++++++---- .github/workflows/release-kyaml.yml | 3 +- cmd/gorepomod/internal/git/runner.go | 4 +- cmd/gorepomod/internal/repo/manager.go | 8 ++-- ...e-library.sh => build-kustomize-binary.sh} | 17 ++----- releasing/determine-next-version.sh | 46 +++++++++++++++++++ 8 files changed, 90 insertions(+), 32 deletions(-) rename releasing/{build-kustomize-library.sh => build-kustomize-binary.sh} (87%) create mode 100755 releasing/determine-next-version.sh diff --git a/.github/workflows/release-api.yml b/.github/workflows/release-api.yml index 1350a7b7f0..0cf7b216da 100644 --- a/.github/workflows/release-api.yml +++ b/.github/workflows/release-api.yml @@ -26,7 +26,7 @@ jobs: - name: Fetch changes uses: actions/checkout@v4 with: - fetch-depth: 0 + fetch-depth: 10 ref: ${{ inputs.release_branch }} - name: Set up Go 1.x uses: actions/setup-go@v5 @@ -76,8 +76,8 @@ jobs: git remote -v # Pin dependencies: kyaml, cmd/config - gorepomod pin kyaml --local --doIt - gorepomod pin cmd/config --local --doIt + gorepomod pin kyaml v0.17.0 --local --doIt + gorepomod pin cmd/config v0.14.0 --local --doIt - name: Build api run: | make build-kustomize-api diff --git a/.github/workflows/release-cmd-config.yml b/.github/workflows/release-cmd-config.yml index cc233d58b4..64200013f5 100644 --- a/.github/workflows/release-cmd-config.yml +++ b/.github/workflows/release-cmd-config.yml @@ -26,7 +26,7 @@ jobs: - name: Fetch changes uses: actions/checkout@v4 with: - fetch-depth: 0 + fetch-depth: 10 ref: ${{ inputs.release_branch }} - name: Set up Go 1.x uses: actions/setup-go@v5 @@ -79,7 +79,7 @@ jobs: git remote -v # Pin dependencies: kyaml - gorepomod pin kyaml --local --doIt + gorepomod pin kyaml v0.17.0 --local --doIt - name: Build test run: | make build-kustomize-api diff --git a/.github/workflows/release-kustomize.yml b/.github/workflows/release-kustomize.yml index c066596837..f1fd1167a1 100644 --- a/.github/workflows/release-kustomize.yml +++ b/.github/workflows/release-kustomize.yml @@ -26,7 +26,7 @@ jobs: - name: Fetch changes uses: actions/checkout@v4 with: - fetch-depth: 0 + fetch-depth: 10 ref: ${{ inputs.release_branch }} - name: Set up Go 1.x uses: actions/setup-go@v5 @@ -82,12 +82,16 @@ jobs: git remote -v # Pin dependencies: kyaml, cmd/config, api - gorepomod pin kyaml --local --doIt - gorepomod pin cmd/config --local --doIt - gorepomod pin api --local --doIt + gorepomod pin kyaml v0.17.0 --local --doIt + gorepomod pin cmd/config v0.14.0 --local --doIt + gorepomod pin api v0.17.1 --local --doIt - name: Build test run: | make build-kustomize-api + - name: End-to-end test + run: | + export latestVersion=$(./releasing/determine-next-version.sh kustomize ${{ inputs.release_type }}) + sed -i -e "s/LATEST_RELEASE=.*/LATEST_RELEASE=$latestVersion/g" Makefile - name: Commit pinned dependencies run: | @@ -114,7 +118,7 @@ jobs: with: go-version-file: go.work cache-dependency-path: "**/*.sum" - - name: Release kyaml + - name: Release kustomize run: | # Prepare git @@ -124,8 +128,22 @@ jobs: # Release kustomize make install-local-tools gorepomod release kustomize ${{ inputs.release_type }} --local --doIt - - name: Build kustomize library and create release + - name: Build kustomize binary and create release run: | - # Create release draft - ./releasing/build-kustomize-library.sh + # Build kustomize binary + ./releasing/build-kustomize-binary.sh + + # Compile changelog + changelog_file=$(mktemp) + currentTag=$(git describe --tags) + ./releasing/compile-changelog.sh "kustomize" "${currentTag}" "${changelog_file}" + + # Create github releases + export additional_release_artifacts_arg=("dist"/*) + + gh release create "${currentTag}" \ + --title "${currentTag}" \ + --draft \ + --notes-file "${changelog_file}" \ + "${additional_release_artifacts_arg[@]}" diff --git a/.github/workflows/release-kyaml.yml b/.github/workflows/release-kyaml.yml index 4517766deb..5b63b68ada 100644 --- a/.github/workflows/release-kyaml.yml +++ b/.github/workflows/release-kyaml.yml @@ -26,7 +26,7 @@ jobs: - name: Fetch changes uses: actions/checkout@v4 with: - fetch-depth: 0 + fetch-depth: 10 ref: ${{ inputs.release_branch }} - name: Set up Go 1.x uses: actions/setup-go@v5 @@ -90,6 +90,7 @@ jobs: # Prepare git git config --global user.email "development@kustomize.io" git config --global user.name "Development" + git checkout ${{inputs.release_branch}} # Release kyaml make install-tools diff --git a/cmd/gorepomod/internal/git/runner.go b/cmd/gorepomod/internal/git/runner.go index 629f216bf0..f988307b03 100644 --- a/cmd/gorepomod/internal/git/runner.go +++ b/cmd/gorepomod/internal/git/runner.go @@ -391,8 +391,8 @@ func (gr *Runner) GetMainBranch() string { return string(mainBranch) } -func (gr *Runner) GetCurrentVersionFromHead() string { - currentBranchName, err := gr.run(noHarmDone, "rev-parse", "--abbrev-ref", "HEAD") +func (gr *Runner) GetCurrentVersionFromBranchName() string { + currentBranchName, err := gr.run(noHarmDone, "branch", "--show-current") if err != nil { _ = fmt.Errorf("error getting current version") } diff --git a/cmd/gorepomod/internal/repo/manager.go b/cmd/gorepomod/internal/repo/manager.go index acfa844866..ae6c113515 100644 --- a/cmd/gorepomod/internal/repo/manager.go +++ b/cmd/gorepomod/internal/repo/manager.go @@ -6,7 +6,6 @@ package repo import ( "fmt" "strconv" - "strings" "sigs.k8s.io/kustomize/cmd/gorepomod/internal/edit" "sigs.k8s.io/kustomize/cmd/gorepomod/internal/git" @@ -144,17 +143,18 @@ func (mgr *Manager) Release( gr := git.NewLoud(mgr.AbsPath(), doIt, localFlag) - newVersionString := strings.Split(gr.GetCurrentVersionFromHead(), "/") + // e.g. get v0.17.1 from release-kyaml-v0.17.1 + // guaranteed to be the newest version because bumping is done in ./releasing/create-release.sh + newVersionString := gr.GetCurrentVersionFromBranchName() if len(newVersionString) == 0 { return fmt.Errorf("error getting version from remote") } - newVersion, err := semver.Parse(newVersionString[1]) + newVersion, err := semver.Parse(string(newVersionString)) if err != nil { return fmt.Errorf("error parsing version string: \"%s\"", newVersionString) } - if newVersion.Equals(target.VersionRemote()) { return fmt.Errorf( "version %s already exists on remote - delete it first", newVersion) diff --git a/releasing/build-kustomize-library.sh b/releasing/build-kustomize-binary.sh similarity index 87% rename from releasing/build-kustomize-library.sh rename to releasing/build-kustomize-binary.sh index 16486f552b..06cdc0a2e4 100755 --- a/releasing/build-kustomize-library.sh +++ b/releasing/build-kustomize-binary.sh @@ -6,12 +6,14 @@ # It builds compressed artifacts on $release_dir. function build_kustomize_binary { echo "build kustomize binaries" + version=$1 - release_dir=$2 + echo "build release artifacts to $release_dir" mkdir -p "output" + # build date in ISO8601 format build_date=$(date -u +'%Y-%m-%dT%H:%M:%SZ') for os in linux darwin windows; do @@ -61,18 +63,9 @@ main() { exit 1 fi - release_artifact_dir=$(mktemp -d) - - additional_release_artifacts_arg=("$release_artifact_dir"/*) - + mkdir -p dist + release_artifact_dir=${PWD}/dist build_kustomize_binary "${version}" "${release_artifact_dir}" - - # create github releases - gh release create "${currentTag}" \ - --title "${currentTag}"\ - --draft \ - --notes-file "${changelog_file}"\ - "${additional_release_artifacts_arg[@]}" } main $@ \ No newline at end of file diff --git a/releasing/determine-next-version.sh b/releasing/determine-next-version.sh new file mode 100755 index 0000000000..e06ac22b9f --- /dev/null +++ b/releasing/determine-next-version.sh @@ -0,0 +1,46 @@ +#!/bin/bash + +set -eo pipefail +set -o nounset + +declare -a RELEASE_TYPES=("major" "minor" "patch") + +if [[ -z "${2-}" ]]; then + echo "Release type not specified, using default value: patch" + release_type="patch" +elif [[ ! "${RELEASE_TYPES[*]}" =~ "${2}" ]]; then + echo "Unsupported release type, only input these values: major, minor, patch." + exit 1 +fi + +function determineNextVersion { + module=$1 + currentTag=$(git tag --list "${module}*" --sort=-creatordate | head -n1) + currentVersion=$(echo ${currentTag##*/} | cut -d'v' -f2) + majorVer=$(echo $currentVersion | cut -d'.' -f1) + minorVer=$(echo $currentVersion | cut -d'.' -f2) + patchVer=$(echo $currentVersion | cut -d'.' -f3) + + if [[ ${release_type} == "major" ]]; then + majorVer="$(($majorVer + 1))" + elif [[ ${release_type} == "minor" ]]; then + minorVer="$(($minorVer + 1))" + elif [[ ${release_type} == "patch" ]]; then + patchVer="$(($patchVer + 1))" + else + echo "Error: release_type not supported. Available values 'major', 'minor', 'patch'" + exit 1 + fi + + echo "$majorVer.$minorVer.$patchVer" +} + +main() { + module=$1 + release_type=$2 + nextVersion=$(determineNextVersion $module) + echo "v$nextVersion" + exit 0 +} + +main "$@" From 68d6994d5debc7f51f493fa67a065366a292436d Mon Sep 17 00:00:00 2001 From: Kurnianto Trilaksono Date: Thu, 30 May 2024 01:03:31 +0800 Subject: [PATCH 16/21] remove hardcoded versions --- .github/workflows/release-api.yml | 4 ++-- .github/workflows/release-cmd-config.yml | 2 +- .github/workflows/release-kustomize.yml | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release-api.yml b/.github/workflows/release-api.yml index 0cf7b216da..3b6111f6ae 100644 --- a/.github/workflows/release-api.yml +++ b/.github/workflows/release-api.yml @@ -76,8 +76,8 @@ jobs: git remote -v # Pin dependencies: kyaml, cmd/config - gorepomod pin kyaml v0.17.0 --local --doIt - gorepomod pin cmd/config v0.14.0 --local --doIt + gorepomod pin kyaml --local --doIt + gorepomod pin cmd/config --local --doIt - name: Build api run: | make build-kustomize-api diff --git a/.github/workflows/release-cmd-config.yml b/.github/workflows/release-cmd-config.yml index 64200013f5..c1142375bf 100644 --- a/.github/workflows/release-cmd-config.yml +++ b/.github/workflows/release-cmd-config.yml @@ -79,7 +79,7 @@ jobs: git remote -v # Pin dependencies: kyaml - gorepomod pin kyaml v0.17.0 --local --doIt + gorepomod pin kyaml --local --doIt - name: Build test run: | make build-kustomize-api diff --git a/.github/workflows/release-kustomize.yml b/.github/workflows/release-kustomize.yml index f1fd1167a1..0677a5c707 100644 --- a/.github/workflows/release-kustomize.yml +++ b/.github/workflows/release-kustomize.yml @@ -82,9 +82,9 @@ jobs: git remote -v # Pin dependencies: kyaml, cmd/config, api - gorepomod pin kyaml v0.17.0 --local --doIt - gorepomod pin cmd/config v0.14.0 --local --doIt - gorepomod pin api v0.17.1 --local --doIt + gorepomod pin kyaml --local --doIt + gorepomod pin cmd/config --local --doIt + gorepomod pin api --local --doIt - name: Build test run: | make build-kustomize-api From f6d6185dc2ed7b260432b5e305567ebd71d6929c Mon Sep 17 00:00:00 2001 From: Kurnianto Trilaksono Date: Fri, 31 May 2024 01:01:58 +0800 Subject: [PATCH 17/21] fix linting errors --- cmd/gorepomod/internal/git/runner.go | 2 +- cmd/gorepomod/internal/repo/manager.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/gorepomod/internal/git/runner.go b/cmd/gorepomod/internal/git/runner.go index f988307b03..136287623e 100644 --- a/cmd/gorepomod/internal/git/runner.go +++ b/cmd/gorepomod/internal/git/runner.go @@ -398,5 +398,5 @@ func (gr *Runner) GetCurrentVersionFromBranchName() string { } // Assuming release branch has this format: release-path/to/module-vX.Y.Z splitBranchName := strings.Split(currentBranchName, "-") - return string(splitBranchName[len(splitBranchName)-1]) + return splitBranchName[len(splitBranchName)-1] } diff --git a/cmd/gorepomod/internal/repo/manager.go b/cmd/gorepomod/internal/repo/manager.go index ae6c113515..d64eb162b4 100644 --- a/cmd/gorepomod/internal/repo/manager.go +++ b/cmd/gorepomod/internal/repo/manager.go @@ -151,7 +151,7 @@ func (mgr *Manager) Release( return fmt.Errorf("error getting version from remote") } - newVersion, err := semver.Parse(string(newVersionString)) + newVersion, err := semver.Parse(newVersionString) if err != nil { return fmt.Errorf("error parsing version string: \"%s\"", newVersionString) } From 9c165008102b16cf84a09a8a11e6f82a68425083 Mon Sep 17 00:00:00 2001 From: Kurnianto Trilaksono Date: Fri, 31 May 2024 01:37:03 +0800 Subject: [PATCH 18/21] add license --- releasing/determine-next-version.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/releasing/determine-next-version.sh b/releasing/determine-next-version.sh index e06ac22b9f..0a70f3116d 100755 --- a/releasing/determine-next-version.sh +++ b/releasing/determine-next-version.sh @@ -1,4 +1,6 @@ #!/bin/bash +# Copyright 2024 The Kubernetes Authors. +# SPDX-License-Identifier: Apache-2.0 set -eo pipefail set -o nounset From 173ce66c25425620777f81f09356be26609ac978 Mon Sep 17 00:00:00 2001 From: Kurnianto Trilaksono Date: Fri, 31 May 2024 02:10:28 +0800 Subject: [PATCH 19/21] add semver trailing CRLF removal testing --- cmd/gorepomod/internal/semver/semver_test.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cmd/gorepomod/internal/semver/semver_test.go b/cmd/gorepomod/internal/semver/semver_test.go index 21759d25f9..a33ef4de9f 100644 --- a/cmd/gorepomod/internal/semver/semver_test.go +++ b/cmd/gorepomod/internal/semver/semver_test.go @@ -38,6 +38,11 @@ func TestParse(t *testing.T) { v: zero, errMsg: "\"v1.222\" doesn't have the form v1.2.3", }, + "trailing CRLF": { + raw: "v1.2.3\r\n", + v: SemVer{major: 1, minor: 2, patch: 3}, + errMsg: "", + }, } for n, tc := range testCases { v, err := Parse(tc.raw) From 84d033a2300423217ce4f1f3ec9208d0b638f5b3 Mon Sep 17 00:00:00 2001 From: Kurnianto Trilaksono Date: Sat, 29 Jun 2024 20:32:01 +0800 Subject: [PATCH 20/21] Revert "revert unintended changes" This reverts commit a94a5ac81c7e7330d897ad2e63561b721674fa1a. --- .../builtinpluginconsts/namereference.go | 7 - api/internal/target/kusttarget.go | 2 +- api/krusty/namereference_test.go | 82 ------ cmd/config/internal/commands/run-fns.go | 2 +- cmd/config/internal/inpututil/inpututil.go | 2 +- go.work.sum | 252 ------------------ hack/go.mod | 38 +-- hack/go.sum | 77 +++--- .../commands/edit/remove/removemetadata.go | 2 +- .../internal/kustfile/kustomizationfile.go | 2 - .../kustfile/kustomizationfile_test.go | 229 ---------------- kustomize/commands/localize/localize.go | 66 +---- kustomize/commands/localize/localize_test.go | 76 ------ kustomize/go.mod | 1 - kustomize/go.sum | 5 - 15 files changed, 70 insertions(+), 773 deletions(-) diff --git a/api/internal/konfig/builtinpluginconsts/namereference.go b/api/internal/konfig/builtinpluginconsts/namereference.go index 383dcf83ea..658b0c34b9 100644 --- a/api/internal/konfig/builtinpluginconsts/namereference.go +++ b/api/internal/konfig/builtinpluginconsts/namereference.go @@ -421,13 +421,6 @@ nameReference: fieldSpecs: - path: spec/ingressClassName kind: Ingress - -- kind: ValidatingAdmissionPolicy - group: admissionregistration.k8s.io - fieldSpecs: - - path: spec/policyName - kind: ValidatingAdmissionPolicyBinding - group: admissionregistration.k8s.io ` ) diff --git a/api/internal/target/kusttarget.go b/api/internal/target/kusttarget.go index 5f1d1095a1..cdb419559f 100644 --- a/api/internal/target/kusttarget.go +++ b/api/internal/target/kusttarget.go @@ -457,7 +457,7 @@ func (kt *KustTarget) accumulateResources( return ra, nil } -// accumulateComponents fills the given resourceAccumulator +// accumulateResources fills the given resourceAccumulator // with resources read from the given list of paths. func (kt *KustTarget) accumulateComponents( ra *accumulator.ResAccumulator, paths []string) (*accumulator.ResAccumulator, error) { diff --git a/api/krusty/namereference_test.go b/api/krusty/namereference_test.go index 843b815bfa..f40c248f25 100644 --- a/api/krusty/namereference_test.go +++ b/api/krusty/namereference_test.go @@ -786,85 +786,3 @@ spec: name: tester `) } - -func TestBackReferenceAdmissionPolicy(t *testing.T) { - th := kusttest_test.MakeHarness(t) - th.WriteK(".", ` -resources: -- admission.yaml - -namePrefix: a-prefix- -`) - th.WriteF("admission.yaml", `--- -apiVersion: admissionregistration.k8s.io/v1beta1 -kind: ValidatingAdmissionPolicy -metadata: - name: sample-policy -spec: - failurePolicy: Fail - paramKind: - apiVersion: apps/v1 - kind: Deployment - matchConstraints: - resourceRules: - - apiGroups: - - apps - apiVersions: - - v1 - operations: - - CREATE - - UPDATE - resources: - - deployments - validations: - - expression: "!object.metadata.name.startsWith('test-')" - message: prefix 'test-' is not allowed - reason: Invalid ---- -apiVersion: admissionregistration.k8s.io/v1beta1 -kind: ValidatingAdmissionPolicyBinding -metadata: - name: sample-policy-binding -spec: - policyName: sample-policy - validationActions: - - Deny -`) - - m := th.Run(".", th.MakeDefaultOptions()) - th.AssertActualEqualsExpected(m, ` -apiVersion: admissionregistration.k8s.io/v1beta1 -kind: ValidatingAdmissionPolicy -metadata: - name: a-prefix-sample-policy -spec: - failurePolicy: Fail - matchConstraints: - resourceRules: - - apiGroups: - - apps - apiVersions: - - v1 - operations: - - CREATE - - UPDATE - resources: - - deployments - paramKind: - apiVersion: apps/v1 - kind: Deployment - validations: - - expression: '!object.metadata.name.startsWith(''test-'')' - message: prefix 'test-' is not allowed - reason: Invalid ---- -apiVersion: admissionregistration.k8s.io/v1beta1 -kind: ValidatingAdmissionPolicyBinding -metadata: - name: a-prefix-sample-policy-binding -spec: - policyName: a-prefix-sample-policy - validationActions: - - Deny -`) -} diff --git a/cmd/config/internal/commands/run-fns.go b/cmd/config/internal/commands/run-fns.go index bcf9876830..ee94468817 100644 --- a/cmd/config/internal/commands/run-fns.go +++ b/cmd/config/internal/commands/run-fns.go @@ -20,7 +20,7 @@ import ( "sigs.k8s.io/kustomize/cmd/config/internal/generateddocs/commands" ) -// GetRunFnRunner returns a RunFnRunner. +// GetCatRunner returns a RunFnRunner. func GetRunFnRunner(name string) *RunFnRunner { r := &RunFnRunner{} c := &cobra.Command{ diff --git a/cmd/config/internal/inpututil/inpututil.go b/cmd/config/internal/inpututil/inpututil.go index a0f3d07632..557b35b645 100644 --- a/cmd/config/internal/inpututil/inpututil.go +++ b/cmd/config/internal/inpututil/inpututil.go @@ -24,7 +24,7 @@ func MapInputsE(inputs []*yaml.RNode, fn MapInputsEFn) error { type MapInputsFn func(*yaml.RNode, yaml.ResourceMeta) ([]*yaml.RNode, error) -// runs the function against each input Resource, providing the parsed metadata +// runs the function against each input Resource, providing the parsed metadata func MapInputs(inputs []*yaml.RNode, fn MapInputsFn) ([]*yaml.RNode, error) { var outputs []*yaml.RNode for i := range inputs { diff --git a/go.work.sum b/go.work.sum index b858ddeb8b..503ecc9850 100644 --- a/go.work.sum +++ b/go.work.sum @@ -163,331 +163,119 @@ github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE github.com/PuerkitoBio/goquery v1.5.0/go.mod h1:qD2PgZ9lccMbQlc7eEOjaeRlFQON7xY8kdmcsrnKqMg= github.com/PuerkitoBio/goquery v1.8.1/go.mod h1:Q8ICL1kNUJ2sXGoAhPGUdYDJvgQgHzJsnnd3H7Ho5jQ= github.com/acomagu/bufpipe v1.0.3/go.mod h1:mxdxdup/WdsKVreO5GpW4+M/1CE2sMG4jeGJ2sYmHc4= -github.com/agnivade/levenshtein v1.0.1 h1:3oJU7J3FGFmyhn8KHjmVaZCN5hxTr7GxgRue+sxIXdQ= github.com/alecthomas/kingpin/v2 v2.3.2/go.mod h1:0gyi0zQnjuFk8xrkNKamJoyUo382HRL7ATRpFZCw6tE= -github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc h1:cAKDfWh5VpdgMhJosfJnn5/FoN2SRZ4p7fJNX58YPaU= -github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf h1:qet1QNfXsQxTZqLG4oE62mJzwPIB8+Tee4RNCL9ulrY= github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137/go.mod h1:OMCwj8VM1Kc9e19TLln2VL61YJF0x1XFtfdL4JdbSyE= -github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883 h1:bvNMNQO63//z+xNgfBlViaCIJKLlCJ6/fmUseuG0wVQ= github.com/andybalholm/brotli v1.0.4/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig= -github.com/andybalholm/cascadia v1.0.0/go.mod h1:GsXiBklL0woXo1j/WYWtSYYC4ouU9PqHO0sqidkEA4Y= github.com/andybalholm/cascadia v1.3.2/go.mod h1:7gtRlve5FxPPgIgX36uWBX58OdBsSS6lUvCFb+h7KvU= -github.com/antihax/optional v1.0.0 h1:xK2lYat7ZLaVVcIuj82J8kIro4V6kDe0AUDFboUCwcg= github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20230305170008-8188dc5388df/go.mod h1:pSwJ0fSY5KhvocuWSx4fz3BA8OrA1bQn+K1Eli3BRwM= github.com/apache/arrow/go/v12 v12.0.0/go.mod h1:d+tV/eHZZ7Dz7RPrFKtPK02tpr+c9/PEd/zm8mDS9Vg= github.com/apache/thrift v0.16.0/go.mod h1:PHK3hniurgQaNMZYaCLEqXKsYK8upmhPbmdP2FXSqgU= -github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e h1:QEF07wC0T1rKkctt1RINW/+RMTVmiwxETico2l3gxJA= -github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6 h1:G1bPvciwNyF7IUmKXNt9Ak3m6u9DE1rF+RmtIkBpVdA= -github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da h1:8GUt8eRujhVEGZFFEjBj46YV4rDjvGrNxb0KMWYkL2I= github.com/armon/go-metrics v0.4.1/go.mod h1:E6amYzXo6aW1tqzoZGT755KkbgrJsSdpwZ+3JqfkOG4= -github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310 h1:BUAU3CGlLvorLI26FmByPp2eC2qla6E1Tw+scpcg/to= -github.com/aws/aws-sdk-go-v2/service/kms v1.5.0 h1:10e9mzaaYIIePEuxUzW5YJ8LKHNG/NX63evcvS3ux9U= -github.com/aws/aws-sdk-go-v2/service/kms v1.5.0/go.mod h1:w7JuP9Oq1IKMFQPkNe3V6s9rOssXzOVEMNEqK1L1bao= -github.com/aws/aws-sdk-go-v2/service/kms v1.24.1 h1:zDmx9yZjSYDaeakQVN16qfsLxhBeAxgclioB0+rOCDM= github.com/aws/aws-sdk-go-v2/service/kms v1.24.1/go.mod h1:yrlimpsAJc9fXj3jHC7Ig2Zb4iMAoSJ/VVzChf22dZk= github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.20.1/go.mod h1:aFRHxQ3V4bs/uVQYpg8Wm6szKWuB2KnraKcIGp5JS/I= github.com/aws/aws-sdk-go-v2/service/sns v1.21.1/go.mod h1:laHbYFVzphXdCiT3gitfuCDA2Oukrt9p40jWK7OJLgc= github.com/aws/aws-sdk-go-v2/service/sqs v1.24.1/go.mod h1:+phkm4aFvcM4jbsDRGoZ+mD8MMvksHF459Xpy5Z90f0= github.com/aws/aws-sdk-go-v2/service/ssm v1.37.1/go.mod h1:Z4GG8XYwKzRKKtexaeWeVmPVdwRDgh+LaR5ildi4mYQ= -github.com/beorn7/perks v1.0.0 h1:HWo1m869IqiPhD389kmkxeTalrjNbbJTC8LXupb+sl0= -github.com/bgentry/speakeasy v0.1.0 h1:ByYyxL9InA1OWqxJqqp2A5pYHUrCiAL6K3J+LKSsQkY= -github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c h1:+0HFd5KSZ/mm3JmhmrDukiId5iR6w4+BdFtfSy4yWIc= github.com/blang/semver v3.5.0+incompatible h1:CGxCgetQ64DKk7rdZ++Vfnb1+ogGNnB17OJKJXD2Cfs= -github.com/buger/jsonparser v1.1.1 h1:2PnMjfWD7wBILjqQbt530v576A/cAbQvEW9gGIpYMUs= -github.com/cavaliercoder/go-cpio v0.0.0-20180626203310-925f9528c45e/go.mod h1:oDpT4efm8tSYHXV5tHSdRvBet/b/QzxZ+XyyPehvm3A= github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= -github.com/census-instrumentation/opencensus-proto v0.2.1 h1:glEXhBS5PSLLv4IXzLA5yPRVX4bilULVyxxbrfOtDAk= github.com/census-instrumentation/opencensus-proto v0.4.1/go.mod h1:4T9NM4+4Vw91VeyqjLS6ao50K5bOcLKN6Q42XnYaRYw= github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cheekybits/is v0.0.0-20150225183255-68e9c0620927/go.mod h1:h/aW8ynjgkuj+NQRlZcDbAbM1ORAbXjXX77sX7T289U= -github.com/chzyer/logex v1.1.10 h1:Swpa1K6QvQznwJRcfTfQJmTE72DqScAa40E+fbHEXEE= -github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e h1:fY5BOSpyZCqRo5OhCuC+XN+r/bBCmeuuJtjz+bCNIf8= -github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1 h1:q763qf9huN11kDQavWsoZXJNW3xEE4JJyHa5Q25/sd8= -github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag= -github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= -github.com/client9/misspell v0.3.4 h1:ta993UF76GwbvJcIo3Y68y/M3WxlpEHPWIGDkJYwzJI= -github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403 h1:cqQfy1jclcSy/FwLjemeg3SR1yaINm74aQyupQ0Bl8M= github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= github.com/cncf/udpa/go v0.0.0-20220112060539-c52dc94e7fbe/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= -github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed h1:OZmjad4L3H8ncOIR8rnb5MREYqG8ixi5+WbeUsquF0c= github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa h1:OaNxuTZr7kxeODyLWsRMC+OD03aFUH+mW6r2d+MWa5Y= -github.com/coreos/bbolt v1.3.2 h1:wZwiHHUieZCquLkDL0B8UhzreNWsPHooDAG3q34zk0s= -github.com/coreos/etcd v3.3.15+incompatible h1:+9RjdC18gMxNQVvSiXvObLu29mOFmkgdsB4cRTlV+EE= -github.com/coreos/go-etcd v2.0.0+incompatible h1:bXhRBIXoTm9BYHS3gE0TtQuyNZyeEMux2sDi4oo5YOo= -github.com/coreos/go-oidc v2.1.0+incompatible h1:sdJrfw8akMnCuUlaZU3tE/uYXFgfqom8DBE9so9EBsM= -github.com/coreos/go-semver v0.3.0 h1:wkHLiw0WNATZnSG7epLsujiMCgPAc9xhjJ4tgnAxmfM= github.com/coreos/go-semver v0.3.1/go.mod h1:irMmmIw/7yzSRPWryHsK7EYSg09caPQL03VsM8rvUec= -github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e h1:Wf6HqHfScWJN9/ZjdUKyjop4mf3Qdd+1TvvltAvM3m8= github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= -github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f h1:lBNOc5arjvs8E5mO2tbpBpLoyyu8B6e44T7hJy6potg= -github.com/cpuguy83/go-md2man v1.0.10 h1:BSKMNlYxDvnunlTymqtgONjNnaRV1sTpcovwwjF22jk= -github.com/cpuguy83/go-md2man/v2 v2.0.2 h1:p1EgwI/C7NhT0JmVkwCD2ZBK8j4aeHQX2pMHHBfMQ6w= -github.com/creack/pty v1.1.9 h1:uDmaGzcdjhF4i/plgjmEsriH11Y0o7RKapEf/LDaM3w= github.com/cristalhq/acmd v0.8.1/go.mod h1:LG5oa43pE/BbxtfMoImHCQN++0Su7dzipdgBjMCBVDQ= -github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM= -github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954 h1:RMLoZVzv4GliuWafOuPuQDKSm1SJph7uCRnnS61JAn4= -github.com/dimchansky/utfbom v1.1.1/go.mod h1:SxdoEBH5qIqFocHMyGOXVAybYJdr71b1Q/j0mACtrfE= github.com/djherbis/atime v1.1.0/go.mod h1:28OF6Y8s3NQWwacXc5eZTsEsiMzp7LF8MbXE+XJPdBE= -github.com/docker/docker v0.7.3-0.20190327010347-be7ac8be2ae0 h1:w3NnFcKR5241cfmQU5ZZAsf0xcpId6mWOupTvJlUX2U= -github.com/docker/go-units v0.4.0 h1:3uh0PgVws3nIA0Q+MwDC8yjEPf9zjRfZZWXZYDct3Tw= -github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96 h1:cenwrSVm+Z7QLSV/BsnenAOcDXdX4cMv4wP0B/5QbPg= -github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815 h1:bWDMxwH3px2JBh6AyO7hdCn/PkvCZXii8TGj7sbtEbQ= -github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo= -github.com/dustmop/soup v1.1.2-0.20190516214245-38228baa104e/go.mod h1:CgNC6SGbT+Xb8wGGvzilttZL1mc5sQ/5KkcxsZttMIk= -github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153 h1:yUdfgN0XgIJw7foRItutHYUIhlcKzcSf5vDpdhQAKTc= -github.com/emicklei/go-restful/v3 v3.8.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= -github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0 h1:dulLQAYQFYtG5MTplgNGHWuV2D+OBD+Z8lmDBmbLg+s= github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= github.com/envoyproxy/go-control-plane v0.11.1/go.mod h1:uhMcXKCQMEJHiAb0w+YGefQLaTEw+YhGluxZkrTmD0g= -github.com/envoyproxy/protoc-gen-validate v0.1.0 h1:EQciDnbrYxy13PgWoY8AqoxGiPrpgBZ1R8UNe3ddc+A= github.com/envoyproxy/protoc-gen-validate v1.0.2/go.mod h1:GpiZQP3dDbg4JouG/NNS7QWXpgx6x8QiMKdmN72jogE= -github.com/evanphx/json-patch v5.6.0+incompatible h1:jBYDEEiFBPxA0v50tFdvOzQQTCvpL6mnFh5mB2/l16U= -github.com/evanphx/json-patch v5.6.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= -github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= -github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= github.com/felixge/httpsnoop v1.0.3/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= -github.com/flowstack/go-jsonschema v0.1.1 h1:dCrjGJRXIlbDsLAgTJZTjhwUJnnxVWl1OgNyYh5nyDc= -github.com/form3tech-oss/jwt-go v3.2.2+incompatible h1:TcekIExNqud5crz4xD2pavyTgWiPvpYe4Xau31I0PRk= -github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8 h1:DujepqpGd1hyOd7aW59XpK7Qymp8iy83xq74fLr21is= -github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1 h1:QbL/5oDUmRBzO9/Z7Seo6zf912W/a6Sr4Eu0G/3Jho0= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4 h1:WtGNWLvXpe6ZudgnXrq0barxBImvnnJoMEhXAzcbM0I= -github.com/go-kit/kit v0.8.0 h1:Wz+5lgoB0kkuqLEc6NVmwRknTKP6dTGbSqvhZtBI/j0= github.com/go-kit/log v0.2.1/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= -github.com/go-logfmt/logfmt v0.4.0 h1:MP4Eh7ZCb31lleYCFuwm0oe4/YGak+5l1vA2NOE80nA= github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= -github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= -github.com/go-logr/zapr v0.1.0 h1:h+WVe9j6HAA01niTJPA/kKH0i7e0rLZBCwauQFcRE54= github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= -github.com/go-openapi/analysis v0.19.5 h1:8b2ZgKfKIUTVQpTb77MoRDIMEIwvDVw40o3aOXdfYzI= -github.com/go-openapi/errors v0.19.2 h1:a2kIyV3w+OS3S97zxUndRVD46+FhGOUBDFY7nmu4CsY= -github.com/go-openapi/jsonreference v0.20.1/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k= -github.com/go-openapi/loads v0.19.4 h1:5I4CCSqoWzT+82bBkNIvmLc0UOsoKKQ4Fz+3VxOB7SY= -github.com/go-openapi/runtime v0.19.4 h1:csnOgcgAiuGoM/Po7PEpKDoNulCcF3FGbSnbHfxgjMI= -github.com/go-openapi/strfmt v0.19.3 h1:eRfyY5SkaNJCAwmmMcADjY31ow9+N7MCLW7oRkbsINA= -github.com/go-openapi/validate v0.19.5 h1:QhCBKRYqZR+SKo4gl1lPhPahope8/RLt6EVgY8X80w0= github.com/go-sql-driver/mysql v1.7.1/go.mod h1:OXbVy3sEdcQ2Doequ6Z5BW6fXNQTmx+9S1MCJN5yJMI= -github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk= github.com/goccy/go-json v0.9.11/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= -github.com/golang-jwt/jwt v3.2.1+incompatible h1:73Z+4BJcrTC+KczS6WvTPvRGOp1WmfEP4Q1lOd9Z/+c= -github.com/golang-jwt/jwt v3.2.1+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= github.com/golang/glog v1.1.0/go.mod h1:pfYeQZ3JWZoXTV5sFc986z3HTpwQs9At6P4ImfuP3NQ= -github.com/golang/mock v1.4.4 h1:l75CXGRSwbaYNpl/Z2X1XIIAMSCquvXgpVZDhwEIJsc= github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/cel-go v0.17.7/go.mod h1:HXZKzB0LXqer5lHHgfWAnlYwJaQBDKMjxjulNQzhwhY= github.com/google/flatbuffers v2.0.8+incompatible/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= github.com/google/go-pkcs11 v0.2.1-0.20230907215043-c6f79328ddf9/go.mod h1:6eQoGcuNJpa7jnd5pMGdkSaQpNDYvPlXWMcjXXThLlY= -github.com/google/martian/v3 v3.0.0 h1:pMen7vLs8nvgEYhywH3KDWJIJTeEr2ULsVWHWYHQyBs= -github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/renameio v0.1.0 h1:GOZbcHa3HfsPKPlmyPyN2KEohoMXOhdMbHrvbpl2QaA= github.com/google/s2a-go v0.1.4/go.mod h1:Ej+mSEMGRnqRzjc7VtF+jdBwYG5fuJfiZ8ELkjEwM0A= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/enterprise-certificate-proxy v0.2.3/go.mod h1:AwSRAtLfXpU5Nm3pW+v7rGDHp09LsPtGY9MduiEsR9k= github.com/googleapis/enterprise-certificate-proxy v0.2.4/go.mod h1:AwSRAtLfXpU5Nm3pW+v7rGDHp09LsPtGY9MduiEsR9k= -github.com/googleapis/gax-go/v2 v2.0.5 h1:sjZBwGj9Jlw33ImPtvFviGYvseOtDM7hkSKB7+Tv3SM= github.com/googleapis/gax-go/v2 v2.11.0/go.mod h1:DxmR61SGKkGLa2xigwuZIQpkCI2S5iydzRfb3peWZJI= github.com/gookit/color v1.5.2/go.mod h1:w8h4bGiHeeBpvQVePTutdbERIUf3oJE5lZ8HM0UgXyg= -github.com/gophercloud/gophercloud v0.1.0 h1:P/nh25+rzXouhytV2pUHBb65fnds26Ghl8/391+sT5o= -github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8= -github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc= -github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4 h1:z53tR0945TRRQO/fLEVPI6SMv7ZflF0TEaTAoU7tOzg= github.com/grpc-ecosystem/go-grpc-middleware v1.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y= -github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92BcuyuQ/YW4NSIpoGtfXNho= -github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.3/go.mod h1:o//XUCC/F+yRGJoPO/VU0GSB0f8Nhgmxx0VIRUvaC0w= github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0/go.mod h1:YN5jB8ie0yfIUg6VvR9Kz84aCaG7AsGZnLjhHbUqwPg= -github.com/hashicorp/consul/api v1.1.0 h1:BNQPM9ytxj6jbjjdRPioQ94T6YXriSopn0i8COv6SRA= github.com/hashicorp/consul/api v1.25.1/go.mod h1:iiLVwR/htV7mas/sy0O+XSuEnrdBUUydemjxcUrAt4g= -github.com/hashicorp/consul/sdk v0.1.1 h1:LnuDWGNsoajlhGyHJvuWW6FVqRl8JOTPqS6CPTsYjhY= -github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= -github.com/hashicorp/go-cleanhttp v0.5.1 h1:dH3aiDG9Jvb5r5+bYHsikaOUIpcM0xvgMXVoDkXMzJM= -github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= -github.com/hashicorp/go-hclog v1.5.0 h1:bI2ocEMgcVlz55Oj1xZNBsVi900c7II+fWDyV9o+13c= github.com/hashicorp/go-hclog v1.5.0/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= -github.com/hashicorp/go-immutable-radix v1.0.0 h1:AKDB1HM5PWEA7i4nhcpwOrO2byshxBjXVn/J/3+z5/0= github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= -github.com/hashicorp/go-msgpack v0.5.3 h1:zKjpN5BK/P5lMYrLmBHdBULWbJ0XpYR+7NGzqkZzoD4= -github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA= -github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= -github.com/hashicorp/go-rootcerts v1.0.0 h1:Rqb66Oo1X/eSV1x66xbDccZjhJigjg0+e82kpwzSwCI= github.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= -github.com/hashicorp/go-sockaddr v1.0.0 h1:GeH6tui99pF4NJgfnhp+L6+FfobzVW3Ah46sLo0ICXs= -github.com/hashicorp/go-syslog v1.0.0 h1:KaodqZuhUoZereWVIYmpUgZysurB1kBLX2j0MwMrUAE= -github.com/hashicorp/go-uuid v1.0.1 h1:fv1ep09latC32wFoVwnqcnKJGnMSdBanPczbHAYm1BE= -github.com/hashicorp/go-uuid v1.0.3/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go.net v0.0.1 h1:sNCoNyDEvN1xa+X0baata4RdcpKwcMS6DH+xwfqPgjw= -github.com/hashicorp/golang-lru v0.5.1 h1:0hERBMJE1eitiLkihrMvRVBYAkpHzc/J3QdDN+dAcgU= -github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc= github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= -github.com/hashicorp/logutils v1.0.0 h1:dLEQVugN8vlakKOUE3ihGLTZJRB4j+M2cdTm/ORI65Y= -github.com/hashicorp/mdns v1.0.0 h1:WhIgCr5a7AaVH6jPUwjtRuuE7/RDufnUvzIr48smyxs= -github.com/hashicorp/mdns v1.0.4/go.mod h1:mtBihi+LeNXGtG8L9dX59gAEa12BDtBQSp4v/YAJqrc= -github.com/hashicorp/memberlist v0.1.3 h1:EmmoJme1matNzb+hMpDuR/0sbJSUisxyqBGG676r31M= -github.com/hashicorp/memberlist v0.5.0/go.mod h1:yvyXLpo0QaGE59Y7hDTsTzDD25JYBZ4mHgHUZ8lrOI0= -github.com/hashicorp/serf v0.8.2 h1:YZ7UKsJv+hKjqGVUUbtE3HNj79Eln2oQ75tniF6iPt0= github.com/hashicorp/serf v0.10.1/go.mod h1:yL2t6BqATOLGc5HF7qbFkTfXoPIY0WZdWHfEvMqbG+4= -github.com/huandu/xstrings v1.3.2/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= -github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6 h1:UDMh68UUwekSh5iP2OMhRRZJiiBccgV7axzUG8vi56c= -github.com/imdario/mergo v0.3.16 h1:wwQJbIsHYGMUyLSPrEq1CT16AhnhNJQ51+4fdHUnCl4= -github.com/imdario/mergo v0.3.16/go.mod h1:WBLT9ZmE3lPoWsEzCh9LPo3TiwVN+ZKEjmz+hD27ysY= github.com/jmoiron/sqlx v1.3.5/go.mod h1:nRVWtLre0KfCLJvgxzCsLVMogSvQ1zNJtpYr2Ccp0mQ= -github.com/jonboulle/clockwork v0.1.0 h1:VKV+ZcuP6l3yW9doeqz6ziZGgcynBVQO+obU0+0hcPo= github.com/jonboulle/clockwork v0.2.2/go.mod h1:Pkfl5aHPm1nk2H9h0bjmnJD/BcgbGXUBGnn1kMkgxc8= -github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/jstemmer/go-junit-report v0.9.1 h1:6QPYqodiu3GuPL+7mfx+NwDdp2eTkp9IfEUpgAwUN0o= -github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= -github.com/julienschmidt/httprouter v1.2.0 h1:TDTW5Yz1mjftljbcKqRcrYhd4XeOoI98t+9HbQbYf7g= -github.com/kisielk/errcheck v1.5.0 h1:e8esj/e4R+SAOwFwN+n3zr0nYeCyeweozKfO23MvHzY= github.com/klauspost/asmfmt v1.3.2/go.mod h1:AG8TuvYojzulgDAMCnYn50l/5QV3Bs/tp6j0HLHbNSE= github.com/klauspost/compress v1.17.0/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= -github.com/konsorten/go-windows-terminal-sequences v1.0.1 h1:mweAR1A6xJ3oS2pRaGiHgQ4OO8tzTaLawm8vnODuwDk= -github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515 h1:T+h1c/A9Gawja4Y9mFVWj2vyii2bbUNDw3kt9VxK2EY= github.com/lib/pq v1.10.9/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= github.com/lyft/protoc-gen-star/v2 v2.0.3/go.mod h1:amey7yeodaJhXSbf/TlLvWiqQfLOSpEk//mLlc+axEk= -github.com/magiconair/properties v1.8.1 h1:ZC2Vc7/ZFkGmsVC9KvOjumD+G5lXy2RtTKyzRKO2BQ4= github.com/matryer/try v0.0.0-20161228173917-9ac251b645a2/go.mod h1:0KeJpeMD6o+O4hW7qJOT7vyQPKrWmj26uf5wMc/IiIs= -github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= -github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= -github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= -github.com/mattn/go-runewidth v0.0.2 h1:UnlwIPBGaTZfPQ6T1IGzPI0EkYAQmT9fAEJ/poFC63o= -github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= github.com/mgechev/dots v0.0.0-20210922191527-e955255bf517/go.mod h1:KQ7+USdGKfpPjXk4Ga+5XxQM4Lm4e3gAogrreFAYpOg= -github.com/miekg/dns v1.0.14 h1:9jZdLNd/P4+SfEJ0TNyxYpsK8N4GtfylBLqtbYN1sbA= -github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= -github.com/miekg/dns v1.1.41/go.mod h1:p6aan82bvRIyn+zDIv9xYNUpwa73JcSh9BKwknJysuI= github.com/minio/asm2plan9s v0.0.0-20200509001527-cdd76441f9d8/go.mod h1:mC1jAcsrzbxHt8iiaC+zU4b1ylILSosueou12R++wfY= github.com/minio/c2goasm v0.0.0-20190812172519-36a3d3bbc4f3/go.mod h1:RagcQ7I8IeTMnF8JTXieKnO4Z6JCsikNEzj0DwauVzE= github.com/minio/highwayhash v1.0.2/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY= -github.com/mitchellh/cli v1.0.0 h1:iGBIsUe3+HZ/AD/Vd7DErOt5sU9fa8Uj7A2s1aggv1Y= -github.com/mitchellh/cli v1.1.0/go.mod h1:xcISNoH86gajksDmfB23e/pu+B+GeFRMYmoHXxx3xhI= github.com/mitchellh/go-ps v1.0.0/go.mod h1:J4lOc8z8yJs6vUwklHw2XEIiT4z4C40KtWVN3nvg8Pg= -github.com/mitchellh/go-testing-interface v1.0.0 h1:fzU/JVNcaqHQEcVFAKeR41fkiLdIPrefOvVG1VZ96U0= -github.com/mitchellh/gox v0.4.0 h1:lfGJxY7ToLJQjHHwi0EX6uYBdK78egf954SQl13PQJc= -github.com/mitchellh/iochan v1.0.0 h1:C+X3KsSTLFVBr/tK1eYN/vs4rJcvsiLU338UhYPJWeY= -github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE= github.com/mmcloughlin/avo v0.5.0/go.mod h1:ChHFdoV7ql95Wi7vuq2YT1bwCJqiWdZrQ1im3VujLYM= -github.com/moby/spdystream v0.2.0 h1:cjW1zVyyoiM0T7b6UoySUFqzXMoqRckQtXwGPiBhOM8= github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c= github.com/montanaflynn/stats v0.7.0/go.mod h1:etXPPgVO6n31NxCd9KQUMvCM+ve0ruNzt6R8Bnaayow= github.com/mozilla/tls-observatory v0.0.0-20210609171429-7bc42856d2e5/go.mod h1:FUqVoUPHSEdDR0MnFM3Dh8AU0pZHLXUD127SAJGER/s= -github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223 h1:F9x/1yl3T2AeKLr2AMdilSD8+f9bvMnNN8VS5iDtovc= -github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f h1:y5//uYreIhSUg3J1GEMiLbxo1LJaP8RfCpH6pymGZus= github.com/nats-io/jwt/v2 v2.4.1/go.mod h1:24BeQtRwxRV8ruvC4CojXlx/WQ/VjuwlYiH+vu/+ibI= github.com/nats-io/nats.go v1.30.2/go.mod h1:dcfhUgmQNN4GJEfIb2f9R7Fow+gzBF4emzDHrVBd5qM= github.com/nats-io/nkeys v0.4.5/go.mod h1:XUkxdLPTufzlihbamfzQ7mw/VGx6ObUs+0bN5sNvt64= github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= -github.com/oklog/ulid v1.3.1 h1:EGfNDEx6MqHz8B3uNV6QAib1UR2Lm97sHi3ocA6ESJ4= -github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5 h1:58+kh9C6jJVXYjt8IE48G2eWl6BjwU5Gj0gqY84fy78= -github.com/onsi/ginkgo/v2 v2.1.4/go.mod h1:um6tUpWM/cxCK3/FK8BXqEiUMUwRgSM4JXG47RKZmLU= -github.com/onsi/gomega v1.19.0/go.mod h1:LY+I3pBVzYsTBU1AnDwOSxaYi9WoWiqgwooUqq9yPro= -github.com/onsi/gomega v1.27.3/go.mod h1:5vG284IBtfDAmDyrK+eGyZmUgUlmi+Wngqo557cZ6Gw= -github.com/onsi/gomega v1.27.10/go.mod h1:RsS8tutOdbdgzbPtzzATp12yT7kM5I5aElG3evPbQ0M= -github.com/onsi/gomega v1.29.0/go.mod h1:9sxs+SwGrKI0+PWe4Fxa9tFQQBG5xSsSbMXOI8PPpoQ= -github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c h1:Lgl0gzECD8GnQ5QCWA8o6BtfL6mDH5rQgM4/fX3avOs= -github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= -github.com/pborman/uuid v1.2.0 h1:J7Q5mO4ysT1dv8hyrUGHb9+ooztCXu1D8MY8DZYsu3g= -github.com/pelletier/go-toml v1.2.0 h1:T5zMGML61Wp+FlcbWjRDT7yAxhJNAiPPLOFECq181zc= github.com/phayes/checkstyle v0.0.0-20170904204023-bfd46e6a821d/go.mod h1:3OzsM7FXDQlpCiw2j81fOmAwQLnZnLGXVKUzeKQXIAw= github.com/pierrec/lz4/v4 v4.1.15/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4= -github.com/posener/complete v1.1.1 h1:ccV59UEOTzVDnDUEFdT95ZzHVZ+5+158q8+SJb2QV5w= -github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s= github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= -github.com/pquerna/cachecontrol v0.0.0-20171018203845-0dec1b30a021 h1:0XM1XL/OFFJjXsYXlG30spTkV/E9+gmd5GD1w2HE8xM= -github.com/prometheus/client_golang v1.0.0 h1:vrDKnkGzuGvhNAL56c7DBz29ZL+KxnoR0x7enabFceM= -github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= -github.com/prometheus/client_golang v1.11.1/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= -github.com/prometheus/client_golang v1.12.1 h1:ZiaPsmm9uiBeaSMRznKsCDNtPCS0T3JVDGF+06gjBzk= -github.com/prometheus/client_golang v1.15.1/go.mod h1:e9yaBhRPU2pPNsZwE+JdQl0KEt1N9XgF6zxWmaC0xOk= -github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4 h1:gQz4mCbXsO+nc9n1hCxHcGA3Zx3Eo+UHZoInFGUIXNM= -github.com/prometheus/client_model v0.3.0/go.mod h1:LDGWKZIo7rky3hgvBe+caln+Dr3dPggB5dvjtD7w9+w= -github.com/prometheus/common v0.4.1 h1:K0MGApIoQvMw27RTdJkPbr3JZ7DNbtxQNyi5STVM6Kw= -github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= -github.com/prometheus/common v0.32.1 h1:hWIdL3N2HoUx3B8j3YN9mWor0qhY/NlEKZEaXxuIRh4= -github.com/prometheus/common v0.42.0/go.mod h1:xBwqVerjNdUDjgODMpudtOMwlOwf2SaTr1yjz4b7Zbc= -github.com/prometheus/procfs v0.0.2 h1:6LJUbpNm42llc4HRCuvApCSWB/WfhuNo9K98Q9sNGfs= -github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= -github.com/prometheus/procfs v0.7.3 h1:4jVXhlkAyzOScmCkXBTOLRLTz8EeU+eyjrwB/EPq0VU= -github.com/prometheus/procfs v0.9.0/go.mod h1:+pB4zwohETzFnmlpe6yd2lSc+0/46IYZRB/chUwxUZY= github.com/prometheus/prometheus v0.46.0/go.mod h1:10L5IJE5CEsjee1FnOcVswYXlPIscDWWt3IJ2UDYrz4= -github.com/prometheus/tsdb v0.7.1 h1:YZcsG11NqnK4czYLrWd9mpEuAJIHVQLwdrleYfszMAA= github.com/quasilyte/go-ruleguard/dsl v0.3.22/go.mod h1:KeCP03KrjuSO0H1kTuZQCWlQPulDV6YMIXmpQss17rU= github.com/quasilyte/go-ruleguard/rules v0.0.0-20211022131956-028d6511ab71/go.mod h1:4cgAphtvu7Ftv7vOT2ZOYhC6CvBxZixcasr8qIOTA50= -github.com/remyoudompheng/bigfft v0.0.0-20170806203942-52369c62f446 h1:/NRJ5vAYoqz+7sG51ubIDHXeWO8DlTSrToPu6q11ziA= github.com/remyoudompheng/go-dbus v0.0.0-20121104212943-b7232d34b1d5/go.mod h1:+u151txRmLpwxBmpYn9z3d1sdJdjRPQpsXuYeY9jNls= github.com/remyoudompheng/go-liblzma v0.0.0-20190506200333-81bf2d431b96/go.mod h1:90HvCY7+oHHUKkbeMCiHt1WuFR2/hPJ9QrljDG+v6ls= github.com/remyoudompheng/go-misc v0.0.0-20190427085024-2d6ac652a50e/go.mod h1:80FQABjoFzZ2M5uEa6FUaJYEmqU2UOKojlFVak1UAwI= -github.com/rogpeppe/fastuuid v1.2.0 h1:Ppwyp6VYCF1nvBTXL3trRso7mXMlRrw9ooo375wvi2s= -github.com/russross/blackfriday v1.5.2 h1:HyvC0ARfnZBqnXwABFeSZHpKvJHJJfPz81GNueLj0oo= -github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f h1:UFr9zpz4xgTnIE5yIMtWAMngCdZ9p/+q6lTbgelo80M= github.com/sagikazarmark/crypt v0.15.0/go.mod h1:5rwNNax6Mlk9sZ40AcyVtiEw24Z4J04cfSioF2COKmc= -github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 h1:nn5Wsu0esKSJiIVhscUtVbo7ada43DJhG55ua/hjS5I= github.com/shirou/gopsutil/v3 v3.23.1/go.mod h1:NN6mnm5/0k8jw4cBfCnJtr5L7ErOTg18tMNpgFkn0hA= -github.com/shurcooL/sanitized_anchor_name v1.0.0 h1:PdmoCO6wvbs+7yrJyMORt4/BmY5IYyJwS/kOiWx8mHo= -github.com/sirupsen/logrus v1.4.2 h1:SPIRibHv4MatM3XXNO2BJeFLZwZ2LvZgfQ5+UNI2im4= -github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM= -github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s= -github.com/soheilhy/cmux v0.1.4 h1:0HKaf1o97UwFjHH9o5XsHUOF+tqmdA7KEzXLpiyaw0E= github.com/soheilhy/cmux v0.1.5/go.mod h1:T7TcVDs9LWfQgPlPsdngu6I6QIoyIFZDDC6sNE1GqG0= -github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72 h1:qLC7fQah7D6K1B0ujays3HV9gkFtllcxhzImRR7ArPQ= -github.com/spf13/afero v1.2.2 h1:5jhuqJyZCZf2JRofRvN/nIFgIWNzPa3/Vz8mYylgbWc= -github.com/spf13/cast v1.3.0 h1:oget//CVOEoFewqQxwr0Ej5yjygnqGkvggSE/gB35Q8= -github.com/spf13/jwalterweatherman v1.0.0 h1:XHEdyB+EcvlqZamSM4ZOMGlc93t6AcsBEu9Gc1vn7yk= -github.com/spf13/viper v1.7.0 h1:xVKxvI7ouOI5I+U9s2eeiUfMaWBVoXA3AWskkrqK0VM= -github.com/stoewer/go-strcase v1.2.0 h1:Z2iHWqGXH00XYgqDmNgQbIBxf3wrNq0F3feEy0ainaU= -github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= -github.com/stretchr/testify v1.7.5/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= -github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s= github.com/tdewolff/argp v0.0.0-20231030173501-fa6c54897951/go.mod h1:fF+gnKbmf3iMG+ErLiF+orMU/InyZIEnKVVigUjfriw= -github.com/tidwall/pretty v1.0.0 h1:HsD+QiTn7sK6flMKIvNmpqz1qrpP3Ps6jOKIKMooyg4= github.com/tklauser/go-sysconf v0.3.11/go.mod h1:GqXfhXY3kiPa0nAXPDIQIWzJbMCB7AmcWpGR8lSZfqI= github.com/tklauser/numcpus v0.6.0/go.mod h1:FEZLMke0lhOUG6w2JadTzp0a+Nl8PF/GFkQ5UVIcaL4= -github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5 h1:LnC5Kc/wtumK+WB441p7ynQJzVuNRJiqddSIE3IlSEQ= github.com/tmc/grpc-websocket-proxy v0.0.0-20220101234140-673ab2c3ae75/go.mod h1:KO6IkyS8Y3j8OdNO85qEYBsRPuteD+YciPomcXdrMnk= -github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= -github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8 h1:3SVOIvH7Ae1KRYyQWRjXWJEA9sS/c/pjvH++55Gr648= -github.com/ugorji/go/codec v1.2.7 h1:YPXUKf7fYbp/y8xloBqZOw2qaVggbfwMlI8WM3wZUJ0= github.com/ugorji/go/codec v1.2.7/go.mod h1:WGN1fab3R1fzQlVQTkfxVtIBhWDRqOviHU95kRgeqEY= -github.com/ulikunitz/xz v0.5.7/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= -github.com/urfave/cli v1.20.0 h1:fDqGv3UG/4jbVl/QkFwEdddtEDjh/5Ov6X+0B/3bPaw= github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= github.com/valyala/quicktemplate v1.7.0/go.mod h1:sqKJnoaOF88V07vkO+9FL8fb9uZg/VPSJnLYn+LmLk8= -github.com/vektah/gqlparser v1.1.2 h1:ZsyLGn7/7jDNI+y4SEhI4yAxRChlv15pUHMjijT+e68= github.com/xhit/go-str2duration/v2 v2.1.0/go.mod h1:ohY8p+0f07DiV6Em5LKB0s2YpLtXVyJfNt1+BlmyAsU= -github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2 h1:eY9dn8+vbi4tKz5Qo6v2eYzo7kUS51QINcR5jNpbZS8= github.com/xo/terminfo v0.0.0-20210125001918-ca9a967f8778/go.mod h1:2MuV+tbUrU1zIOPMxZ5EncGwgmMJsa+9ucAQZXxsObs= -github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77 h1:ESFSdwYZvkeru3RtdrYueztKhOBCSAAzS4Gf+k0tEow= -github.com/yuin/goldmark v1.4.13 h1:fVcFKWvrslecOb/tg+Cc05dkeYx540o0FuFt3nUVDoE= github.com/yusufpapurcu/wmi v1.2.2/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= github.com/zeebo/xxh3 v1.0.2/go.mod h1:5NWz9Sef7zIDm2JHfFlcQvNekmcEl9ekUZQQKCYaDcA= -go.etcd.io/bbolt v1.3.3 h1:MUGmc65QhB3pIlaQ5bB4LwqSj6GIonVJXpZiaKNyaKk= go.etcd.io/bbolt v1.3.8/go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw= -go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738 h1:VcrIfasaLFkyjk6KNlXQSzO+B0fZcnECiDrKJsfxka0= -go.etcd.io/etcd/api/v3 v3.5.9/go.mod h1:uyAal843mC8uUVSLWz6eHa/d971iDGnCRpmKd2Z+X8k= go.etcd.io/etcd/api/v3 v3.5.10/go.mod h1:TidfmT4Uycad3NM/o25fG3J07odo4GBB9hoxaodFCtI= -go.etcd.io/etcd/client/pkg/v3 v3.5.9/go.mod h1:y+CzeSmkMpWN2Jyu1npecjB9BBnABxGM4pN8cGuJeL4= go.etcd.io/etcd/client/pkg/v3 v3.5.10/go.mod h1:DYivfIviIuQ8+/lCq4vcxuseg2P2XbHygkKwFo9fc8U= -go.etcd.io/etcd/client/v2 v2.305.9/go.mod h1:0NBdNx9wbxtEQLwAQtrDHwx58m02vXpDcgSYI2seohQ= go.etcd.io/etcd/client/v2 v2.305.10/go.mod h1:m3CKZi69HzilhVqtPDcjhSGp+kA1OmbNn0qamH80xjA= -go.etcd.io/etcd/client/v3 v3.5.9/go.mod h1:i/Eo5LrZ5IKqpbtpPDuaUnDOUv471oDg8cjQaUr2MbA= go.etcd.io/etcd/client/v3 v3.5.10/go.mod h1:RVeBnDz2PUEZqTpgqwAtUd8nAPf5kjyFyND7P1VkOKc= go.etcd.io/etcd/pkg/v3 v3.5.10/go.mod h1:TKTuCKKcF1zxmfKWDkfz5qqYaE3JncKKZPFf8c1nFUs= go.etcd.io/etcd/raft/v3 v3.5.10/go.mod h1:odD6kr8XQXTy9oQnyMPBOr0TVe+gT0neQhElQ6jbGRc= go.etcd.io/etcd/server/v3 v3.5.10/go.mod h1:gBplPHfs6YI0L+RpGkTQO7buDbHv5HJGG/Bst0/zIPo= -go.mongodb.org/mongo-driver v1.1.2 h1:jxcFYjlkl8xaERsgLo+RNquI0epW6zuy/ZRQs6jnrFA= -go.opencensus.io v0.22.4 h1:LYy1Hy3MJdrCdMwwzxA/dRok4ejH+RwNGbuoD9fCjto= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.42.0/go.mod h1:5z+/ZWJQKXa9YT34fQNx5K8Hd1EoIhvtUygUQPqEOgQ= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.44.0/go.mod h1:SeQhzAEccGVZVEy7aH87Nh0km+utSpo1pTv6eMMop48= go.opentelemetry.io/otel v1.19.0/go.mod h1:i0QyjOq3UPoTzff0PJB2N66fb4S0+rSbSB15/oyH9fY= @@ -496,69 +284,32 @@ go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.19.0/go.mod h go.opentelemetry.io/otel/metric v1.19.0/go.mod h1:L5rUsV9kM1IxCj1MmSdS+JQAcVm319EUrDVLrt7jqt8= go.opentelemetry.io/otel/sdk v1.19.0/go.mod h1:NedEbbS4w3C6zElbLdPJKOpJQOrGUJ+GfzpjUvI0v1A= go.opentelemetry.io/otel/trace v1.19.0/go.mod h1:mfaSyvGyEJEI0nyV2I4qhNQnbBOUUmYZpYojqMnX2vo= -go.opentelemetry.io/proto/otlp v0.7.0 h1:rwOQPCuKAKmwGKq2aVNnYIibI6wnV7EvzgfTCzcdGg8= -go.opentelemetry.io/proto/otlp v0.19.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U= go.opentelemetry.io/proto/otlp v1.0.0/go.mod h1:Sy6pihPLfYHkr3NkUbEhGHFhINUSI/v80hjKIs5JXpM= -go.starlark.net v0.0.0-20190528202925-30ae18b8564f/go.mod h1:c1/X6cHgvdXj6pUlmWKMkuqRnW4K8x2vwt6JAaaircg= -go.uber.org/atomic v1.4.0 h1:cxzIVoETapQEqDhQu3QfnvXAV4AlzcvUCxkVUFw3+EU= -go.uber.org/multierr v1.1.0 h1:HoEmRHQPVSqub6w2z2d2EOVs2fjyFRGyofhKuyDq0QI= -go.uber.org/zap v1.10.0 h1:ORx85nbTijNz8ljznvCMR1ZBIPKFn3jQrag10X2AsuM= -go.uber.org/zap v1.21.0 h1:WefMeulhovoZ2sYXz7st6K0sLj7bBhpiFaud4r4zST8= -go.uber.org/zap v1.21.0/go.mod h1:wjWOCqI0f2ZZrJF/UufIOkiC8ii6tm1iqIsLo76RfJw= -golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY= -golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0 h1:hb9wdF1z5waM+dSIICn1l0DkLVDT3hqhhQsDNUmHPRE= golang.org/x/crypto v0.0.0-20220314234659-1baeb1ce4c0b/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.9.0/go.mod h1:yrmDGqONDYtNj3tH8X9dzUun2m2lzPa9ngI6/RUPGR0= golang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98yw= golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc= -golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc= -golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= -golang.org/x/exp v0.0.0-20230905200255-921286631fa9/go.mod h1:S2oDrQGGwySpoQPVqRShND87VCbxmc6bL1Yd2oYrm6k= -golang.org/x/image v0.0.0-20190802002840-cff245a6509b h1:+qEpEAPhDZ1o0x3tHzZTQDArnOixOzGD9HUJfcg0mb4= -golang.org/x/lint v0.0.0-20200302205851-738671d3881b h1:Wh+f8QHJXR411sJR8/vRBTZ7YapZaRvUcLFFJhusH0k= -golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028 h1:4+4C/Iv2U4fMZBiMCc98MG1In4gJY5YRhtpDNeDeHWs= golang.org/x/mod v0.9.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20210410081132-afb366fc7cd1/go.mod h1:9tjilg8BloeKEkVJvy7fQ90B1CfIiPueXVOjqfkSzI8= -golang.org/x/net v0.4.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE= -golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= golang.org/x/net v0.12.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA= golang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI= golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk= -golang.org/x/net v0.16.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= -golang.org/x/oauth2 v0.5.0/go.mod h1:9/XBHVqLaWO3/BRHs5jbpYCnOZVjj5V0ndyaAM7KB4I= golang.org/x/oauth2 v0.8.0/go.mod h1:yr7u4HXZRm1R1kBWqr/xKNqewf0plRYoB7sla+BCIXE= golang.org/x/oauth2 v0.10.0/go.mod h1:kTpgurOux7LqtuxjuyZa4Gj2gdezIt/jQtGnNFfypQI= -golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o= golang.org/x/sync v0.2.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= -golang.org/x/sync v0.4.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= -golang.org/x/sys v0.0.0-20190130150945-aca44879d564/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210303074136-134d130e1a04/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/telemetry v0.0.0-20240208230135-b75ee8823808/go.mod h1:KG1lNk5ZFNssSZLrpVb4sMXKMpGwGXOxSG3rnu2gZQQ= -golang.org/x/term v0.0.0-20220526004731-065cf7ba2467/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.12.0/go.mod h1:owVbMEjm3cBLCHdkQu9b1opXd4ETQWc3BhuQGKgXgvU= golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.11.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= -golang.org/x/tools v0.0.0-20190907020128-2ca718005c18/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.7.0/go.mod h1:4pg6aUX35JBAogB10C9AtvVL+qowtN4pT3CGSQex14s= -golang.org/x/tools v0.12.0/go.mod h1:Sc0INKfu04TlqNoRA1hgpFZbhYXHPr4V5DzpSBTPqQM= golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58= google.golang.org/api v0.126.0/go.mod h1:mBwVAtz+87bEN6CbA1GtZPDOqY2R5ONPqJeIlvyo4Aw= google.golang.org/api v0.128.0/go.mod h1:Y611qgqaE92On/7g65MQgxYul3c0rEB894kniWLY750= @@ -578,8 +329,6 @@ google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11 google.golang.org/grpc v1.55.0/go.mod h1:iYEXKGkEBhg1PjZQvoYEVPTDkHo1/bjTnfwTeGONTY8= google.golang.org/grpc v1.56.1/go.mod h1:I9bI3vqKfayGqPUAwGdOSu7kt6oIJLixfffKrpXqQ9s= google.golang.org/grpc v1.57.0/go.mod h1:Sd+9RMTACXwmub0zcNY2c4arhtrbBYD1AUHI/dt16Mo= -google.golang.org/grpc v1.58.2 h1:SXUpjxeVF3FKrTYQI4f4KvbGD5u2xccdYdurwowix5I= -google.golang.org/grpc v1.58.2/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= @@ -589,7 +338,6 @@ k8s.io/code-generator v0.29.0/go.mod h1:5bqIZoCxs2zTRKMWNYqyQWW/bajc+ah4rh0tMY8z k8s.io/component-base v0.29.0/go.mod h1:sADonFTQ9Zc9yFLghpDpmNXEdHyQmFIGbiuZbqAXQ1M= k8s.io/gengo v0.0.0-20230829151522-9cce18d56c01/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/klog v1.0.0 h1:Pt+yjF5aB1xDSVbau4VsWe+dQNzA0qv1LlXdC2dF6Q8= -k8s.io/klog/v2 v2.80.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= k8s.io/kms v0.29.0/go.mod h1:mB0f9HLxRXeXUfHfn1A7rpwOlzXI1gIWu86z6buNoYA= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.28.0/go.mod h1:VHVDI/KrK4fjnV61bE2g3sA7tiETLn8sooImelsCx3Y= sigs.k8s.io/structured-merge-diff v1.0.1-0.20191108220359-b1b620dd3f06 h1:zD2IemQ4LmOcAumeiyDWXKUI2SO0NYDe3H6QGvPOVgU= diff --git a/hack/go.mod b/hack/go.mod index 443815df1d..ca1e72fe6a 100644 --- a/hack/go.mod +++ b/hack/go.mod @@ -12,7 +12,7 @@ require ( github.com/instrumenta/kubeval v0.16.1 github.com/joelanford/go-apidiff v0.6.0 github.com/monopole/mdrip v1.0.3 - golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d + golang.org/x/tools v0.18.0 sigs.k8s.io/controller-tools v0.14.0 sigs.k8s.io/kind v0.21.0 sigs.k8s.io/kustomize/cmd/mdtogo v0.0.0-20240208073625-b154361c0042 @@ -31,13 +31,13 @@ require ( github.com/AlecAivazis/survey/v2 v2.2.2 // indirect github.com/Antonboom/errname v0.1.7 // indirect github.com/Antonboom/nilnil v0.1.1 // indirect - github.com/Azure/azure-sdk-for-go/sdk/azcore v1.11.1 // indirect - github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.6.0 // indirect - github.com/Azure/azure-sdk-for-go/sdk/internal v1.8.0 // indirect + github.com/Azure/azure-sdk-for-go/sdk/azcore v1.7.0 // indirect + github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.3.0 // indirect + github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0 // indirect github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.1.0 // indirect github.com/Azure/go-autorest v14.2.0+incompatible // indirect github.com/Azure/go-autorest/autorest/to v0.4.0 // indirect - github.com/AzureAD/microsoft-authentication-library-for-go v1.2.2 // indirect + github.com/AzureAD/microsoft-authentication-library-for-go v1.0.0 // indirect github.com/BurntSushi/locker v0.0.0-20171006230638-a6e239ea1c69 // indirect github.com/BurntSushi/toml v1.2.1 // indirect github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24 // indirect @@ -154,7 +154,7 @@ require ( github.com/gohugoio/go-i18n/v2 v2.1.3-0.20230805085216-e63c13218d0e // indirect github.com/gohugoio/locales v0.14.0 // indirect github.com/gohugoio/localescompressed v1.0.1 // indirect - github.com/golang-jwt/jwt/v5 v5.2.1 // indirect + github.com/golang-jwt/jwt/v4 v4.5.0 // indirect github.com/golang/glog v1.2.0 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/protobuf v1.5.3 // indirect @@ -172,7 +172,7 @@ require ( github.com/google/s2a-go v0.1.7 // indirect github.com/google/safetext v0.0.0-20220905092116-b49f7bc46da2 // indirect github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect - github.com/google/uuid v1.6.0 // indirect + github.com/google/uuid v1.3.1 // indirect github.com/google/wire v0.5.0 // indirect github.com/googleapis/enterprise-certificate-proxy v0.3.1 // indirect github.com/googleapis/gax-go/v2 v2.12.0 // indirect @@ -260,7 +260,7 @@ require ( github.com/pelletier/go-toml/v2 v2.1.0 // indirect github.com/perimeterx/marshmallow v1.1.5 // indirect github.com/pjbgf/sha1cd v0.3.0 // indirect - github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c // indirect + github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/polyfloyd/go-errorlint v1.1.0 // indirect @@ -273,7 +273,7 @@ require ( github.com/quasilyte/regex/syntax v0.0.0-20200407221936-30656e2c4a95 // indirect github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567 // indirect github.com/rivo/uniseg v0.1.0 // indirect - github.com/rogpeppe/go-internal v1.12.0 // indirect + github.com/rogpeppe/go-internal v1.11.0 // indirect github.com/russross/blackfriday/v2 v2.1.0 // indirect github.com/rwcarlsen/goexif v0.0.0-20190401172101-9e8deecbddbd // indirect github.com/ryancurrah/gomodguard v1.3.0 // indirect @@ -305,8 +305,8 @@ require ( github.com/spf13/viper v1.17.0 // indirect github.com/ssgreg/nlreturn/v2 v2.2.1 // indirect github.com/stbenjam/no-sprintf-host-port v0.1.1 // indirect - github.com/stretchr/objx v0.5.2 // indirect - github.com/stretchr/testify v1.9.0 // indirect + github.com/stretchr/objx v0.5.0 // indirect + github.com/stretchr/testify v1.8.4 // indirect github.com/subosito/gotenv v1.6.0 // indirect github.com/t-yuki/gocover-cobertura v0.0.0-20180217150009-aaee18c8195c // indirect github.com/tdakkota/asciicheck v0.1.1 // indirect @@ -337,18 +337,18 @@ require ( go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.24.0 // indirect gocloud.dev v0.34.0 // indirect - golang.org/x/crypto v0.24.0 // indirect + golang.org/x/crypto v0.21.0 // indirect golang.org/x/exp v0.0.0-20231006140011-7918f672742d // indirect golang.org/x/exp/typeparams v0.0.0-20230203172020-98cc5a0785f9 // indirect - golang.org/x/image v0.18.0 // indirect + golang.org/x/image v0.13.0 // indirect golang.org/x/lint v0.0.0-20210508222113-6edffad5e616 // indirect - golang.org/x/mod v0.17.0 // indirect - golang.org/x/net v0.26.0 // indirect + golang.org/x/mod v0.15.0 // indirect + golang.org/x/net v0.23.0 // indirect golang.org/x/oauth2 v0.12.0 // indirect - golang.org/x/sync v0.7.0 // indirect - golang.org/x/sys v0.21.0 // indirect - golang.org/x/term v0.21.0 // indirect - golang.org/x/text v0.16.0 // indirect + golang.org/x/sync v0.6.0 // indirect + golang.org/x/sys v0.18.0 // indirect + golang.org/x/term v0.18.0 // indirect + golang.org/x/text v0.14.0 // indirect golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect google.golang.org/api v0.143.0 // indirect google.golang.org/appengine v1.6.7 // indirect diff --git a/hack/go.sum b/hack/go.sum index 8b95e62562..01252f1e7c 100644 --- a/hack/go.sum +++ b/hack/go.sum @@ -61,12 +61,12 @@ github.com/Antonboom/errname v0.1.7 h1:mBBDKvEYwPl4WFFNwec1CZO096G6vzK9vvDQzAwka github.com/Antonboom/errname v0.1.7/go.mod h1:g0ONh16msHIPgJSGsecu1G/dcF2hlYR/0SddnIAGavU= github.com/Antonboom/nilnil v0.1.1 h1:PHhrh5ANKFWRBh7TdYmyyq2gyT2lotnvFvvFbylF81Q= github.com/Antonboom/nilnil v0.1.1/go.mod h1:L1jBqoWM7AOeTD+tSquifKSesRHs4ZdaxvZR+xdJEaI= -github.com/Azure/azure-sdk-for-go/sdk/azcore v1.11.1 h1:E+OJmp2tPvt1W+amx48v1eqbjDYsgN+RzP4q16yV5eM= -github.com/Azure/azure-sdk-for-go/sdk/azcore v1.11.1/go.mod h1:a6xsAQUZg+VsS3TJ05SRp524Hs4pZ/AeFSr5ENf0Yjo= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.6.0 h1:U2rTu3Ef+7w9FHKIAXM6ZyqF3UOWJZ12zIm8zECAFfg= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.6.0/go.mod h1:9kIvujWAA58nmPmWB1m23fyWic1kYZMxD9CxaWn4Qpg= -github.com/Azure/azure-sdk-for-go/sdk/internal v1.8.0 h1:jBQA3cKT4L2rWMpgE7Yt3Hwh2aUj8KXjIGLxjHeYNNo= -github.com/Azure/azure-sdk-for-go/sdk/internal v1.8.0/go.mod h1:4OG6tQ9EOP/MT0NMjDlRzWoVFxfu9rN9B2X+tlSVktg= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.7.0 h1:8q4SaHjFsClSvuVne0ID/5Ka8u3fcIHyqkLjcFpNRHQ= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.7.0/go.mod h1:bjGvMhVMb+EEm3VRNQawDMUyMMjo+S5ewNjflkep/0Q= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.3.0 h1:vcYCAze6p19qBW7MhZybIsqD8sMV8js0NyQM8JDnVtg= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.3.0/go.mod h1:OQeznEEkTZ9OrhHJoDD8ZDq51FHgXjqtP9z6bEwBq9U= +github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0 h1:sXr+ck84g/ZlZUOZiNELInmMgOsuGwdjjVkEIde0OtY= +github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0/go.mod h1:okt5dMMTOFjX/aovMlrjvvXoPMBVSPzk9185BT0+eZM= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage v1.2.0 h1:Ma67P/GGprNwsslzEH6+Kb8nybI8jpDTm4Wmzu2ReK8= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage v1.2.0/go.mod h1:c+Lifp3EDEamAkPVzMooRNOK6CZjNSdEnf1A7jsI9u4= github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.1.0 h1:nVocQV40OQne5613EeLayJiRAJuKlBGy+m22qWG+WRg= @@ -75,8 +75,8 @@ github.com/Azure/go-autorest v14.2.0+incompatible h1:V5VMDjClD3GiElqLWO7mz2MxNAK github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= github.com/Azure/go-autorest/autorest/to v0.4.0 h1:oXVqrxakqqV1UZdSazDOPOLvOIz+XA683u8EctwboHk= github.com/Azure/go-autorest/autorest/to v0.4.0/go.mod h1:fE8iZBn7LQR7zH/9XU2NcPR4o9jEImooCeWJcYV/zLE= -github.com/AzureAD/microsoft-authentication-library-for-go v1.2.2 h1:XHOnouVk1mxXfQidrMEnLlPk9UMeRtyBTnEFtxkV0kU= -github.com/AzureAD/microsoft-authentication-library-for-go v1.2.2/go.mod h1:wP83P5OoQ5p6ip3ScPr0BAq0BvuPAvacpEuSzyouqAI= +github.com/AzureAD/microsoft-authentication-library-for-go v1.0.0 h1:OBhqkivkhkMqLPymWEppkm7vgPQY2XsHoEkaMQ0AdZY= +github.com/AzureAD/microsoft-authentication-library-for-go v1.0.0/go.mod h1:kgDmCTgBzIEPFElEF+FK0SdjAor06dRq2Go927dnQ6o= github.com/BurntSushi/locker v0.0.0-20171006230638-a6e239ea1c69 h1:+tu3HOoMXB7RXEINRVIpxJCT+KdYiI7LAEAUrOw3dIU= github.com/BurntSushi/locker v0.0.0-20171006230638-a6e239ea1c69/go.mod h1:L1AbZdiDllfyYH5l5OkAaZtk7VkWe89bPJFmnDBNHxg= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= @@ -306,6 +306,8 @@ github.com/disintegration/gift v1.2.1/go.mod h1:Jh2i7f7Q2BM7Ezno3PhfezbR1xpUg9dU github.com/dlclark/regexp2 v1.2.0/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc= github.com/dlclark/regexp2 v1.10.0 h1:+/GIL799phkJqYW+3YbOd8LCcbHzT0Pbo8zl70MHsq0= github.com/dlclark/regexp2 v1.10.0/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8= +github.com/dnaeon/go-vcr v1.2.0 h1:zHCHvJYTMh1N7xnV7zf1m1GPBF9Ad0Jk/whtQ1663qI= +github.com/dnaeon/go-vcr v1.2.0/go.mod h1:R4UdLID7HZT3taECzJs4YgbbH6PIGXB6W/sc5OLb6RQ= github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= github.com/elazarl/goproxy v0.0.0-20230808193330-2592e75ae04a h1:mATvB/9r/3gvcejNsXKSkQ6lcIaNec2nyfOdlTBR2lU= @@ -429,8 +431,8 @@ github.com/gohugoio/localescompressed v1.0.1 h1:KTYMi8fCWYLswFyJAeOtuk/EkXR/KPTH github.com/gohugoio/localescompressed v1.0.1/go.mod h1:jBF6q8D7a0vaEmcWPNcAjUZLJaIVNiwvM3WlmTvooB0= github.com/gohugoio/testmodBuilder/mods v0.0.0-20190520184928-c56af20f2e95 h1:sgew0XCnZwnzpWxTt3V8LLiCO7OQi3C6dycaE67wfkU= github.com/gohugoio/testmodBuilder/mods v0.0.0-20190520184928-c56af20f2e95/go.mod h1:bOlVlCa1/RajcHpXkrUXPSHB/Re1UnlXxD1Qp8SKOd8= -github.com/golang-jwt/jwt/v5 v5.2.1 h1:OuVbFODueb089Lh128TAcimifWaLhJwVflnrgM17wHk= -github.com/golang-jwt/jwt/v5 v5.2.1/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk= +github.com/golang-jwt/jwt/v4 v4.5.0 h1:7cYmW1XlMY7h7ii7UhUyChSgS5wUJEnm9uZVTGqOWzg= +github.com/golang-jwt/jwt/v4 v4.5.0/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/glog v1.2.0 h1:uCdmnmatrKCgMBlM4rMuJZWOkPDqdbZPnrMXDY4gI68= github.com/golang/glog v1.2.0/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w= @@ -540,8 +542,8 @@ github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaU github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= github.com/google/subcommands v1.0.1/go.mod h1:ZjhPrFU+Olkh9WazFPsl27BQ4UPiG37m3yTrtFlrHVk= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= -github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.3.1 h1:KjJaJ9iWZ3jOFZIf1Lqf4laDRCasjl0BCmnEGxkdLb4= +github.com/google/uuid v1.3.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/wire v0.5.0 h1:I7ELFeVBr3yfPIcc8+MWvrjk+3VjbcSzoXm3JVa+jD8= github.com/google/wire v0.5.0/go.mod h1:ngWDr9Qvq3yZA10YrxfyGELY/AFWGVpy9c1LTRi1EoU= github.com/googleapis/enterprise-certificate-proxy v0.3.1 h1:SBWmZhjUDRorQxrN0nwzf+AHBxnbFjViHQS4P0yVpmQ= @@ -842,8 +844,8 @@ github.com/perimeterx/marshmallow v1.1.5 h1:a2LALqQ1BlHM8PZblsDdidgv1mWi1DgC2UmX github.com/perimeterx/marshmallow v1.1.5/go.mod h1:dsXbUu8CRzfYP5a87xpp0xq9S3u0Vchtcl8we9tYaXw= github.com/pjbgf/sha1cd v0.3.0 h1:4D5XXmUUBUl/xQ6IjCkEAbqXskkq/4O7LmGn0AqMDs4= github.com/pjbgf/sha1cd v0.3.0/go.mod h1:nZ1rrWOcGJ5uZgEEVL1VUM9iRQiZvWdbZjkKyFzPPsI= -github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c h1:+mdjkGKdHQG3305AYmdv1U2eRNDiU2ErMBj1gwrq8eQ= -github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c/go.mod h1:7rwL4CYBLnjLxUqIJNnCWiEdr3bn6IUYi15bNlnbCCU= +github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 h1:KoWmjvw+nsYOo29YJK9vDA65RGE3NrOnUtO7a+RF9HU= +github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8/go.mod h1:HKlIX3XHQyzLZPlr7++PzdhaXEj94dEiJgZDTsxEqUI= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= @@ -904,8 +906,8 @@ github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6So github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= -github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= -github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= +github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= +github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= @@ -996,9 +998,8 @@ github.com/stbenjam/no-sprintf-host-port v0.1.1/go.mod h1:TLhvtIvONRzdmkFiio4O8L github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= -github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= -github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= github.com/stretchr/testify v0.0.0-20161117074351-18a02ba4a312/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.1.4/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.2.1/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= @@ -1011,9 +1012,8 @@ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8= github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU= @@ -1120,8 +1120,8 @@ golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0 golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= golang.org/x/crypto v0.3.1-0.20221117191849-2c476679df9a/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= -golang.org/x/crypto v0.24.0 h1:mnl8DM0o513X8fdIkmyFE/5hTYxbwYOjDS/+rK6qpRI= -golang.org/x/crypto v0.24.0/go.mod h1:Z1PMYSOR5nyMcyAVAIQSKCDwalqy85Aqn1x3Ws4L5DM= +golang.org/x/crypto v0.21.0 h1:X31++rzVUdKhX5sWmSOFZxx8UW/ldWx55cbf08iNAMA= +golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -1140,8 +1140,8 @@ golang.org/x/exp/typeparams v0.0.0-20230203172020-98cc5a0785f9/go.mod h1:AbB0pIl golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/image v0.0.0-20210220032944-ac19c3e999fb/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= -golang.org/x/image v0.18.0 h1:jGzIakQa/ZXI1I0Fxvaa9W7yP25TqT6cHIHn+6CqvSQ= -golang.org/x/image v0.18.0/go.mod h1:4yyo5vMFQjVjUcVk4jEQcU9MGy/rulF5WvUILseCM2E= +golang.org/x/image v0.13.0 h1:3cge/F/QTkNLauhf2QoE9zp+7sr+ZcL4HnoZmdwg9sg= +golang.org/x/image v0.13.0/go.mod h1:6mmbMOeV28HuMTgA6OSRkdXKYw/t5W9Uwn2Yv1r3Yxk= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -1172,8 +1172,8 @@ golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91 golang.org/x/mod v0.6.0/go.mod h1:4mET923SAdbXp2ki8ey+zGs1SLqsuM2Y0uvdZR/fUNI= golang.org/x/mod v0.7.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA= -golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.15.0 h1:SernR4v+D55NyBH2QiEQrlBAnj1ECL6AGrA5+dPaMY8= +golang.org/x/mod v0.15.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -1222,8 +1222,8 @@ golang.org/x/net v0.3.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE= golang.org/x/net v0.5.0/go.mod h1:DivGGAXEgPSlEBzxGzZI+ZLohi+xUj054jfeKui00ws= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= -golang.org/x/net v0.26.0 h1:soB7SVo0PWrY4vPW/+ay0jKDNScG2X9wFeYlXIvJsOQ= -golang.org/x/net v0.26.0/go.mod h1:5YKkiSynbBIh3p6iOc/vibscux0x38BZDkn8sCUPxHE= +golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -1249,8 +1249,8 @@ golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= -golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ= +golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1304,6 +1304,7 @@ golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210616045830-e2b7044e8c71/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211105183446-c75c47738b0c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -1319,8 +1320,8 @@ golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.21.0 h1:rF+pYz3DAGSQAxAu1CbC7catZg4ebC4UIeIhKxBZvws= -golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= +golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= @@ -1329,8 +1330,8 @@ golang.org/x/term v0.3.0/go.mod h1:q750SLmJuPmVoN1blW3UFBPREJfb1KmY3vwxfr+nFDA= golang.org/x/term v0.4.0/go.mod h1:9P2UbLfCdcvo3p/nzKvsmas4TnlujnuoV9hGgYzW1lQ= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= -golang.org/x/term v0.21.0 h1:WVXCp+/EBEHOj53Rvu+7KiT/iElMrO8ACK16SMZ3jaA= -golang.org/x/term v0.21.0/go.mod h1:ooXLefLobQVslOqselCNF4SxFAaoS6KujMbsGzSDmX0= +golang.org/x/term v0.18.0 h1:FcHjZXDMxI8mM3nwhX9HlKop4C0YQvCVCdwYl2wOtE8= +golang.org/x/term v0.18.0/go.mod h1:ILwASektA3OnRv7amZ1xhE/KTR+u50pbXfZ03+6Nx58= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -1344,8 +1345,8 @@ golang.org/x/text v0.5.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.6.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= -golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= -golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= +golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -1432,8 +1433,8 @@ golang.org/x/tools v0.3.0/go.mod h1:/rWhSS2+zyEVwoJf8YAX6L2f0ntZ7Kn/mGgAWcipA5k= golang.org/x/tools v0.4.0/go.mod h1:UE5sM2OK9E/d67R0ANs2xJizIymRP5gJU295PvKXxjQ= golang.org/x/tools v0.5.0/go.mod h1:N+Kgy78s5I24c24dU8OfWNEotWjutIs8SnJvn5IDq+k= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= -golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d h1:vU5i/LfpvrRCpgM/VPfJLg5KjxD3E+hfT1SH+d9zLwg= -golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= +golang.org/x/tools v0.18.0 h1:k8NLag8AGHnn+PHbl7g43CtqZAwG60vZkLqgyZgIHgQ= +golang.org/x/tools v0.18.0/go.mod h1:GL7B4CwcLLeo59yx/9UWWuNOW1n3VZ4f5axWfML7Lcg= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= diff --git a/kustomize/commands/edit/remove/removemetadata.go b/kustomize/commands/edit/remove/removemetadata.go index 8d04062c55..3c34916fcf 100644 --- a/kustomize/commands/edit/remove/removemetadata.go +++ b/kustomize/commands/edit/remove/removemetadata.go @@ -40,7 +40,7 @@ type removeMetadataOptions struct { kind kindOfAdd } -// newCmdRemoveAnnotation removes one or more commonAnnotations from the kustomization file. +// newCmdRemoveLabel removes one or more commonAnnotations from the kustomization file. func newCmdRemoveAnnotation(fSys filesys.FileSystem, v func([]string) error) *cobra.Command { var o removeMetadataOptions o.kind = label diff --git a/kustomize/commands/internal/kustfile/kustomizationfile.go b/kustomize/commands/internal/kustfile/kustomizationfile.go index 480eac473a..1f9e5f22bb 100644 --- a/kustomize/commands/internal/kustfile/kustomizationfile.go +++ b/kustomize/commands/internal/kustfile/kustomizationfile.go @@ -40,7 +40,6 @@ func determineFieldOrder() []string { ordered := []string{ "MetaData", - "SortOptions", "Resources", "Bases", "NamePrefix", @@ -66,7 +65,6 @@ func determineFieldOrder() []string { "Configurations", "Generators", "Transformers", - "Validators", "Components", "OpenAPI", "BuildMetadata", diff --git a/kustomize/commands/internal/kustfile/kustomizationfile_test.go b/kustomize/commands/internal/kustfile/kustomizationfile_test.go index 583ef69ea4..87d2f0fc67 100644 --- a/kustomize/commands/internal/kustfile/kustomizationfile_test.go +++ b/kustomize/commands/internal/kustfile/kustomizationfile_test.go @@ -5,7 +5,6 @@ package kustfile import ( "reflect" - "slices" "strings" "testing" @@ -22,7 +21,6 @@ func TestFieldOrder(t *testing.T) { "APIVersion", "Kind", "MetaData", - "SortOptions", "Resources", "Bases", "NamePrefix", @@ -48,7 +46,6 @@ func TestFieldOrder(t *testing.T) { "Configurations", "Generators", "Transformers", - "Validators", "Components", "OpenAPI", "BuildMetadata", @@ -90,155 +87,6 @@ func TestWriteAndRead(t *testing.T) { } } -func TestReadAndWrite(t *testing.T) { - kWrite := []byte(completeKustfileInOrder) - - fSys := filesys.MakeFsInMemory() - testutils_test.WriteTestKustomizationWith(fSys, kWrite) - mf, err := NewKustomizationFile(fSys) - if err != nil { - t.Fatalf("Unexpected Error: %v", err) - } - - kustomization, err := mf.Read() - if err != nil { - t.Fatalf("Unexpected Error: %v", err) - } - - if err := mf.Write(kustomization); err != nil { - t.Fatalf("Couldn't write kustomization file: %v\n", err) - } - - kRead, err := testutils_test.ReadTestKustomization(fSys) - if err != nil { - t.Fatalf("Unexpected Error: %v", err) - } - - if !reflect.DeepEqual(kWrite, kRead) { - t.Fatal("Written kustomization is different from read kustomization") - } -} - -func TestReadAndWriteDummy(t *testing.T) { - kWrite := &types.Kustomization{ - TypeMeta: types.TypeMeta{ - APIVersion: "kustomize.config.k8s.io/v1beta1", - Kind: "Kustomization", - }, - MetaData: &types.ObjectMeta{ - Name: "name", - Namespace: "namespace", - Labels: map[string]string{"label": "label"}, - Annotations: map[string]string{"annotation": "annotation"}, - }, - OpenAPI: map[string]string{"path": "schema.json"}, - NamePrefix: "prefix", - NameSuffix: "suffix", - Namespace: "namespace", - CommonLabels: map[string]string{"commonLabel": "commonLabel"}, - Labels: []types.Label{{ - Pairs: map[string]string{"label": "label"}, - IncludeSelectors: true, - IncludeTemplates: true, - FieldSpecs: []types.FieldSpec{{ - Path: "metadata.labels.label", - }}, - }}, - CommonAnnotations: map[string]string{"commonAnnotation": "commonAnnotation"}, - Patches: []types.Patch{{ - Path: "path", - }}, - Images: []types.Image{{ - Name: "name", - NewName: "newName", - TagSuffix: "tagSuffix", - NewTag: "newTag", - Digest: "digest", - }}, - Replacements: []types.ReplacementField{{ - Path: "path", - }}, - Replicas: []types.Replica{{ - Name: "name", - Count: 1, - }}, - SortOptions: &types.SortOptions{ - Order: types.LegacySortOrder, - LegacySortOptions: &types.LegacySortOptions{ - OrderFirst: []string{"orderFirst"}, - OrderLast: []string{"orderLast"}, - }, - }, - Resources: []string{"resource"}, - Components: []string{"component"}, - Crds: []string{"crd"}, - ConfigMapGenerator: []types.ConfigMapArgs{{ - GeneratorArgs: types.GeneratorArgs{ - Namespace: "namespace", - Name: "name", - }, - }}, - SecretGenerator: []types.SecretArgs{{ - GeneratorArgs: types.GeneratorArgs{ - Namespace: "namespace", - Name: "name", - }, - }}, - HelmGlobals: &types.HelmGlobals{ - ChartHome: "chartHome", - ConfigHome: "configHome", - }, - HelmCharts: []types.HelmChart{{ - Name: "name", - }}, - GeneratorOptions: &types.GeneratorOptions{ - Labels: map[string]string{"label": "label"}, - }, - Configurations: []string{"configuration"}, - Generators: []string{"generator"}, - Transformers: []string{"transformer"}, - Validators: []string{"validator"}, - BuildMetadata: []string{"buildMetadata"}, - } - - // this check is for forward compatibility: if this fails, add a dummy value to the Kustomization above - assertAllNonZeroExcept(t, kWrite, []string{"PatchesStrategicMerge", "PatchesJson6902", "ImageTags", "Vars", "Bases", "HelmChartInflationGenerator"}) - - fSys := filesys.MakeFsInMemory() - testutils_test.WriteTestKustomization(fSys) - mf, err := NewKustomizationFile(fSys) - if err != nil { - t.Fatalf("Unexpected Error: %v", err) - } - - if err := mf.Write(kWrite); err != nil { - t.Fatalf("Couldn't write kustomization file: %v\n", err) - } - - kRead, err := mf.Read() - if err != nil { - t.Fatalf("Unexpected Error: %v", err) - } - - if !reflect.DeepEqual(kWrite, kRead) { - t.Fatal("Written kustomization is different from read kustomization.") - } -} - -func assertAllNonZeroExcept(t *testing.T, val *types.Kustomization, except []string) { - t.Helper() - fFor := reflect.ValueOf(val).Elem() - n := fFor.NumField() - for i := 0; i < n; i++ { - key := fFor.Type().Field(i).Name - val := fFor.Field(i) - if val.IsZero() && !slices.Contains(except, key) { - t.Helper() - t.Fatalf("Key %s should not be empty", key) - } - } -} - func TestGetPath(t *testing.T) { fSys := filesys.MakeEmptyDirInMemory() testutils_test.WriteTestKustomization(fSys) @@ -538,80 +386,3 @@ foo: t.Fatalf("Expect an unknown field error but got: %v", err) } } - -const completeKustfileInOrder = ` -kind: Kustomization -apiVersion: kustomize.config.k8s.io/v1beta1 -metadata: - annotations: - annotation: annotation - labels: - label: label - name: name - namespace: namespace -openapi: - path: schema.json -namePrefix: prefix -nameSuffix: suffix -namespace: namespace -commonLabels: - commonLabel: commonLabel -labels: -- fields: - - path: metadata.labels.label - includeSelectors: true - includeTemplates: true - pairs: - label: label -commonAnnotations: - commonAnnotation: commonAnnotation -patches: -- path: path -images: -- digest: digest - name: name - newName: newName - newTag: newTag - tagSuffix: tagSuffix -replacements: -- path: path -replicas: -- count: 1 - name: name -sortOptions: - legacySortOptions: - orderFirst: - - orderFirst - orderLast: - - orderLast - order: legacy -resources: -- resource -components: -- component -crds: -- crd -configMapGenerator: -- name: name - namespace: namespace -secretGenerator: -- name: name - namespace: namespace -helmGlobals: - chartHome: chartHome - configHome: configHome -helmCharts: -- name: name -- name: chartName -generatorOptions: - labels: - label: label -configurations: -- configuration -generators: -- generator -transformers: -- transformer -buildMetadata: -- buildMetadata -` diff --git a/kustomize/commands/localize/localize.go b/kustomize/commands/localize/localize.go index 5aaa9bb41d..d557ebceb0 100644 --- a/kustomize/commands/localize/localize.go +++ b/kustomize/commands/localize/localize.go @@ -4,14 +4,10 @@ package localize import ( - "bytes" "log" - "path/filepath" "github.com/spf13/cobra" lclzr "sigs.k8s.io/kustomize/api/krusty/localizer" - "sigs.k8s.io/kustomize/kustomize/v5/commands/build" - "sigs.k8s.io/kustomize/kyaml/copyutil" "sigs.k8s.io/kustomize/kyaml/errors" "sigs.k8s.io/kustomize/kyaml/filesys" ) @@ -24,26 +20,23 @@ type arguments struct { } type flags struct { - scope string - noVerify bool + scope string } // NewCmdLocalize returns a new localize command. func NewCmdLocalize(fs filesys.FileSystem) *cobra.Command { var f flags - var buildBuffer bytes.Buffer - buildCmd := build.NewCmdBuild(fs, &build.Help{}, &buildBuffer) cmd := &cobra.Command{ Use: "localize [target [destination]]", Short: "[Alpha] Creates localized copy of target kustomization root at destination", - Long: `[Alpha] Creates copy of target kustomization directory or -versioned URL at destination, where remote references in the original + Long: `[Alpha] Creates copy of target kustomization directory or +versioned URL at destination, where remote references in the original are replaced by local references to the downloaded remote content. -If target is not specified, the current working directory will be used. -Destination is a path to a new directory in an existing directory. If -destination is not specified, a new directory will be created in the current -working directory. +If target is not specified, the current working directory will be used. +Destination is a path to a new directory in an existing directory. If +destination is not specified, a new directory will be created in the current +working directory. For details, see: https://kubectl.docs.kubernetes.io/references/kustomize/cmd/ @@ -53,7 +46,7 @@ alphabetizes kustomization fields in the localized copy. `, Example: ` # Localize the current working directory, with default scope and destination -kustomize localize +kustomize localize # Localize some local directory, with scope and default destination kustomize localize /home/path/scope/target --scope /home/path/scope @@ -69,30 +62,6 @@ kustomize localize https://github.com/kubernetes-sigs/kustomize//api/krusty/test if err != nil { return errors.Wrap(err) } - - if !f.noVerify { - originalBuild, err := runBuildCmd(buildBuffer, buildCmd, args.target) - if err != nil { - return errors.Wrap(err) - } - - buildDst := dst - if f.scope != "" && f.scope != args.target { - buildDst = filepath.Join(dst, filepath.Base(args.target)) - } - - localizedBuild, err := runBuildCmd(buildBuffer, buildCmd, buildDst) - if err != nil { - return errors.Wrap(err) - } - - if localizedBuild != originalBuild { - copyutil.PrettyFileDiff(originalBuild, localizedBuild) - log.Fatalf("VERIFICATION FAILED: `kustomize build` for %s and %s are different after localization.\n", args.target, dst) - } - log.Printf("VERIFICATION SUCCESS: `kustomize build` for %s and %s are the same after localization.\n", args.target, dst) - } - log.Printf("SUCCESS: localized %q to directory %s\n", args.target, dst) return nil }, @@ -105,12 +74,6 @@ kustomize localize https://github.com/kubernetes-sigs/kustomize//api/krusty/test Cannot specify for remote targets, as scope is by default the containing repo. If not specified for local target, scope defaults to target. `) - cmd.Flags().BoolVar(&f.noVerify, - "no-verify", - false, - `Does not verify that the outputs of kustomize build for target and newDir are the same after localization. - If not specified, this flag defaults to false and will run kustomize build. - `) return cmd } @@ -129,16 +92,3 @@ func matchArgs(rawArgs []string) arguments { } return args } - -func runBuildCmd(buffer bytes.Buffer, cmd *cobra.Command, folder string) (buildOutput string, err error) { - buffer.Reset() - buildErr := cmd.RunE(cmd, []string{folder}) - if buildErr != nil { - log.Printf("If your target directory requires flags to build: \n"+ - "1. Add executable permissions for the downloaded exec binaries in '%s'. \n"+ - "2. Run kustomize build with the necessary flags and self-verify the outputs.", folder) - return "", errors.Wrap(buildErr) - } - - return buffer.String(), nil -} diff --git a/kustomize/commands/localize/localize_test.go b/kustomize/commands/localize/localize_test.go index 6daa8db495..8052d2b86e 100644 --- a/kustomize/commands/localize/localize_test.go +++ b/kustomize/commands/localize/localize_test.go @@ -39,24 +39,6 @@ spec: - containerPort: 80 ` -const helmKustomization = `apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization -helmCharts: -- name: external-dns - repo: oci://registry-1.docker.io/bitnamicharts - version: 6.19.2 - releaseName: test - valuesInline: - crd: - create: false - rbac: - create: false - serviceAccount: - create: false - service: - enabled: false -` - func TestScopeFlag(t *testing.T) { kustomizations := map[string]string{ filepath.Join("target", "kustomization.yaml"): fmt.Sprintf(`resources: @@ -84,60 +66,6 @@ func TestScopeFlag(t *testing.T) { loctest.CheckFs(t, testDir.String(), expected, actual) } -func TestNoVerifyFlag(t *testing.T) { - kustomization := map[string]string{ - "kustomization.yaml": `resources: -- deployment.yaml -`, - "deployment.yaml": deployment, - } - expected, actual, target := loctest.PrepareFs(t, nil, kustomization) - - buffy := new(bytes.Buffer) - log.SetOutput(buffy) - defer func() { - log.SetOutput(os.Stderr) - }() - cmd := localize.NewCmdLocalize(actual) - require.NoError(t, cmd.Flags().Set("no-verify", "true")) - err := cmd.RunE(cmd, []string{ - target.String(), - target.Join("dst"), - }) - require.NoError(t, err) - - loctest.SetupDir(t, expected, target.Join("dst"), kustomization) - loctest.CheckFs(t, target.String(), expected, actual) - - successMsg := fmt.Sprintf(`SUCCESS: localized "%s" to directory %s -`, target.String(), target.Join("dst")) - verifyMsg := "VERIFICATION" - require.NotContains(t, buffy.String(), verifyMsg) - require.Contains(t, buffy.String(), successMsg) -} - -func TestFailingBuildCmd(t *testing.T) { - kustomization := map[string]string{ - "kustomization.yaml": helmKustomization, - } - _, actual, target := loctest.PrepareFs(t, nil, kustomization) - - buffy := new(bytes.Buffer) - log.SetOutput(buffy) - defer func() { - log.SetOutput(os.Stderr) - }() - cmd := localize.NewCmdLocalize(actual) - err := cmd.RunE(cmd, []string{ - target.String(), - target.Join("dst"), - }) - require.Error(t, err) - - verifyMsg := "If your target directory requires flags to build" - require.Contains(t, buffy.String(), verifyMsg) -} - func TestOptionalArgs(t *testing.T) { for name, args := range map[string][]string{ "no_target": {}, @@ -171,8 +99,6 @@ func TestOptionalArgs(t *testing.T) { loctest.SetupDir(t, expected, dst, kust) loctest.CheckFs(t, testDir.String(), expected, actual) - verifyMsg := "VERIFICATION SUCCESS" - require.Contains(t, buffy.String(), verifyMsg) successMsg := fmt.Sprintf(`SUCCESS: localized "." to directory %s `, dst) require.Contains(t, buffy.String(), successMsg) @@ -202,8 +128,6 @@ func TestOutput(t *testing.T) { loctest.SetupDir(t, expected, target.Join("dst"), kustomization) loctest.CheckFs(t, target.String(), expected, actual) - verifyMsg := "VERIFICATION SUCCESS" - require.Contains(t, buffy.String(), verifyMsg) successMsg := fmt.Sprintf(`SUCCESS: localized "%s" to directory %s `, target.String(), target.Join("dst")) require.Contains(t, buffy.String(), successMsg) diff --git a/kustomize/go.mod b/kustomize/go.mod index df9eae8450..3bb80bba2e 100644 --- a/kustomize/go.mod +++ b/kustomize/go.mod @@ -30,7 +30,6 @@ require ( github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect - github.com/sergi/go-diff v1.2.0 // indirect github.com/xlab/treeprint v1.2.0 // indirect go.starlark.net v0.0.0-20200306205701-8dd3e2ee1dd5 // indirect golang.org/x/sys v0.18.0 // indirect diff --git a/kustomize/go.sum b/kustomize/go.sum index c62d4fd078..f47f5a0a2e 100644 --- a/kustomize/go.sum +++ b/kustomize/go.sum @@ -35,7 +35,6 @@ github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2 github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= @@ -65,7 +64,6 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= -github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= @@ -89,15 +87,12 @@ google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQ google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/evanphx/json-patch.v4 v4.12.0 h1:n6jtcsulIzXPJaxegRbvFNNrZDjbij7ny3gmSPG+6V4= gopkg.in/evanphx/json-patch.v4 v4.12.0/go.mod h1:p8EYWUEYMpynmqDbY58zCKCFZw8pRWMG4EsWvDvM72M= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= -gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= From ceaa14b50c07c0446979b124c72552ee8eee0119 Mon Sep 17 00:00:00 2001 From: Kurnianto Trilaksono Date: Tue, 10 Sep 2024 22:47:23 +0800 Subject: [PATCH 21/21] update README.md --- releasing/README.md | 247 +++++++++++--------------------------------- 1 file changed, 63 insertions(+), 184 deletions(-) diff --git a/releasing/README.md b/releasing/README.md index 336a1bd392..9090ada541 100644 --- a/releasing/README.md +++ b/releasing/README.md @@ -14,7 +14,6 @@ [kustomize repo release page]: https://github.com/kubernetes-sigs/kustomize/releases [OpenAPI Readme]: ../kyaml/openapi/README.md [the build status for container image]: https://console.cloud.google.com/cloud-build/builds?project=k8s-staging-kustomize -[build history of GitHub Actions job]: /../../actions This document describes how to perform a [semver release] of one of the several [Go modules] in this repository. @@ -113,203 +112,117 @@ source releasing/helpers.sh gh auth login ``` -## Release `kyaml` - -#### Establish clean state - -``` -refreshMaster && -testKustomizeRepo -``` - -While you're waiting for the tests, review the commit log: - -``` -releasing/compile-changelog.sh kyaml HEAD -``` +## Releasing `kyaml` Based on the changes to be included in this release, decide whether a patch, minor or major version bump is needed: [semver review]. -kyaml has no intra-repo deps, so if the tests pass, -it can just be released. - -#### Release it +To release `kyaml`, simply use command below. -The default increment is a new patch version. - -``` -gorepomod release kyaml [patch|minor|major] --doIt -``` - -Note the version: -``` -versionKyaml=v0.10.20 # EDIT THIS! +```shell +./releasing/create-release kyaml [major|minor|patch] ``` -See the process of the [build history of GitHub Actions job]. +The release command will go through these steps: +1. Create a release branch +2. Pull changes from master +3. Run Github Workflow for `kyaml`, which detailed into steps below. + 1. Run unit test + 2. Build library + 3. Bump `kyaml` version and push release tag + 4. Create a release draft +4. Maintainer will validate the release draft and publish Undraft the release on the [kustomize repo release page]: * Make sure the version number is what you expect. * Remove references to commits that aren't relevant to end users of this module (e.g. test commits, refactors). * Make sure each commit left in the release notes includes a PR reference. - -## Release `cmd/config` - -#### Pin to the most recent kyaml - -``` -gorepomod pin kyaml --doIt -``` - -Create the PR: -``` -createBranch pinToKyaml "Update kyaml to $versionKyaml" -``` -``` -createPr -``` - -Review the resulting PR and get a collaborator to LGTM. Wait for CI to pass. - -Once the PR merges, get back on master and do paranoia test: -``` -refreshMaster && -testKustomizeRepo -``` - -While you're waiting for the tests, review the commit log: - -``` -releasing/compile-changelog.sh cmd/config HEAD -``` +## Releasing `cmd/config` Based on the changes to be included in this release, decide whether a patch, minor or major version bump is needed: [semver review]. -#### Release it - -``` -gorepomod release cmd/config [patch|minor|major] --doIt -``` +To release `cmd/config`, simply use command below. -Note the version: -``` -versionCmdConfig=v0.9.12 # EDIT THIS! +```shell +./releasing/create-release cmd/config [major|minor|patch] ``` -See the process of the [build history of GitHub Actions job]. +The release command will go through these steps: +1. Create a release branch in `release-cmd/config/vX.Y.Z` format +2. Pull changes from master +3. Run Github Workflow for `cmd/config`, which detailed into steps below. + 1. Run unit test + 2. Get latest tag from master branch and pin `kyaml` version + 3. Build library + 4. Bump `cmd/config` version and push release tag + 5. Create a release draft +4. Maintainer will validate the release draft and publish Undraft the release on the [kustomize repo release page]: * Make sure the version number is what you expect. * Remove references to commits that aren't relevant to end users of this module (e.g. test commits, refactors). * Make sure each commit left in the release notes includes a PR reference. +## Releasing `api` -## Release `api` - -This is the kustomize API, used by the kustomize CLI. - +Based on the changes to be included in this release, decide whether a patch, minor or major version bump is needed: [semver review]. -#### Pin to the new cmd/config +To release `api`, simply use command below. -``` -gorepomod pin cmd/config --doIt +```shell +./releasing/create-release api [major|minor|patch] ``` -Create the PR: -``` -createBranch pinToCmdConfig "Update cmd/config to $versionCmdConfig" && -createPr -``` +The release command will go through these steps: +1. Create a release branch in `release-api/vX.Y.Z` format +2. Pull changes from master +3. Run Github Workflow for `api`, which detailed into steps below. + 1. Run unit test + 2. Get latest tag from master branch and pin `kyaml` version + 3. Build library + 4. Bump `api` version and push release tag + 5. Create a release draft +4. Maintainer will validate the release draft and publish -Review the resulting PR and get a collaborator to LGTM. Wait for CI to pass. +Undraft the release on the [kustomize repo release page]: +* Make sure the version number is what you expect. +* Remove references to commits that aren't relevant to end users of this module (e.g. test commits, refactors). +* Make sure each commit left in the release notes includes a PR reference. -Once the PR merges, get back on master and do paranoia test: -``` -refreshMaster && -testKustomizeRepo -``` +## Releasing kustomize CLI -While you're waiting for the tests, review the commit log: +To release `kustomize`, simply use command below. -``` -releasing/compile-changelog.sh api HEAD +```shell +./releasing/create-release kustomize [major|minor|patch] ``` -Based on the changes to be included in this release, decide whether a patch, minor or major version bump is needed: [semver review]. - -#### Release it - -``` -gorepomod release api [patch|minor|major] --doIt -``` - -Note the version: -``` -versionApi=v0.8.10 # EDIT THIS! -``` - -See the process of the [build history of GitHub Actions job]. +The release command will go through these steps: +1. Create a release branch in `release-kustomize/vX.Y.Z` format +2. Pull changes from master +3. Run Github Workflow for `kustomize`, which detailed into steps below. + 1. Run unit test + 2. Get latest tag from master branch and pin `cmd/config`, and `api` version + 3. Build library + 4. Bump `kustomize` version and push release tag + 5. Create a release draft +4. Maintainer will validate the release draft and publish Undraft the release on the [kustomize repo release page]: * Make sure the version number is what you expect. -* Remove references to commits that aren't relevant to end users of this module (e.g. test commits, refactors). +* Remove references to commits that aren't relevant to end users of the CLI (e.g. test commits, refactors, changes that only surface in Go). * Make sure each commit left in the release notes includes a PR reference. - -## Release the kustomize CLI - #### For major releases: increment the module version +`Note:` This operation must be done manually to avoid error. + Update `module sigs.k8s.io/kustomize/kustomize/vX` in `kustomize/go.mod` to the version you're about to release, and then update all the `require` statements across the module to match. Search for uses of the version number across the codebase and update them as needed. Example: https://github.com/kubernetes-sigs/kustomize/pull/5021 -#### Pin to the new API - -``` -gorepomod pin api --doIt -``` - -Create the PR: -``` -createBranch pinToApi "Update api to $versionApi" && -createPr -``` - -Review the resulting PR and get a collaborator to LGTM. Wait for CI to pass. - -Once the PR merges, get back on master and do paranoia test: -``` -refreshMaster && -testKustomizeRepo -``` - -While you're waiting for the tests, review the commit log: - -``` -releasing/compile-changelog.sh kustomize HEAD -``` - -Based on the changes to be included in this release, decide whether a patch, minor or major version bump is needed: [semver review]. - -#### Release it - -``` -gorepomod release kustomize [patch|minor|major] --doIt -``` - -See the process of the [build history of GitHub Actions job]. - -And check the process of [the build status for container image]. - -Undraft the release on the [kustomize repo release page]: -* Make sure the version number is what you expect. -* Remove references to commits that aren't relevant to end users of the CLI (e.g. test commits, refactors, changes that only surface in Go). -* Make sure each commit left in the release notes includes a PR reference. - ## Confirm the kustomize binary is correct [installation instructions]: https://kubectl.docs.kubernetes.io/installation/kustomize/binaries/ @@ -321,39 +234,6 @@ Undraft the release on the [kustomize repo release page]: * Visit the [release page] and edit the release notes as desired. -## Return the repo to development mode - -Go back into development mode, where all modules depend on in-repo code: - -``` -gorepomod unpin api --doIt && -gorepomod unpin cmd/config --doIt && -gorepomod unpin kyaml --doIt -``` - -[Makefile]: https://github.com/kubernetes-sigs/kustomize/blob/master/Makefile - -Edit the `prow-presubmit-target` in the [Makefile] -to test examples against your new release. For example: - -``` -sed -i "" "s/LATEST_RELEASE=.*/LATEST_RELEASE=v5.0.0/" Makefile -``` - -Create the PR: -``` -createBranch unpinEverything "Back to development mode; unpin the modules" && -createPr -``` - -Review the resulting PR and get a collaborator to LGTM. Wait for CI to pass. - -Once the PR merges, get back on master and do paranoia test: -``` -refreshMaster && -testKustomizeRepo -``` - ## Publish Official Docker Image [k8s.io]: https://github.com/kubernetes/k8s.io @@ -389,7 +269,6 @@ When prompted, review the list of suggested module versions and make sure it mat If code used by the kustomize attachment points has changed, kubectl will fail to compile and you will need to update them. The code you'll need to change is likely in the `staging/src/k8s.io/cli-runtime/pkg/resource` and/or `staging/src/k8s.io/kubectl/pkg/cmd/kustomize` packages. - Here are some example PRs: https://github.com/kubernetes/kubernetes/pull/103419