1
0
mirror of synced 2026-02-06 10:55:56 +00:00

Add branch flag to bootstrap cmd

This commit is contained in:
stefanprodan
2020-09-09 16:13:56 +03:00
parent f9d546676b
commit 1218d6abe8
7 changed files with 47 additions and 31 deletions

View File

@@ -10,6 +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")
--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

View File

@@ -35,6 +35,9 @@ gotk bootstrap github [flags]
# Run bootstrap for a private repo hosted on GitHub Enterprise
gotk bootstrap github --owner=<organization> --repository=<repo name> --hostname=<domain>
# Run bootstrap for a an existing repository with a branch named main
gotk bootstrap github --owner=<organization> --repository=<repo name> --branch=main
```
### Options
@@ -55,6 +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")
--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")

View File

@@ -32,6 +32,9 @@ gotk bootstrap gitlab [flags]
# Run bootstrap for a private repo hosted on a GitLab server
gotk bootstrap gitlab --owner=<group> --repository=<repo name> --hostname=<domain>
# Run bootstrap for a an existing repository with a branch named main
gotk bootstrap gitlab --owner=<organization> --repository=<repo name> --branch=main
```
### Options
@@ -52,6 +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")
--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")

View File

@@ -79,6 +79,10 @@ cluster e.g. `staging-cluster` and `production-cluster`:
└── gitops-system
```
!!! hint "Change the default branch"
If you wish to change the branch to something else than master, create the repository manually,
push a branch to origin and then use `gotk bootstrap <GIT-PROVIDER> --branch=your-branch`.
### GitHub and GitHub Enterprise
Generate a [personal access token](https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line)