mirror of
https://github.com/fluxcd/flux2.git
synced 2026-02-22 15:41:47 +00:00
add gitImplementation as a bootstrap flag
The gitImplementation flag is needed as a bootstrap flag to be able to clone using libgit2 for example when bootstraping in a azure devops repo. Signed-off-by: Edvin Norling <edvin.norling@xenit.se>
This commit is contained in:
parent
7265276cc2
commit
ec4273b507
4 changed files with 5 additions and 3 deletions
|
|
@ -41,6 +41,7 @@ type bootstrapFlags struct {
|
|||
|
||||
branch string
|
||||
recurseSubmodules bool
|
||||
gitImplementation flags.GitImplementation
|
||||
manifestsPath string
|
||||
|
||||
defaultComponents []string
|
||||
|
|
@ -93,6 +94,7 @@ func init() {
|
|||
bootstrapCmd.PersistentFlags().StringVar(&bootstrapArgs.branch, "branch", bootstrapDefaultBranch, "Git branch")
|
||||
bootstrapCmd.PersistentFlags().BoolVar(&bootstrapArgs.recurseSubmodules, "recurse-submodules", false,
|
||||
"when enabled, configures the GitRepository source to initialize and include Git submodules in the artifact it produces")
|
||||
bootstrapCmd.PersistentFlags().Var(&bootstrapArgs.gitImplementation, "git-implementation", bootstrapArgs.gitImplementation.Description())
|
||||
|
||||
bootstrapCmd.PersistentFlags().StringVar(&bootstrapArgs.manifestsPath, "manifests", "", "path to the manifest directory")
|
||||
|
||||
|
|
|
|||
|
|
@ -194,7 +194,7 @@ func bootstrapGitCmdRun(cmd *cobra.Command, args []string) error {
|
|||
Secret: bootstrapArgs.secretName,
|
||||
TargetPath: gitArgs.path.ToSlash(),
|
||||
ManifestFile: sync.MakeDefaultOptions().ManifestFile,
|
||||
GitImplementation: sourceGitArgs.gitImplementation.String(),
|
||||
GitImplementation: bootstrapArgs.gitImplementation.String(),
|
||||
RecurseSubmodules: bootstrapArgs.recurseSubmodules,
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -212,7 +212,7 @@ func bootstrapGitHubCmdRun(cmd *cobra.Command, args []string) error {
|
|||
Secret: bootstrapArgs.secretName,
|
||||
TargetPath: githubArgs.path.ToSlash(),
|
||||
ManifestFile: sync.MakeDefaultOptions().ManifestFile,
|
||||
GitImplementation: sourceGitArgs.gitImplementation.String(),
|
||||
GitImplementation: bootstrapArgs.gitImplementation.String(),
|
||||
RecurseSubmodules: bootstrapArgs.recurseSubmodules,
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -228,7 +228,7 @@ func bootstrapGitLabCmdRun(cmd *cobra.Command, args []string) error {
|
|||
Secret: bootstrapArgs.secretName,
|
||||
TargetPath: gitlabArgs.path.ToSlash(),
|
||||
ManifestFile: sync.MakeDefaultOptions().ManifestFile,
|
||||
GitImplementation: sourceGitArgs.gitImplementation.String(),
|
||||
GitImplementation: bootstrapArgs.gitImplementation.String(),
|
||||
RecurseSubmodules: bootstrapArgs.recurseSubmodules,
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue