step

package
v2.0.400-0...-14731b4 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2021 License: Apache-2.0 Imports: 63 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ReleaseName = `{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}`

	SpecName    = `{{ .Chart.Name }}`
	SpecVersion = `{{ .Chart.Version }}`

	ReleaseCrdYaml = `` /* 524-byte string literal not displayed */

)
View Source
const (
	VERSION = "version"

	ValuesYamlRepositoryPrefix = "  repository:"
	ValuesYamlTagPrefix        = "  tag:"
)
View Source
const (
	DefaultMavenCentralRepo = "https://repo1.maven.org/maven2/"
)
View Source
const (

	// Description common text for long command descriptions around storage
	Description = `
Annotates a secret or configmap so it can be replicated across an environment
`
)
View Source
const (

	// storageSupportDescription common text for long command descriptions around storage
	StorageSupportDescription = `` /* 267-byte string literal not displayed */

)

Variables

View Source
var (
	GitAccessDescription = `` /* 363-byte string literal not displayed */

	StepChangelogLong = templates.LongDesc(`
		Generates a Changelog for the latest tag

		This command will generate a Changelog as markdown for the git commit range given. 
		If you are using GitHub it will also update the GitHub Release with the changelog. You can disable that by passing'--update-release=false'

		If you have just created a git tag this command will try default to the changes between the last tag and the previous one. You can always specify the exact Git references (tag/sha) directly via '--previous-rev' and '--rev'

		The changelog is generated by parsing the git commits. It will also detect any text like 'fixes #123' to link to issue fixes. You can also use Conventional Commits notation: https://conventionalcommits.org/ to get a nicer formatted changelog. e.g. using commits like 'fix:(my feature) this my fix' or 'feat:(cheese) something'

		This command also generates a Release Custom Resource Definition you can include in your helm chart to give metadata about the changelog of the application along with metadata about the release (git tag, url, commits, issues fixed etc). Including this metadata in a helm charts means we can do things like automatically comment on issues when they hit Staging or Production; or give detailed descriptions of what things have changed when using GitOps to update versions in an environment by referencing the fixed issues in the Pull Request.

		You can opt out of the release YAML generation via the '--generate-yaml=false' option
		
		To update the release notes on GitHub / Gitea this command needs a git API token.

`) + GitAccessDescription

	StepChangelogExample = templates.Examples(`
		# generate a changelog on the current source
		jx step changelog

		# specify the version to use
		jx step changelog --version 1.2.3

		# specify the version and a header template
		jx step changelog --header-file docs/dev/changelog-header.md --version 1.2.3

`)

	GitHubIssueRegex = regexp.MustCompile(`(\#\d+)`)
	JIRAIssueRegex   = regexp.MustCompile(`[A-Z][A-Z]+-(\d+)`)
)
View Source
var (
	StepGpgCredentialsLong = templates.LongDesc(`
		This pipeline step generates GPG credentials files from the ` + kube.SecretJenkinsReleaseGPG + ` secret

`)

	StepGpgCredentialsExample = templates.Examples(`
		# generate the GPG credentials file in the canonical location
		jx step gpg credentials

		# generate the git credentials to a output file
		jx step gpg credentials -o /tmp/mycreds

`)
)
View Source
var (
	StepLinkServicesLong = templates.LongDesc(`
		This pipeline step helps to link microservices from different namespaces like staging/production onto a preview environment
`)

	StepLinkServicesExample = templates.Examples(`
	#Link services from jx-staging namespace to the current namespace
	jx step link services --from-namespace jx-staging 

	#Link services from jx-staging namespace to the jx-prod namespace
	jx step link services --from-namespace jx-staging --to-namespace jx-prod
	
	#Link services from jx-staging namespace to the jx-prod namespace including all but the ones starting with  the characters 'cheese'
	jx step link services --from-namespace jx-staging --to-namespace jx-prod --includes * --excludes cheese*
`)
)
View Source
var (
	StepNextBuildNumberLong = templates.LongDesc(`
		Generates the next build unique number for a pipeline
`)

	StepNextBuildNumberExample = templates.Examples(`
		jx step next-buildnumber 
`)
)
View Source
var (
	StepNextVersionLong = templates.LongDesc(`
		This pipeline step command works out a semantic version, writes a file ./VERSION and optionally updates a file
`)

	StepNextVersionExample = templates.Examples(`
		jx step next-version
		jx step next-version --filename package.json
		jx step next-version --filename package.json --tag
		jx step next-version --filename package.json --tag --version 1.2.3

		# lets use git to create a new version from a tag and tag git
        jx step next-version --use-git-tag-only --tag
              
`)
)
View Source
var (
	StepWaitForArtifactLong = templates.LongDesc(`
		Waits for the given artifact to be available in a maven style repository

`)

	StepWaitForArtifactExample = templates.Examples(`
		# wait for a 
		jx step gpg credentials

		# generate the git credentials to a output file
		jx step gpg credentials -o /tmp/mycreds

`)
)
View Source
var (
	// StepWaitForChartLong CLI long description
	StepWaitForChartLong = templates.LongDesc(`
		Waits for the given Chart to be available in a Helm repository

`)
	// StepWaitForChartExample CLI example
	StepWaitForChartExample = templates.Examples(`
		# wait for a chart to be available
		jx step wait-for-chart --chart-name foo --chart-version 1.0.0

`)
)

