Documentation ¶
Index ¶
- func EnvmanExport(name, value string) error
- func NewConfig() (config, error)
- func NewGitRepo(ctx context.Context, p NewGitRepoParams) (*gitRepo, error)
- func NewGithubClient(ctx context.Context, repo *githubRepo) (*githubClient, error)
- func NewGithubRepo(url, user string, token stepconf.Secret) (*githubRepo, error)
- type Integration
- type NewGitRepoParams
- type Templates
- type UpdateFilesParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnvmanExport ¶
EnvmanExport exports an environment variable using envman.
func NewConfig ¶
func NewConfig() (config, error)
NewConfig returns a new configuration initialized from environment variables.
func NewGitRepo ¶
func NewGitRepo(ctx context.Context, p NewGitRepoParams) (*gitRepo, error)
NewGitRepo returns a new local clone of a remote repository. It should be closed after usage.
func NewGithubClient ¶
NewGithubClient returns a new Github client to interact with a given repository.
Types ¶
type Integration ¶
type Integration struct { // Repo is local clone of remote repository. Repo localRepository // ExportEnv is an environment variable exporter. ExportEnv envExporter // Renderer renders templates to a given repository. Renderer allFilesRenderer }
Integration is a GitOps integration for Bitrise CI.
func (Integration) UpdateFiles ¶
func (i Integration) UpdateFiles(ctx context.Context, p UpdateFilesParams) error
UpdateFiles updates files in a GitOps repository. It either pushes changes to the given branch directly or opens a pull request for manual approval. URL of the pull request is exported to the PR_URL environment variable in the latter case.
type NewGitRepoParams ¶
type NewGitRepoParams struct { PullRequestOpener pullRequestOpener GithubRepo *githubRepo Branch string }
NewGitRepoParams are parameters for NewGitRepo function.
type Templates ¶
type Templates struct { // Source folder of templates. SourceFolder string // Values to substitute into the templates. Values map[string]string // Destination repository for rendered files. DestinationRepo localRepository // Destination folder inside the repository for rendered files. DestinationFolder string }
Templates renders a folder of templates to a local repository.
type UpdateFilesParams ¶
type UpdateFilesParams struct { // PullRequest won't push to the branch. It will open a PR only instead. PullRequest bool // PullRequestTitle is the title of the opened pull request. PullRequestTitle string // PullRequestBody is the body of the opened pull request. PullRequestBody string // CommitMessage is the created commit's message. CommitMessage string }
UpdateFilesParams are parameters for UpdateFiles function.