Add bootstrap reinstall e2e test

pull/219/head
stefanprodan 4 years ago
parent 1218d6abe8
commit a7b1b04920

@ -29,7 +29,15 @@ jobs:
run: echo "::set-output name=sha_short::$(git rev-parse --short HEAD)" run: echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
- name: Build - name: Build
run: sudo go build -o ./bin/gotk ./cmd/gotk 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: | run: |
./bin/gotk bootstrap github \ ./bin/gotk bootstrap github \
--owner=fluxcd-testing \ --owner=fluxcd-testing \
@ -41,6 +49,14 @@ jobs:
run: | run: |
./bin/gotk suspend kustomization gitops-system ./bin/gotk suspend kustomization gitops-system
./bin/gotk uninstall --resources --crds -s ./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 - name: delete repository
run: | run: |
./bin/gotk bootstrap github \ ./bin/gotk bootstrap github \

@ -72,7 +72,7 @@ func init() {
bootstrapCmd.PersistentFlags().StringVar(&bootstrapArch, "arch", "amd64", bootstrapCmd.PersistentFlags().StringVar(&bootstrapArch, "arch", "amd64",
"arch can be amd64 or arm64") "arch can be amd64 or arm64")
bootstrapCmd.PersistentFlags().StringVar(&bootstrapBranch, "branch", bootstrapDefaultBranch, 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) rootCmd.AddCommand(bootstrapCmd)
} }

@ -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") --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]) --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-controller,helm-controller,notification-controller])
-h, --help help for bootstrap -h, --help help for bootstrap
--image-pull-secret string Kubernetes secret name used for pulling the toolkit images from a private registry --image-pull-secret string Kubernetes secret name used for pulling the toolkit images from a private registry

@ -58,7 +58,7 @@ gotk bootstrap github [flags]
``` ```
--arch string arch can be amd64 or arm64 (default "amd64") --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]) --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 --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") --kubeconfig string path to the kubeconfig file (default "~/.kube/config")

@ -55,7 +55,7 @@ gotk bootstrap gitlab [flags]
``` ```
--arch string arch can be amd64 or arm64 (default "amd64") --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]) --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 --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") --kubeconfig string path to the kubeconfig file (default "~/.kube/config")

Loading…
Cancel
Save