Functions

func CollapseDependencyUpdates

func CollapseDependencyUpdates(dependencyUpdates []v1.DependencyUpdate) []v1.DependencyUpdate

CollapseDependencyUpdates takes a raw set of dependencyUpdates, removes duplicates and collapses multiple updates to the same org/repo:components into a sungle update

func CreateBucketHTTPFn

func CreateBucketHTTPFn(authSvc auth.ConfigService) func(string) (string, func(*http.Request), error)

CreateBucketHTTPFn creates a function to transform a git URL to add the token and possible header function for accessing a git based bucket

func NewCmdStepBlog

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

NewCmdStepBlog Creates a new Command object

func NewCmdStepChangelog

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

func NewCmdStepCredential

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

NewCmdStepCredential creates the command

func NewCmdStepCustomPipeline

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

NewCmdStepCustomPipeline creates the new command

func NewCmdStepGpgCredentials

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

func NewCmdStepLinkServices

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

NewCmdStepLinkServices Creates a new Command object

func NewCmdStepNextBuildNumber

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

func NewCmdStepNextVersion

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

func NewCmdStepOverrideRequirements

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

NewCmdStepOverrideRequirements creates the `jx step verify pod` command

func NewCmdStepRelease

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

NewCmdStep Steps a command object for the "step" command

func NewCmdStepReplicate

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

NewCmdStepReplicate creates the CLI command

func NewCmdStepSplitMonorepo

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

NewCmdStepSplitMonorepo Creates a new Command object

func NewCmdStepStash

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

NewCmdStepStash creates the CLI command

func NewCmdStepTag

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

func NewCmdStepUnstash

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

NewCmdStepUnstash creates the CLI command

func NewCmdStepValidate

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

NewCmdStepValidate Creates a new Command object

func NewCmdStepValuesSchemaTemplate

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

NewCmdStepValuesSchemaTemplate Creates a new Command object

func NewCmdStepWaitForArtifact

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

func NewCmdStepWaitForChart

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

NewCmdStepWaitForChart creates the CLI command

func Unstash

func Unstash(u string, outDir string, timeout time.Duration, authSvc auth.ConfigService) error

Types

type PackageJSON

type PackageJSON struct {
	Version string `json:"version"`
}

type Project

type Project struct {
	Version string `xml:"version"`
}

type ReplicateOptions

type ReplicateOptions struct {
	step.StepOptions
	ReplicateToNamepace []string
	CreateNamespace     bool
}

ReplicateOptions contains the command line flags

func (*ReplicateOptions) Run

func (o *ReplicateOptions) Run() error

Run runs the command

type StepBlogOptions

type StepBlogOptions struct {
	step.StepOptions

	FromDate                    string
	ToDate                      string
	Dir                         string
	BlogOutputDir               string
	BlogName                    string
	CombineMinorReleases        bool
	DeveloperChannelMemberCount int
	UserChannelMemberCount      int

	State StepBlogState
}

StepBlogOptions contains the command line flags

func (*StepBlogOptions) CreateChatProvider

func (o *StepBlogOptions) CreateChatProvider(chatConfig *config.ChatConfig) (chats.ChatProvider, error)

