git

package
v2.1.153 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2020 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// StepGitCloseLong command long description
	StepGitCloseLong = templates.LongDesc(`
		This pipeline step will close git provider issue trackers, wikis and projects that are not in use 
		(no issues, no wiki pages, no projects). It will log any it can't close, indicating why.

`)
	// StepGitCloseExample command example
	StepGitCloseExample = templates.Examples(`
		# Close unused issue trackers, wikis and projects for organizations
		jx step git close --org https://github.com/jenkins-x --org https://github.com/jenkins-x

		# Close unused issue trackers, wikis and projects for an organization
		jx step git close --org https://github.com/jenkins-x --include jenkins-x/jx

`)
)
View Source
var (
	// StepGitEnvsLong command long description
	StepGitEnvsLong = templates.LongDesc(`
		This pipeline step generates a Git environment variables from the current Git provider pipeline Secrets

`)
	// StepGitEnvsExample command example
	StepGitEnvsExample = templates.Examples(`
		# Sets the Git environment variables for the current GitHub provider
		jx step git envs

		# Sets the Gie environment variables for the current Gtilab provider
		jx step git envs --service-kind=gitlab
`)
)
View Source
var (
	// StepGitForkAndCloneLong command long description
	StepGitForkAndCloneLong = templates.LongDesc(`
		This pipeline step will clone a git repo, creating a fork if required. The fork is created if the owner of the 
		repo is not the current git user (and that forking the git repo is allowed).

`)
	// StepGitForkAndCloneExample command example
	StepGitForkAndCloneExample = templates.Examples(`
		# Fork and clone the jx repo
		jx step git fork-and-clone https://github.com/jenkins-x/jx.git

		# Duplicate and clone the jx repo. This will create a new repo and mirror the contents of the source repo into,
		# but it won't mark it as a fork in the git provider
		jx step git fork-and-clone https://github.com/jenkins-x/jx.git --duplicate


`)
)
View Source
var (
	// StepGitMergeLong command long description
	StepGitMergeLong = templates.LongDesc(`
		This pipeline step merges any SHAs specified into the HEAD of master. 

If no SHAs are specified then the PULL_REFS environment variable will be parsed for a branch:sha comma separated list of
shas to merge. For example:

master:ef08a6cd194c2687d4bc12df6bb8a86f53c348ba,2739:5b351f4eae3c4afbb90dd7787f8bf2f8c454723f,2822:bac2a1f34fd54811fb767f69543f59eb3949b2a5

`)
	// StepGitMergeExample command example
	StepGitMergeExample = templates.Examples(`
		# Merge the SHAs from the PULL_REFS environment variable
		jx step git merge

		# Merge the SHA into the HEAD of master
		jx step git merge --sha 123456a

		# Merge a number of SHAs into the HEAD of master
		jx step git merge --sha 123456a --sha 789012b
`)
)

Functions

func NewCmdStepGit

func NewCmdStepGit(commonOpts *opts.CommonOptions) *cobra.Command

NewCmdStepGit Steps a command object for the "step" command

func NewCmdStepGitClose

func NewCmdStepGitClose(commonOpts *opts.CommonOptions) *cobra.Command

NewCmdStepGitClose create the 'step git envs' command

func NewCmdStepGitEnvs

func NewCmdStepGitEnvs(commonOpts *opts.CommonOptions) *cobra.Command

NewCmdStepGitEnvs create the 'step git envs' command

func NewCmdStepGitForkAndClone

func NewCmdStepGitForkAndClone(commonOpts *opts.CommonOptions) *cobra.Command

NewCmdStepGitForkAndClone create the 'step git envs' command

func NewCmdStepGitMerge

func NewCmdStepGitMerge(commonOpts *opts.CommonOptions) *cobra.Command

NewCmdStepGitMerge create the 'step git envs' command

func NewCmdStepGitValidate

func NewCmdStepGitValidate(commonOpts *opts.CommonOptions) *cobra.Command

NewCmdStepGitValidate creates a command to validate gitconfig

Types

type StepGitCloseOptions

type StepGitCloseOptions struct {
	step.StepOptions
	Dir      string
	Orgs     []string
	Excludes []string
	Includes []string
	DryRun   bool
}

StepGitCloseOptions contains the command line flags

func (*StepGitCloseOptions) Run

func (o *StepGitCloseOptions) Run() error

Run implements the command

type StepGitEnvsOptions

type StepGitEnvsOptions struct {
	step.StepOptions

	ServiceKind string
}

StepGitEnvsOptions contains the command line flags

func (*StepGitEnvsOptions) Run

func (o *StepGitEnvsOptions) Run() error

Run implements the command

type StepGitForkAndCloneOptions

type StepGitForkAndCloneOptions struct {
	step.StepOptions
	Dir         string
	BaseRef     string
	PrintOutDir bool
	OutputDir   string
}

StepGitForkAndCloneOptions contains the command line flags

func (*StepGitForkAndCloneOptions) Run

Run implements the command

type StepGitMergeOptions

type StepGitMergeOptions struct {
	step.StepOptions

	SHAs       []string
	Remote     string
	Dir        string
	BaseBranch string
	BaseSHA    string
}

StepGitMergeOptions contains the command line flags

func (*StepGitMergeOptions) Run

func (o *StepGitMergeOptions) Run() error

Run implements the command

type StepGitOptions

type StepGitOptions struct {
	step.StepOptions
}

StepGitOptions contains the command line flags

func (*StepGitOptions) Run

func (o *StepGitOptions) Run() error

Run implements this command

type StepGitValidateOptions

type StepGitValidateOptions struct {
	step.StepOptions
}

StepGitValidateOptions contains the command line flags

func (*StepGitValidateOptions) Run

func (o *StepGitValidateOptions) Run() error

Run validates git config

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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