bootstrap

package
v0.7.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 25, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Export

func Export(ctx context.Context, cfg *config.MpasConfig, repositoryURL string) error

Export exports the latest version of the component with the given name to the given path.

Types

type GiteaCmd

type GiteaCmd struct {
	// Owner is the owner of the repository
	Owner string
	// Token is the token to use for authentication
	Token string
	// Personal indicates whether the repository is a personal repository
	Personal bool
	// Hostname is the hostname of the Gitea instance
	Hostname string
	// Repository is the name of the repository
	Repository string
	// FromFile is the path to a file archive to use for bootstrapping
	FromFile string
	// Registry is the registry to use for the bootstrap components
	Registry string
	// DockerconfigPath is the path to the docker config file
	DockerconfigPath string
	// Path is the path in the repository to use to host the bootstrapped components yamls
	Path string
	// CommitMessageAppendix is the appendix to add to the commit message
	// for example to skip CI
	CommitMessageAppendix string
	// Private indicates whether the repository is private
	Private bool
	// Interval is the interval to use for reconciling
	Interval time.Duration
	// Timeout is the timeout to use for operations
	Timeout time.Duration
	// Components is the list of components to install
	Components []string
	// DestructiveActions indicates whether destructive actions are allowed
	DestructiveActions bool
	// TestURL is the URL to use for testing the management repository
	TestURL string
	// CaFile defines and optional root certificate for the git repository used by flux.
	CaFile string
	// contains filtered or unexported fields
}

GiteaCmd is a command for bootstrapping a Gitea repository

func (*GiteaCmd) Cleanup

func (b *GiteaCmd) Cleanup(ctx context.Context) error

Cleanup cleans up the resources created by the command.

func (*GiteaCmd) Execute

func (b *GiteaCmd) Execute(ctx context.Context, cfg *config.MpasConfig) error

Execute executes the command and returns an error if one occurred.

type GithubCmd

type GithubCmd struct {
	// Owner is the owner of the repository
	Owner string
	// Token is the token to use for authentication
	Token string
	// Personal indicates whether the repository is a personal repository
	Personal bool
	// Hostname is the hostname of the Github instance
	Hostname string
	// Repository is the name of the repository
	Repository string
	// FromFile is the path to a file archive to use for bootstrapping
	FromFile string
	// Registry is the registry to use for the bootstrap components
	Registry string
	// DockerconfigPath is the path to the docker config file
	DockerconfigPath string
	// Path is the path in the repository to use to host the bootstrapped components yamls
	Path string
	// CommitMessageAppendix is the appendix to add to the commit message
	// for example to skip CI
	CommitMessageAppendix string
	// Private indicates whether the repository is private
	Private bool
	// Interval is the interval to use for reconciling
	Interval time.Duration
	// Timeout is the timeout to use for operations
	Timeout time.Duration
	// Components is the list of components to install
	Components []string
	// DestructiveActions indicates whether destructive actions are allowed
	DestructiveActions bool
	// CaFile defines and optional root certificate for the git repository used by flux.
	CaFile string
	// contains filtered or unexported fields
}

GithubCmd is a command for bootstrapping a GitHub repository

func (*GithubCmd) Cleanup

func (b *GithubCmd) Cleanup(ctx context.Context) error

Cleanup cleans up the resources created by the command.

func (*GithubCmd) Execute

func (b *GithubCmd) Execute(ctx context.Context, cfg *config.MpasConfig) error

Execute executes the command and returns an error if one occurred.

type GitlabCmd added in v0.6.3

type GitlabCmd struct {
	// Owner is the owner of the repository
	Owner string
	// Token is the token to use for authentication
	Token string
	// Token is the token to use for authentication
	TokenType string
	// Personal indicates whether the repository is a personal repository
	Personal bool
	// Hostname is the hostname of the Gitlab instance
	Hostname string
	// Repository is the name of the repository
	Repository string
	// FromFile is the path to a file archive to use for bootstrapping
	FromFile string
	// Registry is the registry to use for the bootstrap components
	Registry string
	// DockerconfigPath is the path to the docker config file
	DockerconfigPath string
	// Path is the path in the repository to use to host the bootstrapped components yaml files
	Path string
	// CommitMessageAppendix is the appendix to add to the commit message
	// for example to skip CI
	CommitMessageAppendix string
	// Private indicates whether the repository is private
	Private bool
	// Interval is the interval to use for reconciling
	Interval time.Duration
	// Timeout is the timeout to use for operations
	Timeout time.Duration
	// Components is the list of components to install
	Components []string
	// DestructiveActions indicates whether destructive actions are allowed
	DestructiveActions bool
	// TestURL is the URL to use for testing the management repository
	TestURL string
	// CaFile defines and optional root certificate for the git repository used by flux.
	CaFile string
	// contains filtered or unexported fields
}

GitlabCmd is a command for bootstrapping a Gitlab repository

func (*GitlabCmd) Cleanup added in v0.6.3

func (b *GitlabCmd) Cleanup(ctx context.Context) error

Cleanup cleans up the resources created by the command.

func (*GitlabCmd) Execute added in v0.6.3

func (b *GitlabCmd) Execute(ctx context.Context, cfg *config.MpasConfig) error

Execute executes the command and returns an error if one occurred.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL