environments

package
v1.3.889 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2019 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigureGitFn

type ConfigureGitFn func(dir string, gitInfo *gits.GitRepository, gitAdapter gits.Gitter) error

ConfigureGitFn callback to optionally configure git before its used for creating commits and PRs

type EnvironmentPullRequestOptions

type EnvironmentPullRequestOptions struct {
	Gitter        gits.Gitter
	GitProvider   gits.GitProvider
	ModifyChartFn ModifyChartFn
	ConfigGitFn   ConfigureGitFn
}

EnvironmentPullRequestOptions are options for creating a pull request against an environment. The provide a Gitter client for performing git operations, a GitProvider client for talking to the git provider, a callback ModifyChartFn which is where the changes you want to make are defined, and a ConfigureGitFn which is run allowing you to add external git configuration.

func (*EnvironmentPullRequestOptions) Create

func (o *EnvironmentPullRequestOptions) Create(env *jenkinsv1.Environment, branchNameText *string, title *string,
	message *string, environmentsDir string, pullRequestInfo *gits.PullRequestInfo) (*gits.PullRequestInfo, error)

Create a pull request against the environment repository for env. The EnvironmentPullRequestOptions are used to provide a Gitter client for performing git operations, a GitProvider client for talking to the git provider, a callback ModifyChartFn which is where the changes you want to make are defined, and a ConfigureGitFn which is run allowing you to add external git configuration. The branchNameText defines the branch name used, the title is used for both the commit and the pull request title, the message as the body for both the commit and the pull request, and the pullRequestInfo for any existing PR that exists to modify the environment that we want to merge these changes into.

type ModifyChartFn

type ModifyChartFn func(requirements *helm.Requirements, metadata *chart.Metadata, values map[string]interface{},
	templates map[string]string, dir string) error

ModifyChartFn callback for modifying a chart, requirements, the chart metadata, the values.yaml and all files in templates are unmarshaled, and the root dir for the chart is passed

func CreateAddRequirementFn

func CreateAddRequirementFn(chartName string, alias string, version string, repo string,
	valuesFiles []string, chartDir string, verbose bool) ModifyChartFn

CreateAddRequirementFn create the ModifyChartFn that adds a dependency to a chart. It takes the chart name, an alias for the chart, the version of the chart, the repo to load the chart from, valuesFiles (an array of paths to values.yaml files to add). The chartDir is the unpacked chart being added, which is used to add extra metadata about the chart (e.g. the charts readme, the release.yaml, the git repo url and the release notes) - if this points to a non-existant directory it will be ignored.

Jump to

Keyboard shortcuts

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