Documentation
¶
Index ¶
- Constants
- Variables
- func CollapseDependencyUpdates(dependencyUpdates []v1.DependencyUpdate) []v1.DependencyUpdate
- func CreateBucketHTTPFn(authSvc auth.ConfigService) func(string) (string, func(*http.Request), error)
- func NewCmdStepBlog(commonOpts *opts.CommonOptions) *cobra.Command
- func NewCmdStepChangelog(commonOpts *opts.CommonOptions) *cobra.Command
- func NewCmdStepCredential(commonOpts *opts.CommonOptions) *cobra.Command
- func NewCmdStepCustomPipeline(commonOpts *opts.CommonOptions) *cobra.Command
- func NewCmdStepGpgCredentials(commonOpts *opts.CommonOptions) *cobra.Command
- func NewCmdStepLinkServices(commonOpts *opts.CommonOptions) *cobra.Command
- func NewCmdStepNextBuildNumber(commonOpts *opts.CommonOptions) *cobra.Command
- func NewCmdStepNextVersion(commonOpts *opts.CommonOptions) *cobra.Command
- func NewCmdStepOverrideRequirements(commonOpts *opts.CommonOptions) *cobra.Command
- func NewCmdStepRelease(commonOpts *opts.CommonOptions) *cobra.Command
- func NewCmdStepReplicate(commonOpts *opts.CommonOptions) *cobra.Command
- func NewCmdStepSplitMonorepo(commonOpts *opts.CommonOptions) *cobra.Command
- func NewCmdStepStash(commonOpts *opts.CommonOptions) *cobra.Command
- func NewCmdStepTag(commonOpts *opts.CommonOptions) *cobra.Command
- func NewCmdStepUnstash(commonOpts *opts.CommonOptions) *cobra.Command
- func NewCmdStepValidate(commonOpts *opts.CommonOptions) *cobra.Command
- func NewCmdStepValuesSchemaTemplate(commonOpts *opts.CommonOptions) *cobra.Command
- func NewCmdStepWaitForArtifact(commonOpts *opts.CommonOptions) *cobra.Command
- func NewCmdStepWaitForChart(commonOpts *opts.CommonOptions) *cobra.Command
- func Unstash(u string, outDir string, timeout time.Duration, authSvc auth.ConfigService) error
- type PackageJSON
- type Project
- type ReplicateOptions
- type StepBlogOptions
- type StepBlogState
- type StepChangelogOptions
- type StepChangelogState
- type StepCredentialOptions
- type StepCustomPipelineOptions
- type StepGpgCredentialsOptions
- type StepLinkServicesOptions
- type StepNextBuildNumberOptions
- type StepNextVersionOptions
- type StepOverrideRequirementsOptions
- type StepReleaseOptions
- type StepSplitMonorepoOptions
- type StepStashOptions
- type StepTagFlags
- type StepTagOptions
- type StepUnstashOptions
- type StepValidateOptions
- type StepValuesSchemaTemplateOptions
- type StepWaitForArtifactOptions
- type WaitForChartOptions
Constants ¶
const ( ReleaseName = `{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}` SpecName = `{{ .Chart.Name }}` SpecVersion = `{{ .Chart.Version }}` ReleaseCrdYaml = `` /* 524-byte string literal not displayed */ )
const ( VERSION = "version" ValuesYamlRepositoryPrefix = " repository:" ValuesYamlTagPrefix = " tag:" )
const (
DefaultMavenCentralRepo = "https://repo1.maven.org/maven2/"
)
const (
// Description common text for long command descriptions around storage
Description = `
Annotates a secret or configmap so it can be replicated across an environment
`
)
const ( // storageSupportDescription common text for long command descriptions around storage StorageSupportDescription = `` /* 267-byte string literal not displayed */ )
Variables ¶
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+)`) )
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 `) )
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* `) )
var ( StepNextBuildNumberLong = templates.LongDesc(` Generates the next build unique number for a pipeline `) StepNextBuildNumberExample = templates.Examples(` jx step next-buildnumber `) )
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 `) )
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 `) )
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
Types ¶
type PackageJSON ¶
type PackageJSON struct {
Version string `json:"version"`
}
type ReplicateOptions ¶
type ReplicateOptions struct {
step.StepOptions
ReplicateToNamepace []string
CreateNamespace bool
}
ReplicateOptions contains the command line flags
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
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
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 ¶
func (o *StepCustomPipelineOptions) Run() error
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 ¶
func (o *StepGpgCredentialsOptions) Run() error
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 ¶
func (o *StepNextBuildNumberOptions) Run() error
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 ¶
func (o *StepOverrideRequirementsOptions) Run() error
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
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 ¶
func (o *StepSplitMonorepoOptions) Run() error
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
type StepTagFlags ¶
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 ¶
StepUnstashOptions contains the command line flags
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 ¶
func (o *StepValuesSchemaTemplateOptions) Run() error
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 ¶
func (o *StepWaitForArtifactOptions) Run() error
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
Source Files
¶
- step_blog.go
- step_changelog.go
- step_credential.go
- step_custom_pipeline.go
- step_gpg_credentials.go
- step_link_services.go
- step_next_buildnumber.go
- step_next_version.go
- step_override_requirements.go
- step_release.go
- step_replicate.go
- step_split_monorepo.go
- step_stash.go
- step_tag.go
- step_unstash.go
- step_validate.go
- step_values_schema_template.go
- step_wait_for_artifact.go
- step_wait_for_chart.go