CreateChatProvider creates a new chart provider from the given configuration

func (*StepBlogOptions) Run

func (o *StepBlogOptions) Run() error

Run implements this command

type StepBlogState

type StepBlogState struct {
	GitInfo                  *gits.GitRepository
	GitProvider              gits.GitProvider
	Tracker                  issues.IssueProvider
	Release                  *v1.Release
	BlogFileName             string
	DeveloperChatMetricsName string
	UserChatMetricsName      string
	Buffer                   *bytes.Buffer
	Writer                   *bufio.Writer
	HistoryService           *reports.ProjectHistoryService
	History                  *reports.ProjectHistory
	NewContributors          map[string]*v1.UserDetails
	NewCommitters            map[string]*v1.UserDetails
}

type StepChangelogOptions

type StepChangelogOptions struct {
	step.StepOptions

	PreviousRevision    string
	PreviousDate        string
	CurrentRevision     string
	TemplatesDir        string
	ReleaseYamlFile     string
	CrdYamlFile         string
	Dir                 string
	Version             string
	Build               string
	Header              string
	HeaderFile          string
	Footer              string
	FooterFile          string
	OutputMarkdownFile  string
	OverwriteCRD        bool
	GenerateCRD         bool
	GenerateReleaseYaml bool
	UpdateRelease       bool
	NoReleaseInDev      bool
	IncludeMergeCommits bool
	FailIfFindCommits   bool
	State               StepChangelogState
}

StepChangelogOptions contains the command line flags

func (*StepChangelogOptions) Run

func (o *StepChangelogOptions) Run() error

type StepChangelogState

type StepChangelogState struct {
	GitInfo         *gits.GitRepository
	GitProvider     gits.GitProvider
	Tracker         issues.IssueProvider
	FoundIssueNames map[string]bool
	LoggedIssueKind bool
	Release         *v1.Release
}

type StepCredentialOptions

type StepCredentialOptions struct {
	step.StepOptions

	Namespace string
	Secret    string
	Key       string
	File      string
	Optional  bool
}

StepCredentialOptions contains the command line arguments for this command

func (*StepCredentialOptions) Run

func (o *StepCredentialOptions) Run() error

Run runs the command

type StepCustomPipelineOptions

type StepCustomPipelineOptions struct {
	step.StepOptions

	MultiBranchProject bool
	Dir                string
	Jenkinsfile        string
	JenkinsPath        string
	JenkinsSelector    opts.JenkinsSelectorOptions
}

StepCustomPipelineOptions contains the command line arguments for this command

func (*StepCustomPipelineOptions) Run

Run implements the command

type StepGpgCredentialsOptions

type StepGpgCredentialsOptions struct {
	step.StepOptions

	OutputDir string
}

StepGpgCredentialsOptions contains the command line flags

func (*StepGpgCredentialsOptions) GenerateGpgFiles

func (o *StepGpgCredentialsOptions) GenerateGpgFiles(secret *v1.Secret) error

func (*StepGpgCredentialsOptions) Run

type StepLinkServicesOptions

type StepLinkServicesOptions struct {
	step.StepOptions
	FromNamespace string
	ToNamespace   string
	Includes      []string
	Excludes      []string
}

StepLinkServicesOptions contains the command line flags

func (*StepLinkServicesOptions) Run

func (o *StepLinkServicesOptions) Run() error

Run implements this command

type StepNextBuildNumberOptions

type StepNextBuildNumberOptions struct {
	step.StepOptions

	Owner      string
	Repository string
	Branch     string
}

StepNextBuildNumberOptions contains the command line flags

func (*StepNextBuildNumberOptions) Run

type StepNextVersionOptions

type StepNextVersionOptions struct {
	Filename        string
	Dir             string
	ChartsDir       string
	Tag             bool
	UseGitTagOnly   bool
	NewVersion      string
	SemanticRelease bool
	step.StepOptions
}

StepNextVersionOptions contains the command line flags

func (*StepNextVersionOptions) GetVersion

func (o *StepNextVersionOptions) GetVersion() (string, error)

GetVersion gets the version from a source file

func (*StepNextVersionOptions) Run

func (o *StepNextVersionOptions) Run() error

