diff --git a/.github/workflows/bootstrap.yaml b/.github/workflows/bootstrap.yaml index 211b567f2c0ec6d3abdfcf912e8fd190a804e06d..0b41c1a470197f5d832348c2a73d51c82d12b4e7 100644 --- a/.github/workflows/bootstrap.yaml +++ b/.github/workflows/bootstrap.yaml @@ -29,7 +29,15 @@ jobs: run: echo "::set-output name=sha_short::$(git rev-parse --short HEAD)" - name: Build run: sudo go build -o ./bin/gotk ./cmd/gotk - - name: gotk bootstrap github + - name: bootstrap init + run: | + ./bin/gotk bootstrap github \ + --owner=fluxcd-testing \ + --repository=gotk-test-${{ steps.vars.outputs.sha_short }} \ + --path=test-cluster + env: + GITHUB_TOKEN: ${{ secrets.GITPROVIDER_BOT_TOKEN }} + - name: bootstrap no-op run: | ./bin/gotk bootstrap github \ --owner=fluxcd-testing \ @@ -41,6 +49,14 @@ jobs: run: | ./bin/gotk suspend kustomization gitops-system ./bin/gotk uninstall --resources --crds -s + - name: bootstrap reinstall + run: | + ./bin/gotk bootstrap github \ + --owner=fluxcd-testing \ + --repository=gotk-test-${{ steps.vars.outputs.sha_short }} \ + --path=test-cluster + env: + GITHUB_TOKEN: ${{ secrets.GITPROVIDER_BOT_TOKEN }} - name: delete repository run: | ./bin/gotk bootstrap github \ diff --git a/cmd/gotk/bootstrap.go b/cmd/gotk/bootstrap.go index e90d4f3a99f539ea7099b33f493de06b9272b7fe..5802cf26f23648104912c904e7e79cb00172c19a 100644 --- a/cmd/gotk/bootstrap.go +++ b/cmd/gotk/bootstrap.go @@ -72,7 +72,7 @@ func init() { bootstrapCmd.PersistentFlags().StringVar(&bootstrapArch, "arch", "amd64", "arch can be amd64 or arm64") bootstrapCmd.PersistentFlags().StringVar(&bootstrapBranch, "branch", bootstrapDefaultBranch, - "default branch (for GitHub this must match the organization default branch setting)") + "default branch (for GitHub this must match the default branch setting for the organization)") rootCmd.AddCommand(bootstrapCmd) } diff --git a/docs/cmd/gotk_bootstrap.md b/docs/cmd/gotk_bootstrap.md index 9cd75b6da1cc60e28efcb2d6643e627b7a8bca2f..de373453d79ac797719054bba9e1b22200ff9d03 100644 --- a/docs/cmd/gotk_bootstrap.md +++ b/docs/cmd/gotk_bootstrap.md @@ -10,7 +10,7 @@ The bootstrap sub-commands bootstrap the toolkit components on the targeted Git ``` --arch string arch can be amd64 or arm64 (default "amd64") - --branch string default branch (for GitHub this must match the organization default branch setting) (default "master") + --branch string default branch (for GitHub this must match the default branch setting for the organization) (default "master") --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-controller,helm-controller,notification-controller]) -h, --help help for bootstrap --image-pull-secret string Kubernetes secret name used for pulling the toolkit images from a private registry diff --git a/docs/cmd/gotk_bootstrap_github.md b/docs/cmd/gotk_bootstrap_github.md index 3ddc3a978ce9caf69be4e0b75f9e9039e3068d3e..5bca06e97fa88bb7b70d27d9bb4bf824413e914a 100644 --- a/docs/cmd/gotk_bootstrap_github.md +++ b/docs/cmd/gotk_bootstrap_github.md @@ -58,7 +58,7 @@ gotk bootstrap github [flags] ``` --arch string arch can be amd64 or arm64 (default "amd64") - --branch string default branch (for GitHub this must match the organization default branch setting) (default "master") + --branch string default branch (for GitHub this must match the default branch setting for the organization) (default "master") --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-controller,helm-controller,notification-controller]) --image-pull-secret string Kubernetes secret name used for pulling the toolkit images from a private registry --kubeconfig string path to the kubeconfig file (default "~/.kube/config") diff --git a/docs/cmd/gotk_bootstrap_gitlab.md b/docs/cmd/gotk_bootstrap_gitlab.md index f666688e333641b9b6c488464f6e41b6158a8828..7c7805ab0caf37c04c9a6413046f4b42ed49b88c 100644 --- a/docs/cmd/gotk_bootstrap_gitlab.md +++ b/docs/cmd/gotk_bootstrap_gitlab.md @@ -55,7 +55,7 @@ gotk bootstrap gitlab [flags] ``` --arch string arch can be amd64 or arm64 (default "amd64") - --branch string default branch (for GitHub this must match the organization default branch setting) (default "master") + --branch string default branch (for GitHub this must match the default branch setting for the organization) (default "master") --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-controller,helm-controller,notification-controller]) --image-pull-secret string Kubernetes secret name used for pulling the toolkit images from a private registry --kubeconfig string path to the kubeconfig file (default "~/.kube/config")