func (*StepNextVersionOptions) SetVersion

func (o *StepNextVersionOptions) SetVersion() error

SetVersion Sets the version...

type StepOverrideRequirementsOptions

type StepOverrideRequirementsOptions struct {
	*opts.CommonOptions
	Dir string
}

StepOverrideRequirementsOptions contains the command line flags

func (*StepOverrideRequirementsOptions) Run

Run implements this command

type StepReleaseOptions

type StepReleaseOptions struct {
	step.StepOptions

	DockerRegistry string
	Organisation   string
	Application    string
	Version        string
	GitUsername    string
	GitEmail       string
	Dir            string
	XdgConfigHome  string
	NoBatch        bool

	// promote flags
	Build               string
	Timeout             string
	PullRequestPollTime string
	LocalHelmRepoName   string
	HelmRepositoryURL   string
}

StepReleaseOptions contains the CLI arguments

func (*StepReleaseOptions) Run

func (o *StepReleaseOptions) Run() error

Run implements this command

func (*StepReleaseOptions) Setenv

func (o *StepReleaseOptions) Setenv(key string, value string) error

type StepSplitMonorepoOptions

type StepSplitMonorepoOptions struct {
	step.StepOptions

	Glob          string
	Organisation  string
	RepoName      string
	Dir           string
	OutputDir     string
	KubernetesDir string
	NoGit         bool
	PrivateGit    bool
}

StepSplitMonorepoOptions contains the command line flags

func (*StepSplitMonorepoOptions) Run

Run implements this command

type StepStashOptions

type StepStashOptions struct {
	step.StepOptions
	Pattern         []string
	Dir             string
	ToPath          string
	Basedir         string
	StorageLocation jenkinsv1.StorageLocation
	ProjectGitURL   string
	ProjectBranch   string
}

StepStashOptions contains the command line flags

func (*StepStashOptions) Run

func (o *StepStashOptions) Run() error

Run runs the command

type StepTagFlags

type StepTagFlags struct {
	Version              string
	VersionFile          string
	Dir                  string
	ChartsDir            string
	ChartValueRepository string
	NoApply              bool
}

type StepTagOptions

type StepTagOptions struct {
	step.StepOptions

	Flags StepTagFlags
}

CreateClusterOptions the flags for running create cluster

func (*StepTagOptions) Run

func (o *StepTagOptions) Run() error

type StepUnstashOptions

type StepUnstashOptions struct {
	step.StepOptions

	URL     string
	OutDir  string
	Timeout time.Duration
}

StepUnstashOptions contains the command line flags

func (*StepUnstashOptions) Run

func (o *StepUnstashOptions) Run() error

Run runs the command

type StepValidateOptions

type StepValidateOptions struct {
	step.StepOptions

	MinimumJxVersion string
	Dir              string
}

StepValidateOptions contains the command line flags

func (*StepValidateOptions) Run

func (o *StepValidateOptions) Run() error

Run implements this command

type StepValuesSchemaTemplateOptions

type StepValuesSchemaTemplateOptions struct {
	step.StepOptions

	ConfigMapName string
	ConfigMapKey  string
	Set           []string
}

StepValuesSchemaTemplateOptions contains the command line flags

func (*StepValuesSchemaTemplateOptions) Run

Run implements this command

type StepWaitForArtifactOptions

type StepWaitForArtifactOptions struct {
	step.StepOptions

	ArtifactURL string
	RepoURL     string
	GroupId     string
	ArtifactId  string
	Version     string
	Extension   string
	Timeout     string
	PollTime    string

	// calculated fields
	TimeoutDuration time.Duration
	PollDuration    time.Duration
}

StepWaitForArtifactOptions contains the command line flags

func (*StepWaitForArtifactOptions) Run

type WaitForChartOptions

type WaitForChartOptions struct {
	*step.StepOptions

	ChartName    string
	ChartVersion string
	ChartRepo    string
	RepoUsername string
	RepoPassword string
	Timeout      string
	PollTime     string

	// calculated fields
	TimeoutDuration time.Duration
	PollDuration    time.Duration
}

WaitForChartOptions contains the command line flags

func (*WaitForChartOptions) Run

func (o *WaitForChartOptions) Run() error

Run runs the command

Jump to

Keyboard shortcuts

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