Documentation ¶
Index ¶
- Constants
- Variables
- func AddGitRepoOptionsArguments(cmd *cobra.Command, repositoryOptions *gits.GitRepositoryOptions)
- func AddGitRepoOptionsArgumentsWithDefaultProviderURL(cmd *cobra.Command, repositoryOptions *gits.GitRepositoryOptions, ...)
- func AddGitRepoOptionsArgumentsWithGithubDefault(cmd *cobra.Command, repositoryOptions *gits.GitRepositoryOptions)
- type BranchPatterns
- type ClusterOptions
- type CommonDevPodOptions
- type CommonOptions
- func (o *CommonOptions) AddBaseFlags(cmd *cobra.Command)
- func (o *CommonOptions) AddChartRepos(dir string, helmBinary string, chartRepos []string) error
- func (o *CommonOptions) AddHelmBinaryRepoIfMissing(url, repoName, username, password string) (string, error)
- func (o *CommonOptions) AddJenkinsJobs(jenkins gojenkins.JenkinsClient, jobMap *map[string]gojenkins.Job, ...)
- func (o *CommonOptions) AddonAuthConfigService(kind string) (auth.ConfigService, error)
- func (o *CommonOptions) ApiExtensionsClient() (apiextensionsclientset.Interface, error)
- func (o *CommonOptions) CertManagerClient() (certmngclient.Interface, error)
- func (o *CommonOptions) ChartmuseumAuthConfigService() (auth.ConfigService, error)
- func (o *CommonOptions) CleanExposecontrollerReources(ns string)
- func (o *CommonOptions) CloneJXVersionsRepo(versionRepository string, versionRef string) (string, string, error)
- func (o *CommonOptions) ComplianceClient() (*client.SonobuoyClient, error)
- func (o *CommonOptions) ConfigureCommonOptions(requirements *config.RequirementsConfig) error
- func (o *CommonOptions) CreateBucket(cb *CreateBucketValues, settings *v1.TeamSettings) (string, error)
- func (o *CommonOptions) CreateBucketFromURL(bucketURL string, bucket *blob.Bucket, cb *CreateBucketValues) error
- func (o *CommonOptions) CreateChatAuthConfigService(kind string) (auth.ConfigService, error)
- func (o *CommonOptions) CreateClusterAdmin() error
- func (o *CommonOptions) CreateCustomJenkinsClient(jenkinsSelector *JenkinsSelectorOptions) (gojenkins.JenkinsClient, error)
- func (o *CommonOptions) CreateGitProvider(dir string) (*gits.GitRepository, gits.GitProvider, issues.IssueProvider, error)
- func (o *CommonOptions) CreateGitProviderForURLWithoutKind(gitURL string) (gits.GitProvider, *gits.GitRepository, error)
- func (o *CommonOptions) CreateIssueProvider(dir string) (issues.IssueProvider, error)
- func (o *CommonOptions) CreateIssueTrackerAuthConfigService(kind string) (auth.ConfigService, error)
- func (options *CommonOptions) CreatePullRequest(o *PullRequestDetails, modifyFn func() error) error
- func (o *CommonOptions) CreateTable() table.Table
- func (o *CommonOptions) CreateVersionResolver(repo string, gitRef string) (*versionstream.VersionResolver, error)
- func (o *CommonOptions) CreateWebhookProw(gitURL string, gitProvider gits.GitProvider) error
- func (o *CommonOptions) CustomJenkinsClient(jenkinsServiceName string) (gojenkins.JenkinsClient, error)
- func (o *CommonOptions) CustomJenkinsURL(jenkinsSelector *JenkinsSelectorOptions, kubeClient kubernetes.Interface, ...) (string, error)
- func (o *CommonOptions) DefaultChartRepositoryURL() string
- func (o *CommonOptions) DefaultModifyDevEnvironment(callback func(env *v1.Environment) error) error
- func (o *CommonOptions) DefaultModifyEnvironment(name string, callback func(env *v1.Environment) error) error
- func (o *CommonOptions) DefaultReleaseCharts() []string
- func (o *CommonOptions) DeleteChart(releaseName string, purge bool) error
- func (o *CommonOptions) DevEnvAndTeamSettings() (*v1.Environment, *v1.TeamSettings, error)
- func (o *CommonOptions) DisableFeatures(orgs []string, includes []string, excludes []string, dryRun bool) error
- func (o *CommonOptions) DiscoverAppName() (string, error)
- func (o *CommonOptions) DiscoverBuildPack(dir string, projectConfig *config.ProjectConfig, packConfig string) (string, error)
- func (o *CommonOptions) DiscoverGitURL(gitConf string) (string, error)
- func (o *CommonOptions) DoInstallMissingDependencies(install []string) error
- func (o *CommonOptions) EnableRemoteKubeCluster()
- func (o *CommonOptions) EnsureAddonServiceAvailable(serviceName string) (string, error)
- func (o *CommonOptions) EnsureCertManager() error
- func (o *CommonOptions) EnsureClusterRoleBinding(clusterRoleBindingName string, role string, serviceAccountNamespace string, ...) error
- func (o *CommonOptions) EnsureClusterRoleExists(roleName string, namespace string) error
- func (o *CommonOptions) EnsureGitServiceCRD(server *auth.AuthServer) error
- func (o *CommonOptions) EnsureHelm() error
- func (o *CommonOptions) EnsureKustomize() error
- func (o *CommonOptions) EnsureServiceAccount(ns string, serviceAccountName string) error
- func (o *CommonOptions) EnvironmentsDir() (string, error)
- func (o *CommonOptions) Expose(devNamespace, targetNamespace, password string) error
- func (o *CommonOptions) FindAddonServer(config *auth.AuthConfig, serverFlags *ServerFlags, kind string) (*auth.AuthServer, error)
- func (o *CommonOptions) FindChartValuesYaml(dir string) (string, error)
- func (o *CommonOptions) FindChatServer(config *auth.AuthConfig, serverFlags *ServerFlags) (*auth.AuthServer, error)
- func (o *CommonOptions) FindEnvironmentNamespace(envName string) (string, error)
- func (o *CommonOptions) FindGitInfo(dir string) (*gits.GitRepository, error)
- func (o *CommonOptions) FindGitServer(config *auth.AuthConfig, serverFlags *ServerFlags) (*auth.AuthServer, error)
- func (o *CommonOptions) FindHelmChart() (string, error)
- func (o *CommonOptions) FindHelmChartInDir(dir string) (string, error)
- func (o *CommonOptions) FindIssueTrackerServer(config *auth.AuthConfig, serverFlags *ServerFlags) (*auth.AuthServer, error)
- func (o *CommonOptions) FindServer(config *auth.AuthConfig, serverFlags *ServerFlags, defaultKind string, ...) (*auth.AuthServer, error)
- func (o *CommonOptions) FindService(name string) (string, error)
- func (o *CommonOptions) FindServiceInNamespace(name string, ns string) (string, error)
- func (o *CommonOptions) FlagChanged(name string) bool
- func (o *CommonOptions) GCloud() gke.GClouder
- func (o *CommonOptions) GenerateProwConfig(currentNamespace string, devEnv *v1.Environment) error
- func (o *CommonOptions) GetAddonAuth(serviceURL string) (*auth.AuthServer, *auth.UserAuth, error)
- func (o *CommonOptions) GetAddonAuthByKind(kind, serverURL string) (*auth.AuthServer, *auth.UserAuth, error)
- func (o *CommonOptions) GetAllPipelineJobNames(jenkinsClient gojenkins.JenkinsClient, jobNames *[]string, jobName string) error
- func (o *CommonOptions) GetBranchName(dir string) string
- func (o *CommonOptions) GetCloudProvider(p string) (string, error)
- func (o *CommonOptions) GetClusterDependencies(depsToInstall []string) []string
- func (o *CommonOptions) GetClusterUserName() (string, error)
- func (o *CommonOptions) GetCommandOutput(dir string, name string, args ...string) (string, error)
- func (o *CommonOptions) GetConfiguration(config interface{}) error
- func (o *CommonOptions) GetDefaultAdminPassword(devNamespace string) (string, error)
- func (o *CommonOptions) GetDeployNamespace(namespaceOption string) (string, error)
- func (o *CommonOptions) GetDevEnv() (gitOps bool, devEnv *jenkinsv1.Environment)
- func (o *CommonOptions) GetDockerRegistry(projectConfig *config.ProjectConfig) string
- func (o *CommonOptions) GetDockerRegistryOrg(projectConfig *config.ProjectConfig, repository *gits.GitRepository) string
- func (o *CommonOptions) GetDomain(client kubernetes.Interface, domain string, provider string, ...) (string, error)
- func (o *CommonOptions) GetErr() io.Writer
- func (o *CommonOptions) GetFactory() clients.Factory
- func (o *CommonOptions) GetGKEClusterNameFromContext() (string, error)
- func (o *CommonOptions) GetGitHubAppOwner(gitInfo *gits.GitRepository) (string, error)
- func (o *CommonOptions) GetGitHubAppOwnerForRepository(repository *jenkinsv1.SourceRepository) (string, error)
- func (o *CommonOptions) GetGoogleProjectID(defaultProject string) (string, error)
- func (o *CommonOptions) GetGoogleRegion(projectId string) (string, error)
- func (o *CommonOptions) GetGoogleRegionWithDefault(projectId string, defaultRegion string) (string, error)
- func (o *CommonOptions) GetGoogleZone(projectID string, defaultZone string) (string, error)
- func (o *CommonOptions) GetGoogleZoneWithDefault(projectId string, defaultZone string) (string, error)
- func (o *CommonOptions) GetHMACTokenSecret() (string, error)
- func (o *CommonOptions) GetIOFileHandles() util.IOFileHandles
- func (o *CommonOptions) GetIn() terminal.FileReader
- func (o *CommonOptions) GetInstalledChartRepos(helmBinary string) (map[string]string, error)
- func (o *CommonOptions) GetJenkinsJobName() string
- func (o *CommonOptions) GetJenkinsJobs(jenkinsSelector *JenkinsSelectorOptions, filter string) (map[string]gojenkins.Job, error)
- func (o *CommonOptions) GetLatestJXVersion(resolver versionstream.Streamer) (semver.Version, error)
- func (o *CommonOptions) GetLatestPipelineBuild(pipeline string) (string, string, error)
- func (o *CommonOptions) GetLatestPipelineBuildByCRD(pipeline string) (string, error)
- func (o *CommonOptions) GetOrPickClusterName(client cluster.Client, clusterName string) (string, error)
- func (o *CommonOptions) GetOut() terminal.FileWriter
- func (o *CommonOptions) GetPackageVersions(ns string, helmTLS bool) (map[string]string, table.Table)
- func (o *CommonOptions) GetPipelineGitAuth() (*auth.AuthServer, *auth.UserAuth, error)
- func (o *CommonOptions) GetPipelineGitAuthForRepo(gitInfo *gits.GitRepository) (*auth.AuthServer, *auth.UserAuth, error)
- func (o *CommonOptions) GetPipelineGitHubAppAuth(ghOwner string) (*auth.AuthServer, *auth.UserAuth, error)
- func (o *CommonOptions) GetPipelineName(gitInfo *gits.GitRepository, pipeline string, build string, appName string) (string, string)
- func (o *CommonOptions) GetPluginCommandGroups(verifier extensions.PathVerifier) (templates.PluginCommandGroups, bool, error)
- func (o *CommonOptions) GetSecretURLClient(location secrets.SecretsLocationKind) (secreturl.Client, error)
- func (o *CommonOptions) GetSecretsLocation() secrets.SecretsLocationKind
- func (o *CommonOptions) GetUsername(userName string) (string, error)
- func (o *CommonOptions) GetVersionNumber(kind versionstream.VersionKind, name, repo string, gitRef string) (string, error)
- func (o *CommonOptions) GetVersionResolver() (*versionstream.VersionResolver, error)
- func (o *CommonOptions) GetWebHookEndpoint() (string, error)
- func (o *CommonOptions) Git() gits.Gitter
- func (o *CommonOptions) GitAuthConfigService() (auth.ConfigService, error)
- func (o *CommonOptions) GitAuthConfigServiceGitHubAppMode(serviceKind string) (auth.ConfigService, error)
- func (o *CommonOptions) GitLocalAuthConfigService() (auth.ConfigService, error)
- func (o *CommonOptions) GitProviderForGitServerURL(gitServiceURL string, gitKind string, ghOwner string) (gits.GitProvider, error)
- func (o *CommonOptions) GitProviderForURL(gitURL string, message string) (gits.GitProvider, error)
- func (o *CommonOptions) GitServerHostURLKind(hostURL string) (string, error)
- func (o *CommonOptions) GitServerKind(gitInfo *gits.GitRepository) (string, error)
- func (o *CommonOptions) Helm() helm.Helmer
- func (o *CommonOptions) HelmInit(dir string) error
- func (o *CommonOptions) HelmInitDependency(dir string, chartRepos []string) (string, error)
- func (o *CommonOptions) HelmInitDependencyBuild(dir string, chartRepos []string, valuesFiles []string) (string, error)
- func (o *CommonOptions) HelmInitRecursiveDependencyBuild(dir string, chartRepos []string, valuesFiles []string) error
- func (o *CommonOptions) HelmfileModifyDevEnvironment(callback func(env *v1.Environment) error) error
- func (o *CommonOptions) IgnoreModifyDevEnvironment(callback func(env *v1.Environment) error) error
- func (o *CommonOptions) IgnoreModifyEnvironment(name string, callback func(env *v1.Environment) error) error
- func (o *CommonOptions) ImportProject(gitURL string, dir string, jenkinsfile string, ...) error
- func (o *CommonOptions) InCDPipeline() bool
- func (o *CommonOptions) InCluster() bool
- func (o *CommonOptions) InitBuildPacks(i *InvokeDraftPack) (string, *v1.TeamSettings, error)
- func (o *CommonOptions) InitGitConfigAndUser() error
- func (o *CommonOptions) InitHelm(config InitHelmConfig) error
- func (o *CommonOptions) InstallAzureCli()
- func (o *CommonOptions) InstallChartAt(dir string, releaseName string, chart string, version string, ns string, ...) error
- func (o *CommonOptions) InstallChartOrGitOps(isGitOps bool, gitOpsEnvDir string, releaseName string, chart string, ...) error
- func (o *CommonOptions) InstallChartWithOptions(options helm.InstallChartOptions) error
- func (o *CommonOptions) InstallChartWithOptionsAndTimeout(options helm.InstallChartOptions, timeout string) error
- func (o *CommonOptions) InstallGcloud()
- func (o *CommonOptions) InstallGlooctl() error
- func (o *CommonOptions) InstallHelm() error
- func (o *CommonOptions) InstallHelm3() error
- func (o *CommonOptions) InstallJx(upgrade bool, version string) error
- func (o *CommonOptions) InstallKustomize() error
- func (o *CommonOptions) InstallMissingDependencies(providerSpecificDeps []string) error
- func (o *CommonOptions) InstallOciCli() error
- func (o *CommonOptions) InstallProw(useTekton bool, useExternalDNS bool, isGitOps bool, gitOpsEnvDir string, ...) error
- func (o *CommonOptions) InstallRequirements(cloudProvider string, extraDependencies ...string) error
- func (o *CommonOptions) InstallTiller() error
- func (o *CommonOptions) InvokeDraftPack(i *InvokeDraftPack) (string, error)
- func (o *CommonOptions) IsConfigExplicitlySet(configPath, configKey string) bool
- func (o *CommonOptions) IsFlagExplicitlySet(flagName string) bool
- func (o *CommonOptions) IsGitHubAppMode() (bool, error)
- func (o *CommonOptions) IsInsecureSSLWebhooks() (bool, error)
- func (o *CommonOptions) IsJXBoot() bool
- func (o *CommonOptions) IsProw() (bool, error)
- func (o *CommonOptions) IstioClient() (istioclient.Interface, error)
- func (o *CommonOptions) JXClient() (versioned.Interface, string, error)
- func (o *CommonOptions) JXClientAndAdminNamespace() (versioned.Interface, string, error)
- func (o *CommonOptions) JXClientAndDevNamespace() (versioned.Interface, string, error)
- func (o *CommonOptions) JXClientDevAndAdminNamespace() (versioned.Interface, string, string, error)
- func (o *CommonOptions) JenkinsAuthConfigService(namespace string, selector *JenkinsSelectorOptions) (auth.ConfigService, error)
- func (o *CommonOptions) JenkinsClient() (gojenkins.JenkinsClient, error)
- func (o *CommonOptions) KnativeServeClient() (kserve.Interface, string, error)
- func (o *CommonOptions) Kube() kube.Kuber
- func (o *CommonOptions) KubeClient() (kubernetes.Interface, error)
- func (o *CommonOptions) KubeClientAndDevNamespace() (kubernetes.Interface, string, error)
- func (o *CommonOptions) KubeClientAndNamespace() (kubernetes.Interface, string, error)
- func (o *CommonOptions) Kustomize() kustomize.Kustomizer
- func (o *CommonOptions) LoadQuickStartsFromLocations(locations []v1.QuickStartLocation, config *auth.AuthConfig) (*quickstarts.QuickstartModel, error)
- func (o *CommonOptions) LoadQuickStartsModel(gitHubOrganisations []string, ignoreTeam bool) (*quickstarts.QuickstartModel, error)
- func (o *CommonOptions) LogImportedProject(isEnvironment bool, gitInfo *gits.GitRepository)
- func (o *CommonOptions) ModifyDevEnvironment(callback func(env *v1.Environment) error) error
- func (o *CommonOptions) ModifyEnvironment(name string, callback func(env *v1.Environment) error) error
- func (o *CommonOptions) ModifyHelmValuesFile(dir string, fn func(string) (string, error)) error
- func (o *CommonOptions) ModifyTeam(adminNs string, teamName string, callback func(env *v1.Team) error) error
- func (o *CommonOptions) ModifyUser(userName string, callback func(env *v1.User) error) error
- func (o *CommonOptions) NewGitProvider(gitURL string, message string, authConfigSvc auth.ConfigService, ...) (gits.GitProvider, error)
- func (o *CommonOptions) NewHelm(verbose bool, helmBinary string, noTiller bool, helmTemplate bool) helm.Helmer
- func (o *CommonOptions) NotifyProgress(level LogLevel, format string, args ...interface{})
- func (o *CommonOptions) ParseDependencyUpdateMessage(msg string, commitURL string) (*v1.DependencyUpdate, *dependencymatrix.DependencyUpdates, error)
- func (o *CommonOptions) PickCustomJenkinsName(jenkinsSelector *JenkinsSelectorOptions, kubeClient kubernetes.Interface, ...) (string, error)
- func (o *CommonOptions) PickGitRemoteURL(config *gitcfg.Config) (string, error)
- func (o *CommonOptions) PickPipelineUserAuth(config *auth.AuthConfig, server *auth.AuthServer) (*auth.UserAuth, error)
- func (o *CommonOptions) ProwJobClient() (prowjobclient.Interface, string, error)
- func (o *CommonOptions) RegisterEnvironmentCRD() error
- func (o *CommonOptions) RegisterEnvironmentRoleBindingCRD() error
- func (o *CommonOptions) RegisterLocalHelmRepo(repoName, ns string) error
- func (o *CommonOptions) RegisterPipelineActivityCRD() error
- func (o *CommonOptions) RegisterReleaseCRD() error
- func (o *CommonOptions) RegisterTeamCRD() error
- func (o *CommonOptions) RegisterUserCRD() error
- func (o *CommonOptions) RegisterWorkflowCRD() error
- func (o *CommonOptions) ReleaseChartRepositoryURL() string
- func (o *CommonOptions) ResetClientsAndNamespaces()
- func (o *CommonOptions) ResetSecretsLocation() error
- func (o *CommonOptions) ResolveChartMuseumURL() (string, error)
- func (o *CommonOptions) ResourcesInstaller() resources.Installer
- func (o *CommonOptions) Retry(attempts int, sleep time.Duration, call func() error) (err error)
- func (o *CommonOptions) RetryQuiet(attempts int, sleep time.Duration, call func() error) (err error)
- func (o *CommonOptions) RetryQuietlyUntilTimeout(timeout time.Duration, sleep time.Duration, call func() error) (err error)
- func (o *CommonOptions) RetryUntilFatalError(attempts int, sleep time.Duration, call func() (*FatalError, error)) (err error)
- func (o *CommonOptions) RetryUntilTrueOrTimeout(timeout time.Duration, sleep time.Duration, call func() (bool, error)) (err error)
- func (o *CommonOptions) RunCommand(name string, args ...string) error
- func (o *CommonOptions) RunCommandFromDir(dir, name string, args ...string) error
- func (o *CommonOptions) RunCommandInteractive(interactive bool, name string, args ...string) error
- func (o *CommonOptions) RunCommandInteractiveInDir(interactive bool, dir string, name string, args ...string) error
- func (o *CommonOptions) RunCommandQuietly(name string, args ...string) error
- func (o *CommonOptions) RunCommandVerbose(name string, args ...string) error
- func (o *CommonOptions) RunCommandVerboseAt(dir string, name string, args ...string) error
- func (o *CommonOptions) RunExposecontroller(devNamespace, targetNamespace string, ic kube.IngressConfig, ...) error
- func (o *CommonOptions) SetAPIExtensionsClient(client apiextensionsclientset.Interface)
- func (o *CommonOptions) SetBatchMode(batchMode bool)
- func (o *CommonOptions) SetCurrentNamespace(ns string)
- func (o *CommonOptions) SetDevNamespace(ns string)
- func (o *CommonOptions) SetEnvironmentsDir(dir string)
- func (o *CommonOptions) SetFactory(f clients.Factory)
- func (o *CommonOptions) SetFakeGitProvider(provider *gits.FakeProvider)
- func (o *CommonOptions) SetFakeKubeClient() error
- func (o *CommonOptions) SetGCloudClient(gcloudClient gke.GClouder)
- func (o *CommonOptions) SetGit(git gits.Gitter)
- func (o *CommonOptions) SetHelm(helmer helm.Helmer)
- func (o *CommonOptions) SetJenkinsClient(jenkinsClient gojenkins.JenkinsClient)
- func (o *CommonOptions) SetJxClient(jxClient versioned.Interface)
- func (o *CommonOptions) SetKnativeServeClient(client kserve.Interface)
- func (o *CommonOptions) SetKube(kuber kube.Kuber)
- func (o *CommonOptions) SetKubeClient(kubeClient kubernetes.Interface)
- func (o *CommonOptions) SetResourcesInstaller(installer resources.Installer)
- func (o *CommonOptions) SetSecretURLClient(client secreturl.Client)
- func (o *CommonOptions) SetSecretsLocation(location secrets.SecretsLocationKind, persist bool) error
- func (o *CommonOptions) SetVersionResolver(resolver *versionstream.VersionResolver)
- func (o *CommonOptions) SystemVaultClient(namespace string) (vault.Client, error)
- func (o *CommonOptions) TailJenkinsBuildLog(jenkinsSelector *JenkinsSelectorOptions, jobName string, ...) error
- func (o *CommonOptions) TailLogs(ns string, pod string, containerName string) error
- func (o *CommonOptions) TeamAndEnvironmentNames() (string, string, error)
- func (o *CommonOptions) TeamBranchPatterns() (*BranchPatterns, error)
- func (o *CommonOptions) TeamHelmBin() (string, bool, bool, error)
- func (o *CommonOptions) TeamSettings() (*v1.TeamSettings, error)
- func (o *CommonOptions) TektonClient() (tektonclient.Interface, string, error)
- func (o *CommonOptions) UpdateJenkinsURL(namespaces []string) error
- func (o *CommonOptions) VaultOperatorClient() (vaultoperatorclient.Interface, error)
- func (o *CommonOptions) WaitForReadyPodForDeployment(c kubernetes.Interface, ns string, name string, names []string, readyOnly bool) (string, error)
- func (o *CommonOptions) WaitForReadyPodForSelector(c kubernetes.Interface, ns string, selector labels.Selector, readyOnly bool) (string, error)
- func (o *CommonOptions) WaitForReadyPodForSelectorLabels(c kubernetes.Interface, ns string, labels map[string]string, readyOnly bool) (string, error)
- type CreateBucketValues
- type FatalError
- type GKEClusterOptions
- type InitHelmConfig
- type InvokeDraftPack
- type JenkinsProjectOptions
- type JenkinsSelectorOptions
- type LogLevel
- type ModifyDevEnvironmentFn
- type ModifyEnvironmentFn
- type PullRequestDetails
- type ServerFlags
Constants ¶
const ( OptionAlias = "alias" OptionApplication = "app" OptionBatchMode = "batch-mode" OptionClusterName = "cluster-name" OptionEnvironment = "env" OptionInstallDeps = "install-dependencies" OptionLabel = "label" OptionName = "name" OptionNamespace = "namespace" OptionNoBrew = "no-brew" OptionRelease = "release" OptionServerName = "name" OptionOutputDir = "output-dir" OptionServerURL = "url" OptionSkipAuthSecMerge = "skip-auth-secrets-merge" OptionTimeout = "timeout" OptionVerbose = "verbose" BranchPatternCommandName = "branchpattern" QuickStartLocationCommandName = "quickstartlocation" // LogInfo info level logging LogInfo LogLevel = "INFO" // LogWarning warning level logging LogWarning LogLevel = "WARN" // LogError error level logging LogError LogLevel = "ERROR" )
const ( MinimumMavenDeployVersion = "2.8.2" MasterBranch = "master" DefaultGitIgnoreFile = ` .project .classpath .idea .cache .DS_Store *.im? target work ` // DefaultIngressNamesapce default namespace fro ingress controller DefaultIngressNamesapce = "kube-system" // DefaultIngressServiceName default name for ingress controller service and deployment DefaultIngressServiceName = "jxing-nginx-ingress-controller" // DeployKindKnative for knative serve based deployments DeployKindKnative = "knative" // DeployKindDefault for default kubernetes Deployment + Service deployment kinds DeployKindDefault = "default" // OptionKind to specify the kind of something (such as the kind of a deployment) OptionKind = "kind" // OptionCanary should we enable canary rollouts (progressive delivery) OptionCanary = "canary" // OptionHPA should we enable horizontal pod autoscaler for deployments OptionHPA = "hpa" )
const ( // DefaultChartRepo default URL for charts repository DefaultChartRepo = "http://jenkins-x-chartmuseum:8080" // DefaultTillerNamesapce default namespace for helm tiller server DefaultTillerNamesapce = "kube-system" // DefaultTillerRole default cluster role for service account of helm tiller server DefaultTillerRole = "cluster-admin" // DefaultOnlyHelmClient indicates if only the client is initialized DefaultOnlyHelmClient = false // DefaultHelm3 indicates if helm 3 is used DefaultHelm3 = false // DefaultSkipTiller skips the tiller server initialization DefaultSkipTiller = false // DefaultGlobalTiller indicates if a global tiller server is used DefaultGlobalTiller = true // DefaultRemoteTiller indicates that a remote tiller server is used DefaultRemoteTiller = true // DefaultSkipClusterRole skips the cluster role creation DefaultSkipClusterRole = false )
const ( AdminSecretsFile = "adminSecrets.yaml" ExtraValuesFile = "extraValues.yaml" ValuesFile = "values.yaml" JXInstallConfig = "jx-install-config" CloudEnvValuesFile = "myvalues.yaml" CloudEnvSecretsFile = "secrets.yaml" CloudEnvSopsConfigFile = ".sops.yaml" DefaultInstallTimeout = "6000" DefaultCloudEnvironmentsURL = "https://github.com/jenkins-x/cloud-environments" )
const GkeClusterListHeader = "PROJECT_ID"
GkeClusterListHeader header name for GCP project ID when listing the GKE clusters
Variables ¶
var ( BranchPatternCommandAliases = []string{ "branch pattern", } QuickStartLocationCommandAliases = []string{ QuickStartLocationCommandName + "s", "quickstartloc", "qsloc", } )
Functions ¶
func AddGitRepoOptionsArguments ¶
func AddGitRepoOptionsArguments(cmd *cobra.Command, repositoryOptions *gits.GitRepositoryOptions)
AddGitRepoOptionsArguments adds common git flags with no default provider URL to the given cobra command
func AddGitRepoOptionsArgumentsWithDefaultProviderURL ¶
func AddGitRepoOptionsArgumentsWithDefaultProviderURL(cmd *cobra.Command, repositoryOptions *gits.GitRepositoryOptions, defaultProviderURL string)
AddGitRepoOptionsArgumentsWithDefaultProviderURL adds common git flags with the given default provider URL to the given cobra command
func AddGitRepoOptionsArgumentsWithGithubDefault ¶
func AddGitRepoOptionsArgumentsWithGithubDefault(cmd *cobra.Command, repositoryOptions *gits.GitRepositoryOptions)
AddGitRepoOptionsArgumentsWithGithubDefault adds common git flags with a default provider URL of github.com to the given cobra command
Types ¶
type BranchPatterns ¶
type ClusterOptions ¶
type ClusterOptions struct { GKE GKEClusterOptions Fake bool }
ClusterOptions used to determine which kind of cluster to query
func (*ClusterOptions) AddClusterFlags ¶
func (o *ClusterOptions) AddClusterFlags(cmd *cobra.Command)
AddClusterFlags adds the cluster CLI arguments
func (*ClusterOptions) CreateClient ¶
func (o *ClusterOptions) CreateClient(requireProject bool) (cluster.Client, error)
CreateClient creates a new cluster client from the CLI options
type CommonDevPodOptions ¶
type CommonDevPodOptions struct {
Username string
}
CommonDevPodOptions are common flags that are to be applied across all DevPod commands
func (*CommonDevPodOptions) AddCommonDevPodFlags ¶
func (o *CommonDevPodOptions) AddCommonDevPodFlags(cmd *cobra.Command)
AddCommonDevPodFlags adds the dev pod common flags to the given cobra command
type CommonOptions ¶
type CommonOptions struct { prow.Prow AdvancedMode bool Args []string BatchMode bool Cmd *cobra.Command ConfigFile string Domain string Err io.Writer ExternalJenkinsBaseURL string In terminal.FileReader InstallDependencies bool ModifyDevEnvironmentFn ModifyDevEnvironmentFn ModifyEnvironmentFn ModifyEnvironmentFn NameServers []string NoBrew bool RemoteCluster bool Out terminal.FileWriter ServiceAccount string SkipAuthSecretsMerge bool Username string Verbose bool NotifyCallback func(LogLevel, string) // contains filtered or unexported fields }
CommonOptions contains common options and helper methods
func NewCommonOptionsWithFactory ¶
func NewCommonOptionsWithFactory(factory clients.Factory) CommonOptions
NewCommonOptionsWithFactory creates a new CommonOptions instance with the given factory
func NewCommonOptionsWithTerm ¶
func NewCommonOptionsWithTerm(factory clients.Factory, in terminal.FileReader, out terminal.FileWriter, err io.Writer) *CommonOptions
NewCommonOptionsWithTerm creates a new CommonOptions instance with given terminal input, output and error
func (*CommonOptions) AddBaseFlags ¶
func (o *CommonOptions) AddBaseFlags(cmd *cobra.Command)
AddBaseFlags adds the base flags for all commands
func (*CommonOptions) AddChartRepos ¶
func (o *CommonOptions) AddChartRepos(dir string, helmBinary string, chartRepos []string) error
AddChartRepos add chart repositories
func (*CommonOptions) AddHelmBinaryRepoIfMissing ¶
func (o *CommonOptions) AddHelmBinaryRepoIfMissing(url, repoName, username, password string) (string, error)
AddHelmBinaryRepoIfMissing adds the helm repo at url if it's missing. If a repoName is specified it will be used (if the repo is added) otherwise one will be generated. The username and password will be used, and stored in vault, if possible. The name of the repo (regardless of whether it was added or already there) is returned - this may well be different from the requested name (if it's already there).
func (*CommonOptions) AddJenkinsJobs ¶
func (o *CommonOptions) AddJenkinsJobs(jenkins gojenkins.JenkinsClient, jobMap *map[string]gojenkins.Job, filter string, prefix string, jobs []gojenkins.Job)
AddJenkinsJobs add the given jobs to Jenkins
func (*CommonOptions) AddonAuthConfigService ¶
func (o *CommonOptions) AddonAuthConfigService(kind string) (auth.ConfigService, error)
AddonAuthConfigService creates the addon auth config service
func (*CommonOptions) ApiExtensionsClient ¶
func (o *CommonOptions) ApiExtensionsClient() (apiextensionsclientset.Interface, error)
ApiExtensionsClient return or creates the api extension client
func (*CommonOptions) CertManagerClient ¶
func (o *CommonOptions) CertManagerClient() (certmngclient.Interface, error)
CertManagerClient returns or creates the cert-manager client
func (*CommonOptions) ChartmuseumAuthConfigService ¶
func (o *CommonOptions) ChartmuseumAuthConfigService() (auth.ConfigService, error)
ChartmuseumAuthConfigService creates the chart museum auth config service
func (*CommonOptions) CleanExposecontrollerReources ¶
func (o *CommonOptions) CleanExposecontrollerReources(ns string)
CleanExposecontrollerReources cleans expose controller resources
func (*CommonOptions) CloneJXVersionsRepo ¶
func (o *CommonOptions) CloneJXVersionsRepo(versionRepository string, versionRef string) (string, string, error)
CloneJXVersionsRepo clones the jenkins-x versions repo to a local working dir
func (*CommonOptions) ComplianceClient ¶
func (o *CommonOptions) ComplianceClient() (*client.SonobuoyClient, error)
ComplianceClient returns or creates the compliance client
func (*CommonOptions) ConfigureCommonOptions ¶
func (o *CommonOptions) ConfigureCommonOptions(requirements *config.RequirementsConfig) error
ConfigureCommonOptions lets us configure the common options based on the requirements
func (*CommonOptions) CreateBucket ¶
func (o *CommonOptions) CreateBucket(cb *CreateBucketValues, settings *v1.TeamSettings) (string, error)
CreateBucket creates a new bucket using the create bucket values and team settings returning the newly created bucket URL
func (*CommonOptions) CreateBucketFromURL ¶
func (o *CommonOptions) CreateBucketFromURL(bucketURL string, bucket *blob.Bucket, cb *CreateBucketValues) error
CreateBucketFromURL creates a bucket if it does not already exist
func (*CommonOptions) CreateChatAuthConfigService ¶
func (o *CommonOptions) CreateChatAuthConfigService(kind string) (auth.ConfigService, error)
CreateChatAuthConfigService creates a new chat auth service
func (*CommonOptions) CreateClusterAdmin ¶
func (o *CommonOptions) CreateClusterAdmin() error
CreateClusterAdmin creates a cluster admin
func (*CommonOptions) CreateCustomJenkinsClient ¶
func (o *CommonOptions) CreateCustomJenkinsClient(jenkinsSelector *JenkinsSelectorOptions) (gojenkins.JenkinsClient, error)
CreateCustomJenkinsClient creates either a regular Jenkins client or if useCustom is true creates a JenkinsClient for a custom jenkins App. If no customJenkinsName is specified and there is only one available it is used. Otherwise the user is prompted to pick the Jenkins App to use if not in batch mode.
func (*CommonOptions) CreateGitProvider ¶
func (o *CommonOptions) CreateGitProvider(dir string) (*gits.GitRepository, gits.GitProvider, issues.IssueProvider, error)
CreateGitProvider creates a git from the given directory
func (*CommonOptions) CreateGitProviderForURLWithoutKind ¶
func (o *CommonOptions) CreateGitProviderForURLWithoutKind(gitURL string) (gits.GitProvider, *gits.GitRepository, error)
CreateGitProviderForURLWithoutKind creates a git provider from URL wihtout kind
func (*CommonOptions) CreateIssueProvider ¶
func (o *CommonOptions) CreateIssueProvider(dir string) (issues.IssueProvider, error)
CreateIssueProvider creates a issues provider
func (*CommonOptions) CreateIssueTrackerAuthConfigService ¶
func (o *CommonOptions) CreateIssueTrackerAuthConfigService(kind string) (auth.ConfigService, error)
CreateIssueTrackerAuthConfigService creates auth config service for issue tracker
func (*CommonOptions) CreatePullRequest ¶
func (options *CommonOptions) CreatePullRequest(o *PullRequestDetails, modifyFn func() error) error
CreatePullRequest creates a Pull Request on the given repository
func (*CommonOptions) CreateTable ¶
func (o *CommonOptions) CreateTable() table.Table
CreateTable creates a new Table
func (*CommonOptions) CreateVersionResolver ¶
func (o *CommonOptions) CreateVersionResolver(repo string, gitRef string) (*versionstream.VersionResolver, error)
CreateVersionResolver creates a new VersionResolver service
func (*CommonOptions) CreateWebhookProw ¶
func (o *CommonOptions) CreateWebhookProw(gitURL string, gitProvider gits.GitProvider) error
CreateWebhookProw create a webhook for prow using the given git provider
func (*CommonOptions) CustomJenkinsClient ¶
func (o *CommonOptions) CustomJenkinsClient(jenkinsServiceName string) (gojenkins.JenkinsClient, error)
CustomJenkinsClient returns the Jenkins client for the custom jenkins app
func (*CommonOptions) CustomJenkinsURL ¶
func (o *CommonOptions) CustomJenkinsURL(jenkinsSelector *JenkinsSelectorOptions, kubeClient kubernetes.Interface, ns string) (string, error)
CustomJenkinsURL returns the default or the custom Jenkins URL
func (*CommonOptions) DefaultChartRepositoryURL ¶
func (o *CommonOptions) DefaultChartRepositoryURL() string
DefaultChartRepositoryURL returns the default chart repository URL
func (*CommonOptions) DefaultModifyDevEnvironment ¶
func (o *CommonOptions) DefaultModifyDevEnvironment(callback func(env *v1.Environment) error) error
DefaultModifyDevEnvironment default implementation of modifying the Development environment settings
func (*CommonOptions) DefaultModifyEnvironment ¶
func (o *CommonOptions) DefaultModifyEnvironment(name string, callback func(env *v1.Environment) error) error
defaultModifyEnvironment default implementation of modifying an environment
func (*CommonOptions) DefaultReleaseCharts ¶
func (o *CommonOptions) DefaultReleaseCharts() []string
DefaultReleaseCharts returns the default release charts
func (*CommonOptions) DeleteChart ¶
func (o *CommonOptions) DeleteChart(releaseName string, purge bool) error
DeleteChart deletes the given chart
func (*CommonOptions) DevEnvAndTeamSettings ¶
func (o *CommonOptions) DevEnvAndTeamSettings() (*v1.Environment, *v1.TeamSettings, error)
DevEnvAndTeamSettings returns the Dev Environment and Team settings
func (*CommonOptions) DisableFeatures ¶
func (o *CommonOptions) DisableFeatures(orgs []string, includes []string, excludes []string, dryRun bool) error
DisableFeatures iterates over all the repositories in org (except those that match excludes) and disables issue trackers, projects and wikis if they are not in use.
Issue trackers are not in use if they have no open or closed issues Projects are not in use if there are no open projects Wikis are not in use if the provider returns that the wiki is not enabled
Note that the requirement for issues is no issues at all so that we don't close issue trackers that have historic info
If includes is not empty only those that match an include will be operated on. If dryRun is true, the operations to be done will printed and but nothing done. If batchMode is false, then each change will be prompted.
func (*CommonOptions) DiscoverAppName ¶
func (o *CommonOptions) DiscoverAppName() (string, error)
DiscoverAppNam discovers an app name from a helm chart installation
func (*CommonOptions) DiscoverBuildPack ¶
func (o *CommonOptions) DiscoverBuildPack(dir string, projectConfig *config.ProjectConfig, packConfig string) (string, error)
DiscoverBuildPack discovers the build pack given the build pack configuration
func (*CommonOptions) DiscoverGitURL ¶
func (o *CommonOptions) DiscoverGitURL(gitConf string) (string, error)
DiscoverGitURL discovers the Git URL
func (*CommonOptions) DoInstallMissingDependencies ¶
func (o *CommonOptions) DoInstallMissingDependencies(install []string) error
DoInstallMissingDependencies install missing dependencies from the given list
func (*CommonOptions) EnableRemoteKubeCluster ¶
func (o *CommonOptions) EnableRemoteKubeCluster()
EnableRemoteKubeCluster lets setup this command to work with a remote cluster without a jx install so lets disable loading TeamSettings and tiller
func (*CommonOptions) EnsureAddonServiceAvailable ¶
func (o *CommonOptions) EnsureAddonServiceAvailable(serviceName string) (string, error)
EnsureAddonServiceAvailable ensures that the given service name is available for addon
func (*CommonOptions) EnsureCertManager ¶
func (o *CommonOptions) EnsureCertManager() error
EnsureCertManager ensures cert-manager is installed
func (*CommonOptions) EnsureClusterRoleBinding ¶
func (o *CommonOptions) EnsureClusterRoleBinding(clusterRoleBindingName string, role string, serviceAccountNamespace string, serviceAccountName string) error
EnsureClusterRoleBinding ensures cluster role binding exists
func (*CommonOptions) EnsureClusterRoleExists ¶
func (o *CommonOptions) EnsureClusterRoleExists(roleName string, namespace string) error
EnsureClusterRoleBinding ensures cluster role exists Todo: use permissions from somewhere, or provide common ones in a class that we can pass in here this is an unimplemented and unused method for building upon that may eventually be of use
func (*CommonOptions) EnsureGitServiceCRD ¶
func (o *CommonOptions) EnsureGitServiceCRD(server *auth.AuthServer) error
EnsureGitServiceCRD ensure that the GitService CRD is installed
func (*CommonOptions) EnsureHelm ¶
func (o *CommonOptions) EnsureHelm() error
EnsureHelm ensures helm is installed
func (*CommonOptions) EnsureKustomize ¶
func (o *CommonOptions) EnsureKustomize() error
EnsureKustomize ensures kustomize is installed
func (*CommonOptions) EnsureServiceAccount ¶
func (o *CommonOptions) EnsureServiceAccount(ns string, serviceAccountName string) error
EnsureServiceAccount ensures service account exists in the given namespace
func (*CommonOptions) EnvironmentsDir ¶
func (o *CommonOptions) EnvironmentsDir() (string, error)
EnvironmentsDir is the local directory the environments are stored in - can be faked out for tests
func (*CommonOptions) Expose ¶
func (o *CommonOptions) Expose(devNamespace, targetNamespace, password string) error
Expose runs expose controller in the given target namespace
func (*CommonOptions) FindAddonServer ¶
func (o *CommonOptions) FindAddonServer(config *auth.AuthConfig, serverFlags *ServerFlags, kind string) (*auth.AuthServer, error)
FindAddonServer finds the addon server from the given flags or returns an error
func (*CommonOptions) FindChartValuesYaml ¶
func (o *CommonOptions) FindChartValuesYaml(dir string) (string, error)
FindChartValuesYaml finds the helm chart value.yaml in the given dir. If no dir is specified then the current dir is used
func (*CommonOptions) FindChatServer ¶
func (o *CommonOptions) FindChatServer(config *auth.AuthConfig, serverFlags *ServerFlags) (*auth.AuthServer, error)
FindChatServer finds the chat server from the given flags or returns an error
func (*CommonOptions) FindEnvironmentNamespace ¶
func (o *CommonOptions) FindEnvironmentNamespace(envName string) (string, error)
FindEnvironmentNamespace returns the namespace of a given environment
func (*CommonOptions) FindGitInfo ¶
func (o *CommonOptions) FindGitInfo(dir string) (*gits.GitRepository, error)
FindGitInfo parses the git information from the given directory
func (*CommonOptions) FindGitServer ¶
func (o *CommonOptions) FindGitServer(config *auth.AuthConfig, serverFlags *ServerFlags) (*auth.AuthServer, error)
FindGitServer finds the Git server from the given flags or returns an error
func (*CommonOptions) FindHelmChart ¶
func (o *CommonOptions) FindHelmChart() (string, error)
FindHelmChart finds the helm chart in the current dir
func (*CommonOptions) FindHelmChartInDir ¶
func (o *CommonOptions) FindHelmChartInDir(dir string) (string, error)
FindHelmChartInDir finds the helm chart in the given dir. If no dir is specified then the current dir is used
func (*CommonOptions) FindIssueTrackerServer ¶
func (o *CommonOptions) FindIssueTrackerServer(config *auth.AuthConfig, serverFlags *ServerFlags) (*auth.AuthServer, error)
FindIssueTrackerServer finds the issue tracker server from the given flags or returns an error
func (*CommonOptions) FindServer ¶
func (o *CommonOptions) FindServer(config *auth.AuthConfig, serverFlags *ServerFlags, defaultKind string, missingServerDescription string, lazyCreate bool) (*auth.AuthServer, error)
FindServer find the server flags from the given flags or returns an error
func (*CommonOptions) FindService ¶
func (o *CommonOptions) FindService(name string) (string, error)
FindService finds the given service and returns its URL
func (*CommonOptions) FindServiceInNamespace ¶
func (o *CommonOptions) FindServiceInNamespace(name string, ns string) (string, error)
FindServiceInNamespace searches a service in a given namespace. If found, it returns the service URL
func (*CommonOptions) FlagChanged ¶
func (o *CommonOptions) FlagChanged(name string) bool
FlagChanged returns true if the given flag was supplied on the command line
func (*CommonOptions) GCloud ¶
func (o *CommonOptions) GCloud() gke.GClouder
GCloud returns the implementation of a gcloud helper
func (*CommonOptions) GenerateProwConfig ¶
func (o *CommonOptions) GenerateProwConfig(currentNamespace string, devEnv *v1.Environment) error
GenerateProwConfig regenerates the Prow configurations after we have created a SourceRepository
func (*CommonOptions) GetAddonAuth ¶
func (o *CommonOptions) GetAddonAuth(serviceURL string) (*auth.AuthServer, *auth.UserAuth, error)
GetAddonAuth returns the server and user auth for the given addon service URL
func (*CommonOptions) GetAddonAuthByKind ¶
func (o *CommonOptions) GetAddonAuthByKind(kind, serverURL string) (*auth.AuthServer, *auth.UserAuth, error)
GetAddonAuth returns the server and user auth for the given addon service URL. Returns null values if there is no server
func (*CommonOptions) GetAllPipelineJobNames ¶
func (o *CommonOptions) GetAllPipelineJobNames(jenkinsClient gojenkins.JenkinsClient, jobNames *[]string, jobName string) error
GetAllPipelineJobNames returns all the pipeline job names
func (*CommonOptions) GetBranchName ¶
func (o *CommonOptions) GetBranchName(dir string) string
func (*CommonOptions) GetCloudProvider ¶
func (o *CommonOptions) GetCloudProvider(p string) (string, error)
GetCloudProvider returns the cloud provider
func (*CommonOptions) GetClusterDependencies ¶
func (o *CommonOptions) GetClusterDependencies(depsToInstall []string) []string
GetClusterDependencies returns the dependencies for a cloud provider
func (*CommonOptions) GetClusterUserName ¶
func (o *CommonOptions) GetClusterUserName() (string, error)
GetClusterUserName returns cluster and user name
func (*CommonOptions) GetCommandOutput ¶
GetCommandOutput evaluates the given command and returns the trimmed output Deprecated use util.Command
func (*CommonOptions) GetConfiguration ¶
func (o *CommonOptions) GetConfiguration(config interface{}) error
GetConfiguration read the config file marshal into a config struct
func (*CommonOptions) GetDefaultAdminPassword ¶
func (o *CommonOptions) GetDefaultAdminPassword(devNamespace string) (string, error)
GetDefaultAdminPassword returns the default admin password from dev namespace
func (*CommonOptions) GetDeployNamespace ¶
func (o *CommonOptions) GetDeployNamespace(namespaceOption string) (string, error)
GetDeployNamespace returns the namespace option from the command line option if defined otherwise we try the $DEPLOY_NAMESPACE environment variable. If none of those are found lets use the current kubernetes namespace value
func (*CommonOptions) GetDevEnv ¶
func (o *CommonOptions) GetDevEnv() (gitOps bool, devEnv *jenkinsv1.Environment)
GetDevEnv gets the Development Environment CRD as devEnv, and also tells the user whether the development environment is using gitOps
func (*CommonOptions) GetDockerRegistry ¶
func (o *CommonOptions) GetDockerRegistry(projectConfig *config.ProjectConfig) string
GetDockerRegistry parses the docker registry from various places
func (*CommonOptions) GetDockerRegistryOrg ¶
func (o *CommonOptions) GetDockerRegistryOrg(projectConfig *config.ProjectConfig, repository *gits.GitRepository) string
GetDockerRegistryOrg parses the docker registry organisation from various places
func (*CommonOptions) GetDomain ¶
func (o *CommonOptions) GetDomain(client kubernetes.Interface, domain string, provider string, ingressNamespace string, ingressService string, externalIP string) (string, error)
GetDomain returns the domain name, trying to infer it either from various Kubernetes resources or cloud provider. If no domain can be determined, it will prompt to the user for a value.
func (*CommonOptions) GetErr ¶
func (o *CommonOptions) GetErr() io.Writer
GetErr returns the command error writer
func (*CommonOptions) GetFactory ¶
func (o *CommonOptions) GetFactory() clients.Factory
GetFactory lazily creates a Factory if its not already created
func (*CommonOptions) GetGKEClusterNameFromContext ¶
func (o *CommonOptions) GetGKEClusterNameFromContext() (string, error)
GetGKEClusterNameFromContext returns the GKE cluster name from current Kubernetes context
func (*CommonOptions) GetGitHubAppOwner ¶
func (o *CommonOptions) GetGitHubAppOwner(gitInfo *gits.GitRepository) (string, error)
GetGitHubAppOwner returns the github app owner to filter tokens by if using a GitHub app model which requires a separate token per owner
func (*CommonOptions) GetGitHubAppOwnerForRepository ¶
func (o *CommonOptions) GetGitHubAppOwnerForRepository(repository *jenkinsv1.SourceRepository) (string, error)
GetGitHubAppOwnerForRepository returns the github app owner to filter tokens by if using a GitHub app model // which requires a separate token per owner
func (*CommonOptions) GetGoogleProjectID ¶
func (o *CommonOptions) GetGoogleProjectID(defaultProject string) (string, error)
GetGoogleProjectID asks to chose from existing projects or optionally creates one if none exist
func (*CommonOptions) GetGoogleRegion ¶
func (o *CommonOptions) GetGoogleRegion(projectId string) (string, error)
GetGoogleRegion returns the GCP region
func (*CommonOptions) GetGoogleRegionWithDefault ¶
func (o *CommonOptions) GetGoogleRegionWithDefault(projectId string, defaultRegion string) (string, error)
func (*CommonOptions) GetGoogleZone ¶
func (o *CommonOptions) GetGoogleZone(projectID string, defaultZone string) (string, error)
GetGoogleZone returns the GCP zone
func (*CommonOptions) GetGoogleZoneWithDefault ¶
func (o *CommonOptions) GetGoogleZoneWithDefault(projectId string, defaultZone string) (string, error)
GetGoogleZoneWithDefault returns the GCP zone, if not zone is found returns the default zone
func (*CommonOptions) GetHMACTokenSecret ¶
func (o *CommonOptions) GetHMACTokenSecret() (string, error)
GetHMACTokenSecret gets the appropriate HMAC secret, for either Prow or Lighthouse
func (*CommonOptions) GetIOFileHandles ¶
func (o *CommonOptions) GetIOFileHandles() util.IOFileHandles
GetIOFileHandles returns In, Out, and Err as an IOFileHandles struct
func (*CommonOptions) GetIn ¶
func (o *CommonOptions) GetIn() terminal.FileReader
GetIn returns the command inputs writer
func (*CommonOptions) GetInstalledChartRepos ¶
func (o *CommonOptions) GetInstalledChartRepos(helmBinary string) (map[string]string, error)
GetInstalledChartRepos retruns the installed chart repositories
func (*CommonOptions) GetJenkinsJobName ¶
func (o *CommonOptions) GetJenkinsJobName() string
GetJenkinsJobName returns the Jenkins job name
func (*CommonOptions) GetJenkinsJobs ¶
func (o *CommonOptions) GetJenkinsJobs(jenkinsSelector *JenkinsSelectorOptions, filter string) (map[string]gojenkins.Job, error)
GetJenkinsJobs returns the existing Jenkins jobs
func (*CommonOptions) GetLatestJXVersion ¶
func (o *CommonOptions) GetLatestJXVersion(resolver versionstream.Streamer) (semver.Version, error)
GetLatestJXVersion returns latest jx version
func (*CommonOptions) GetLatestPipelineBuild ¶
func (o *CommonOptions) GetLatestPipelineBuild(pipeline string) (string, string, error)
getLatestPipelineBuild for the given pipeline name lets try find the Jenkins Pipeline and the latest build
func (*CommonOptions) GetLatestPipelineBuildByCRD ¶
func (o *CommonOptions) GetLatestPipelineBuildByCRD(pipeline string) (string, error)
GetLatestPipelineBuildByCRD returns the latest pipeline build
func (*CommonOptions) GetOrPickClusterName ¶
func (o *CommonOptions) GetOrPickClusterName(client cluster.Client, clusterName string) (string, error)
GetOrPickClusterName returns the selected cluster name or returns an error
func (*CommonOptions) GetOut ¶
func (o *CommonOptions) GetOut() terminal.FileWriter
GetOut returns the command output writer
func (*CommonOptions) GetPackageVersions ¶
func (o *CommonOptions) GetPackageVersions(ns string, helmTLS bool) (map[string]string, table.Table)
GetPackageVersions returns the package versions and a table if they need to be rendered
func (*CommonOptions) GetPipelineGitAuth ¶
func (o *CommonOptions) GetPipelineGitAuth() (*auth.AuthServer, *auth.UserAuth, error)
GetPipelineGitAuth returns the pipeline git authentication credentials
func (*CommonOptions) GetPipelineGitAuthForRepo ¶
func (o *CommonOptions) GetPipelineGitAuthForRepo(gitInfo *gits.GitRepository) (*auth.AuthServer, *auth.UserAuth, error)
GetPipelineGitAuthForRepo returns the pipeline git authentication credentials for a repo
func (*CommonOptions) GetPipelineGitHubAppAuth ¶
func (o *CommonOptions) GetPipelineGitHubAppAuth(ghOwner string) (*auth.AuthServer, *auth.UserAuth, error)
GetPipelineGitHubAppAuth returns the pipeline git authentication credentials
func (*CommonOptions) GetPipelineName ¶
func (o *CommonOptions) GetPipelineName(gitInfo *gits.GitRepository, pipeline string, build string, appName string) (string, string)
GetPipelineName return the pipeline name
func (*CommonOptions) GetPluginCommandGroups ¶
func (o *CommonOptions) GetPluginCommandGroups(verifier extensions.PathVerifier) (templates.PluginCommandGroups, bool, error)
GetPluginCommandGroups returns the plugin groups
func (*CommonOptions) GetSecretURLClient ¶
func (o *CommonOptions) GetSecretURLClient(location secrets.SecretsLocationKind) (secreturl.Client, error)
GetSecretURLClient create a new secret URL client base on a given secrets location. If the location is auto, it will try to determine dynamically if is vault or local file system
func (*CommonOptions) GetSecretsLocation ¶
func (o *CommonOptions) GetSecretsLocation() secrets.SecretsLocationKind
GetSecretsLocation returns the location of the secrets
func (*CommonOptions) GetUsername ¶
func (o *CommonOptions) GetUsername(userName string) (string, error)
GetUsername returns current user name
func (*CommonOptions) GetVersionNumber ¶
func (o *CommonOptions) GetVersionNumber(kind versionstream.VersionKind, name, repo string, gitRef string) (string, error)
GetVersionNumber returns the version number for the given kind and name or blank string if there is no locked version
func (*CommonOptions) GetVersionResolver ¶
func (o *CommonOptions) GetVersionResolver() (*versionstream.VersionResolver, error)
GetVersionResolver gets a VersionResolver, lazy creating one if required so we can reuse it later
func (*CommonOptions) GetWebHookEndpoint ¶
func (o *CommonOptions) GetWebHookEndpoint() (string, error)
GetWebHookEndpoint returns the webhook endpoint
func (*CommonOptions) GitAuthConfigService ¶
func (o *CommonOptions) GitAuthConfigService() (auth.ConfigService, error)
GitAuthConfigService create the git auth config service
func (*CommonOptions) GitAuthConfigServiceGitHubAppMode ¶
func (o *CommonOptions) GitAuthConfigServiceGitHubAppMode(serviceKind string) (auth.ConfigService, error)
GitAuthConfigServiceGitHubAppMode create the git auth config service optionally handling github app mode
func (*CommonOptions) GitLocalAuthConfigService ¶
func (o *CommonOptions) GitLocalAuthConfigService() (auth.ConfigService, error)
GitLocalAuthConfigService create a git auth config service using the local gitAuth.yaml file method only
func (*CommonOptions) GitProviderForGitServerURL ¶
func (o *CommonOptions) GitProviderForGitServerURL(gitServiceURL string, gitKind string, ghOwner string) (gits.GitProvider, error)
GitProviderForGitServerURL returns a GitProvider for the given Git server URL
func (*CommonOptions) GitProviderForURL ¶
func (o *CommonOptions) GitProviderForURL(gitURL string, message string) (gits.GitProvider, error)
GitProviderForURL returns a GitProvider for the given git URL
func (*CommonOptions) GitServerHostURLKind ¶
func (o *CommonOptions) GitServerHostURLKind(hostURL string) (string, error)
GitServerHostURLKind returns the kind of git server host URL
func (*CommonOptions) GitServerKind ¶
func (o *CommonOptions) GitServerKind(gitInfo *gits.GitRepository) (string, error)
GitServerKind returns the kind of the git server
func (*CommonOptions) Helm ¶
func (o *CommonOptions) Helm() helm.Helmer
Helm returns or creates the helm client
func (*CommonOptions) HelmInit ¶
func (o *CommonOptions) HelmInit(dir string) error
HelmInit initialises helm
func (*CommonOptions) HelmInitDependency ¶
func (o *CommonOptions) HelmInitDependency(dir string, chartRepos []string) (string, error)
HelmInitDependency initialises helm dependencies
func (*CommonOptions) HelmInitDependencyBuild ¶
func (o *CommonOptions) HelmInitDependencyBuild(dir string, chartRepos []string, valuesFiles []string) (string, error)
HelmInitDependencyBuild initialises the dependencies and runs the build
func (*CommonOptions) HelmInitRecursiveDependencyBuild ¶
func (o *CommonOptions) HelmInitRecursiveDependencyBuild(dir string, chartRepos []string, valuesFiles []string) error
HelmInitRecursiveDependencyBuild helm initialises the dependencies recursively
func (*CommonOptions) HelmfileModifyDevEnvironment ¶
func (o *CommonOptions) HelmfileModifyDevEnvironment(callback func(env *v1.Environment) error) error
HelmfileModifyDevEnvironment default implementation of modifying the Development environment settings without eagerly populating kubernetes which we do via helmfile/helm
func (*CommonOptions) IgnoreModifyDevEnvironment ¶
func (o *CommonOptions) IgnoreModifyDevEnvironment(callback func(env *v1.Environment) error) error
IgnoreModifyDevEnvironment ignores modifying the dev environment when using separate Staging/Production clusters
func (*CommonOptions) IgnoreModifyEnvironment ¶
func (o *CommonOptions) IgnoreModifyEnvironment(name string, callback func(env *v1.Environment) error) error
IgnoreModifyEnvironment ignores modifying environments when using separate Staging/Production clusters
func (*CommonOptions) ImportProject ¶
func (o *CommonOptions) ImportProject(gitURL string, dir string, jenkinsfile string, branchPattern, credentials string, failIfExists bool, gitProvider gits.GitProvider, authConfigSvc auth.ConfigService, isEnvironment bool, batchMode bool) error
ImportProject imports a MultiBranchProject into Jenkins for the given git URL
func (*CommonOptions) InCDPipeline ¶
func (o *CommonOptions) InCDPipeline() bool
InCDPipeline return true if the command execution takes place in the CD pipeline
func (*CommonOptions) InCluster ¶
func (o *CommonOptions) InCluster() bool
InCluster return true if the command execution takes place in k8s cluster
func (*CommonOptions) InitBuildPacks ¶
func (o *CommonOptions) InitBuildPacks(i *InvokeDraftPack) (string, *v1.TeamSettings, error)
InitBuildPacks initialise the build packs
func (*CommonOptions) InitGitConfigAndUser ¶
func (o *CommonOptions) InitGitConfigAndUser() error
InitGitConfigAndUser validates we have git setup
func (*CommonOptions) InitHelm ¶
func (o *CommonOptions) InitHelm(config InitHelmConfig) error
InitHelm initializes helm client and server (tiller)
func (*CommonOptions) InstallAzureCli ¶
func (o *CommonOptions) InstallAzureCli()
InstallAzureCli installs azure cli
func (*CommonOptions) InstallChartAt ¶
func (o *CommonOptions) InstallChartAt(dir string, releaseName string, chart string, version string, ns string, helmUpdate bool, setValues []string, valueFiles []string, repo string) error
InstallChartAt installs the given chart
func (*CommonOptions) InstallChartOrGitOps ¶
func (o *CommonOptions) InstallChartOrGitOps(isGitOps bool, gitOpsEnvDir string, releaseName string, chart string, alias string, version string, ns string, helmUpdate bool, setValues []string, setSecrets []string, valueFiles []string, repo string) error
InstallChartOrGitOps if using gitOps lets write files otherwise lets use helm
func (*CommonOptions) InstallChartWithOptions ¶
func (o *CommonOptions) InstallChartWithOptions(options helm.InstallChartOptions) error
InstallChartWithOptions uses the options to run helm install or helm upgrade
func (*CommonOptions) InstallChartWithOptionsAndTimeout ¶
func (o *CommonOptions) InstallChartWithOptionsAndTimeout(options helm.InstallChartOptions, timeout string) error
InstallChartWithOptionsAndTimeout uses the options and the timeout to run helm install or helm upgrade
func (*CommonOptions) InstallGcloud ¶
func (o *CommonOptions) InstallGcloud()
InstallGcloud installs gcloud cli
func (*CommonOptions) InstallGlooctl ¶
func (o *CommonOptions) InstallGlooctl() error
InstallGlooctl Installs glooctl tool
func (*CommonOptions) InstallHelm ¶
func (o *CommonOptions) InstallHelm() error
InstallHelm install helm cli
func (*CommonOptions) InstallHelm3 ¶
func (o *CommonOptions) InstallHelm3() error
InstallHelm3 installs helm3 cli
func (*CommonOptions) InstallJx ¶
func (o *CommonOptions) InstallJx(upgrade bool, version string) error
InstallJx installs jx cli
func (*CommonOptions) InstallKustomize ¶
func (o *CommonOptions) InstallKustomize() error
InstallKustomize installs kustomize
func (*CommonOptions) InstallMissingDependencies ¶
func (o *CommonOptions) InstallMissingDependencies(providerSpecificDeps []string) error
InstallMissingDependencies installs missing dependencies
func (*CommonOptions) InstallOciCli ¶
func (o *CommonOptions) InstallOciCli() error
InstallOciCli installs oci cli
func (*CommonOptions) InstallProw ¶
func (o *CommonOptions) InstallProw(useTekton bool, useExternalDNS bool, isGitOps bool, gitOpsEnvDir string, gitUsername string, valuesFiles []string) error
InstallProw installs prow
func (*CommonOptions) InstallRequirements ¶
func (o *CommonOptions) InstallRequirements(cloudProvider string, extraDependencies ...string) error
InstallRequirements installs any requirements for the given provider kind
func (*CommonOptions) InstallTiller ¶
func (o *CommonOptions) InstallTiller() error
InstallTiller installs tiller
func (*CommonOptions) InvokeDraftPack ¶
func (o *CommonOptions) InvokeDraftPack(i *InvokeDraftPack) (string, error)
InvokeDraftPack invokes a draft pack copying in a Jenkinsfile if required
func (*CommonOptions) IsConfigExplicitlySet ¶
func (o *CommonOptions) IsConfigExplicitlySet(configPath, configKey string) bool
IsConfigExplicitlySet checks whether the flag or config with the specified name is explicitly set by the user. If so, true is returned, false otherwise.
func (*CommonOptions) IsFlagExplicitlySet ¶
func (o *CommonOptions) IsFlagExplicitlySet(flagName string) bool
IsFlagExplicitlySet checks whether the flag with the specified name is explicitly set by the user. If so, true is returned, false otherwise.
func (*CommonOptions) IsGitHubAppMode ¶
func (o *CommonOptions) IsGitHubAppMode() (bool, error)
IsGitHubAppMode returns true if we have enabled github app mode
func (*CommonOptions) IsInsecureSSLWebhooks ¶
func (o *CommonOptions) IsInsecureSSLWebhooks() (bool, error)
IsInsecureSSLWebhooks returns true if we should create webhooks with SSL check disabled, used when running BDD tests and should NOT be used for normal installs
func (*CommonOptions) IsJXBoot ¶
func (o *CommonOptions) IsJXBoot() bool
IsJXBoot returns true if this code is executed as part of jx boot, false otherwise.
func (*CommonOptions) IsProw ¶
func (o *CommonOptions) IsProw() (bool, error)
IsProw checks if prow is available in the cluster
func (*CommonOptions) IstioClient ¶
func (o *CommonOptions) IstioClient() (istioclient.Interface, error)
IstioClient creates a new Kubernetes client for Istio resources
func (*CommonOptions) JXClient ¶
func (o *CommonOptions) JXClient() (versioned.Interface, string, error)
JXClient returns or creates the jx client and current namespace
func (*CommonOptions) JXClientAndAdminNamespace ¶
func (o *CommonOptions) JXClientAndAdminNamespace() (versioned.Interface, string, error)
JXClientAndAdminNamespace returns or creates the jx client and admin namespace
func (*CommonOptions) JXClientAndDevNamespace ¶
func (o *CommonOptions) JXClientAndDevNamespace() (versioned.Interface, string, error)
JXClientAndDevNamespace returns and creates the jx client and dev namespace
func (*CommonOptions) JXClientDevAndAdminNamespace ¶
JXClientDevAndAdminNamespace returns or creates the jx client, dev and admin namespaces
func (*CommonOptions) JenkinsAuthConfigService ¶
func (o *CommonOptions) JenkinsAuthConfigService(namespace string, selector *JenkinsSelectorOptions) (auth.ConfigService, error)
JenkinsAuthConfigService creates the jenkins auth config service
func (*CommonOptions) JenkinsClient ¶
func (o *CommonOptions) JenkinsClient() (gojenkins.JenkinsClient, error)
JenkinsClient returns the Jenkins client
func (*CommonOptions) KnativeServeClient ¶
func (o *CommonOptions) KnativeServeClient() (kserve.Interface, string, error)
KnativeServeClient returns or creates the knative serve client
func (*CommonOptions) Kube ¶
func (o *CommonOptions) Kube() kube.Kuber
Kube returns the k8s config client
func (*CommonOptions) KubeClient ¶
func (o *CommonOptions) KubeClient() (kubernetes.Interface, error)
KubeClient returns or creates the kube client
func (*CommonOptions) KubeClientAndDevNamespace ¶
func (o *CommonOptions) KubeClientAndDevNamespace() (kubernetes.Interface, string, error)
KubeClientAndDevNamespace returns a kube client and the development namespace
func (*CommonOptions) KubeClientAndNamespace ¶
func (o *CommonOptions) KubeClientAndNamespace() (kubernetes.Interface, string, error)
KubeClientAndNamespace returns or creates the kube client and the current namespace
func (*CommonOptions) Kustomize ¶
func (o *CommonOptions) Kustomize() kustomize.Kustomizer
Kustomize returns or creates the kustomize client
func (*CommonOptions) LoadQuickStartsFromLocations ¶
func (o *CommonOptions) LoadQuickStartsFromLocations(locations []v1.QuickStartLocation, config *auth.AuthConfig) (*quickstarts.QuickstartModel, error)
LoadQuickStartsFromLocations Load all quickstarts from the given locatiotns
func (*CommonOptions) LoadQuickStartsModel ¶
func (o *CommonOptions) LoadQuickStartsModel(gitHubOrganisations []string, ignoreTeam bool) (*quickstarts.QuickstartModel, error)
LoadQuickStartsModel Load all quickstarts
func (*CommonOptions) LogImportedProject ¶
func (o *CommonOptions) LogImportedProject(isEnvironment bool, gitInfo *gits.GitRepository)
LogImportedProject logs more details for an imported project
func (*CommonOptions) ModifyDevEnvironment ¶
func (o *CommonOptions) ModifyDevEnvironment(callback func(env *v1.Environment) error) error
ModifyDevEnvironment modifies the development environment settings
func (*CommonOptions) ModifyEnvironment ¶
func (o *CommonOptions) ModifyEnvironment(name string, callback func(env *v1.Environment) error) error
ModifyDevEnvironment modifies the development environment settings
func (*CommonOptions) ModifyHelmValuesFile ¶
ModifyHelmValuesFile modifies the helm values.yaml file using some kind of callback
func (*CommonOptions) ModifyTeam ¶
func (o *CommonOptions) ModifyTeam(adminNs string, teamName string, callback func(env *v1.Team) error) error
ModifyTeam lazily creates the Team CRD if it does not exist or updates it if it requires a change. The Team CRD will be modified in the specified admin namespace.
func (*CommonOptions) ModifyUser ¶
ModifyUser lazily creates the user if it does not exist or updates it if it requires a change
func (*CommonOptions) NewGitProvider ¶
func (o *CommonOptions) NewGitProvider(gitURL string, message string, authConfigSvc auth.ConfigService, gitKind string, ghOwner string, batchMode bool, gitter gits.Gitter) (gits.GitProvider, error)
NewGitProvider creates a new git provider for the given list of argumentes
func (*CommonOptions) NewHelm ¶
func (o *CommonOptions) NewHelm(verbose bool, helmBinary string, noTiller bool, helmTemplate bool) helm.Helmer
NewHelm cerates a new helm client from the given list of parameters
func (*CommonOptions) NotifyProgress ¶
func (o *CommonOptions) NotifyProgress(level LogLevel, format string, args ...interface{})
NotifyProgress by default logs info to the console but a custom callback can be added to send feedback to, say, a web UI
func (*CommonOptions) ParseDependencyUpdateMessage ¶
func (o *CommonOptions) ParseDependencyUpdateMessage(msg string, commitURL string) (*v1.DependencyUpdate, *dependencymatrix.DependencyUpdates, error)
ParseDependencyUpdateMessage parses commit messages, and if it's a dependency update message parses it
A complete update message looks like:
chore(dependencies): update ((<owner>/)?<repo>|https://<gitHost>/<owner>/<repo>) from <fromVersion> to <toVersion>
<description of update method>
<fromVersion>, <toVersion> and <repo> are required fields. The markdown URL format is optional, and a plain <owner>/<repo> can be used.
func (*CommonOptions) PickCustomJenkinsName ¶
func (o *CommonOptions) PickCustomJenkinsName(jenkinsSelector *JenkinsSelectorOptions, kubeClient kubernetes.Interface, ns string) (string, error)
PickCustomJenkinsName picks the name of a custom jenkins server App if available
func (*CommonOptions) PickGitRemoteURL ¶
func (o *CommonOptions) PickGitRemoteURL(config *gitcfg.Config) (string, error)
PickGitRemoteURL picks a git remote URL from git config, or prompts to the user if no URL is found
func (*CommonOptions) PickPipelineUserAuth ¶
func (o *CommonOptions) PickPipelineUserAuth(config *auth.AuthConfig, server *auth.AuthServer) (*auth.UserAuth, error)
PickPipelineUserAuth returns the user auth for pipeline user
func (*CommonOptions) ProwJobClient ¶
func (o *CommonOptions) ProwJobClient() (prowjobclient.Interface, string, error)
ProwJobClient returns or creates the ProwJob client
func (*CommonOptions) RegisterEnvironmentCRD ¶
func (o *CommonOptions) RegisterEnvironmentCRD() error
RegisterEnvironmentCRD registers the CRD for environmnt
func (*CommonOptions) RegisterEnvironmentRoleBindingCRD ¶
func (o *CommonOptions) RegisterEnvironmentRoleBindingCRD() error
RegisterEnvironmentRoleBindingCRD register RegisterEnvironmentRoleBinding CRD
func (*CommonOptions) RegisterLocalHelmRepo ¶
func (o *CommonOptions) RegisterLocalHelmRepo(repoName, ns string) error
func (*CommonOptions) RegisterPipelineActivityCRD ¶
func (o *CommonOptions) RegisterPipelineActivityCRD() error
RegisterPipelineActivityCRD register PipelineActivity CRD
func (*CommonOptions) RegisterReleaseCRD ¶
func (o *CommonOptions) RegisterReleaseCRD() error
RegisterReleaseCRD register Release CRD
func (*CommonOptions) RegisterTeamCRD ¶
func (o *CommonOptions) RegisterTeamCRD() error
RegisterTeamCRD registers Team CRD
func (*CommonOptions) RegisterUserCRD ¶
func (o *CommonOptions) RegisterUserCRD() error
RegisterUserCRD registers user CRD
func (*CommonOptions) RegisterWorkflowCRD ¶
func (o *CommonOptions) RegisterWorkflowCRD() error
RegisterWorkflowCRD registers Workflow CRD
func (*CommonOptions) ReleaseChartRepositoryURL ¶
func (o *CommonOptions) ReleaseChartRepositoryURL() string
ReleaseChartRepositoryURL returns the chart repository URL for releases
func (*CommonOptions) ResetClientsAndNamespaces ¶
func (o *CommonOptions) ResetClientsAndNamespaces()
ResetClientsAndNamespaces resets the current clients and namespaces
func (*CommonOptions) ResetSecretsLocation ¶
func (o *CommonOptions) ResetSecretsLocation() error
ResetSecretsLocation resets the secrets location
func (*CommonOptions) ResolveChartMuseumURL ¶
func (o *CommonOptions) ResolveChartMuseumURL() (string, error)
ResolveChartMuseumURL resolves the current Chart Museum URL so we can pass it into a remote Environment's git repository
func (*CommonOptions) ResourcesInstaller ¶
func (o *CommonOptions) ResourcesInstaller() resources.Installer
ResourcesInstaller returns the installer for Kubernetes resources
func (*CommonOptions) Retry ¶
Retry executes a given function and reties 'attempts' times with a delay of 'sleep' between the executions
func (*CommonOptions) RetryQuiet ¶
func (o *CommonOptions) RetryQuiet(attempts int, sleep time.Duration, call func() error) (err error)
RetryQuiet executes a given function call with retry when an error occurs without printing any logs
func (*CommonOptions) RetryQuietlyUntilTimeout ¶
func (o *CommonOptions) RetryQuietlyUntilTimeout(timeout time.Duration, sleep time.Duration, call func() error) (err error)
RetryQuietlyUntilTimeout executes a function call with retry when an error occurs. It stops retrying when the timeout is reached.
func (*CommonOptions) RetryUntilFatalError ¶
func (o *CommonOptions) RetryUntilFatalError(attempts int, sleep time.Duration, call func() (*FatalError, error)) (err error)
RetryUntilFatalError executes a given function call with retry when the function fails. It stops retrying when a fatal error is encountered.
func (*CommonOptions) RetryUntilTrueOrTimeout ¶
func (o *CommonOptions) RetryUntilTrueOrTimeout(timeout time.Duration, sleep time.Duration, call func() (bool, error)) (err error)
RetryUntilTrueOrTimeout waits until complete is true, an error occurs or the timeout
func (*CommonOptions) RunCommand ¶
func (o *CommonOptions) RunCommand(name string, args ...string) error
RunCommand runs a given command command with arguments Deprecated use util.Command
func (*CommonOptions) RunCommandFromDir ¶
func (o *CommonOptions) RunCommandFromDir(dir, name string, args ...string) error
RunCommandFromDir runs a command in the given directory Deprecated use util.Command
func (*CommonOptions) RunCommandInteractive ¶
func (o *CommonOptions) RunCommandInteractive(interactive bool, name string, args ...string) error
RunCommandInteractive run a given command interactively Deprecated use util.Command
func (*CommonOptions) RunCommandInteractiveInDir ¶
func (o *CommonOptions) RunCommandInteractiveInDir(interactive bool, dir string, name string, args ...string) error
RunCommandInteractiveInDir run a given command interactively in a given directory Deprecated use util.Command
func (*CommonOptions) RunCommandQuietly ¶
func (o *CommonOptions) RunCommandQuietly(name string, args ...string) error
RunCommandQuietly runs commands and discard the stdout and stderr Deprecated use util.Command
func (*CommonOptions) RunCommandVerbose ¶
func (o *CommonOptions) RunCommandVerbose(name string, args ...string) error
RunCommandVerbose runs a given command with arguments in verbose mode Deprecated use util.Command
func (*CommonOptions) RunCommandVerboseAt ¶
func (o *CommonOptions) RunCommandVerboseAt(dir string, name string, args ...string) error
RunCommandVerboseAt runs a given command in a given folder in verbose mode Deprecated use util.Command
func (*CommonOptions) RunExposecontroller ¶
func (o *CommonOptions) RunExposecontroller(devNamespace, targetNamespace string, ic kube.IngressConfig, services ...string) error
RunExposecontroller runs exponse controller in the given target dir with the given ingress configuration
func (*CommonOptions) SetAPIExtensionsClient ¶
func (o *CommonOptions) SetAPIExtensionsClient(client apiextensionsclientset.Interface)
SetAPIExtensionsClient sets the api extensions client
func (*CommonOptions) SetBatchMode ¶
func (o *CommonOptions) SetBatchMode(batchMode bool)
SetBatchMode configures the batch mode
func (*CommonOptions) SetCurrentNamespace ¶
func (o *CommonOptions) SetCurrentNamespace(ns string)
func (*CommonOptions) SetDevNamespace ¶
func (o *CommonOptions) SetDevNamespace(ns string)
SetDevNamespace configures the current dev namespace
func (*CommonOptions) SetEnvironmentsDir ¶
func (o *CommonOptions) SetEnvironmentsDir(dir string)
SetEnvironmentsDir sets the environment directory
func (*CommonOptions) SetFactory ¶
func (o *CommonOptions) SetFactory(f clients.Factory)
SetFactory sets the factory to use
func (*CommonOptions) SetFakeGitProvider ¶
func (o *CommonOptions) SetFakeGitProvider(provider *gits.FakeProvider)
SetFakeGitProvider set the fake git provider for testing purposes
func (*CommonOptions) SetFakeKubeClient ¶
func (o *CommonOptions) SetFakeKubeClient() error
SetFakeKubeClient creates a fake KubeClient for CommonOptions Use this in case there is no active cluster that can be used to retrieve configuration information.
func (*CommonOptions) SetGCloudClient ¶
func (o *CommonOptions) SetGCloudClient(gcloudClient gke.GClouder)
SetGCloudClient set the gcloud client
func (*CommonOptions) SetGit ¶
func (o *CommonOptions) SetGit(git gits.Gitter)
SetGit sets the git client
func (*CommonOptions) SetHelm ¶
func (o *CommonOptions) SetHelm(helmer helm.Helmer)
SetHelm sets the helmer used for this object
func (*CommonOptions) SetJenkinsClient ¶
func (o *CommonOptions) SetJenkinsClient(jenkinsClient gojenkins.JenkinsClient)
SetJenkinsClient sets the JenkinsClient - usually used in testing
func (*CommonOptions) SetJxClient ¶
func (o *CommonOptions) SetJxClient(jxClient versioned.Interface)
SetJxClient set the jx client
func (*CommonOptions) SetKnativeServeClient ¶
func (o *CommonOptions) SetKnativeServeClient(client kserve.Interface)
SetKnativeServeClient sets the kantive serve client
func (*CommonOptions) SetKube ¶
func (o *CommonOptions) SetKube(kuber kube.Kuber)
SetKube sets the kube config client
func (*CommonOptions) SetKubeClient ¶
func (o *CommonOptions) SetKubeClient(kubeClient kubernetes.Interface)
SetKubeClient sets the kube client
func (*CommonOptions) SetResourcesInstaller ¶
func (o *CommonOptions) SetResourcesInstaller(installer resources.Installer)
SetResourcesInstaller configures the installer for Kubernetes resources
func (*CommonOptions) SetSecretURLClient ¶
func (o *CommonOptions) SetSecretURLClient(client secreturl.Client)
SetSecretURLClient sets the Secret URL Client
func (*CommonOptions) SetSecretsLocation ¶
func (o *CommonOptions) SetSecretsLocation(location secrets.SecretsLocationKind, persist bool) error
SetSecretsLocation sets the secrets location
func (*CommonOptions) SetVersionResolver ¶
func (o *CommonOptions) SetVersionResolver(resolver *versionstream.VersionResolver)
SetVersionResolver gets a VersionResolver, lazy creating one if required
func (*CommonOptions) SystemVaultClient ¶
func (o *CommonOptions) SystemVaultClient(namespace string) (vault.Client, error)
SystemVaultClient return or creates the system vault client
func (*CommonOptions) TailJenkinsBuildLog ¶
func (o *CommonOptions) TailJenkinsBuildLog(jenkinsSelector *JenkinsSelectorOptions, jobName string, build *gojenkins.Build) error
TailJenkinsBuildLog tail the build log of the given Jenkins jobs name
func (*CommonOptions) TailLogs ¶
func (o *CommonOptions) TailLogs(ns string, pod string, containerName string) error
TailLogs returns the logs from a given pod
func (*CommonOptions) TeamAndEnvironmentNames ¶
func (o *CommonOptions) TeamAndEnvironmentNames() (string, string, error)
TeamAndEnvironmentNames returns team and environment namespace
func (*CommonOptions) TeamBranchPatterns ¶
func (o *CommonOptions) TeamBranchPatterns() (*BranchPatterns, error)
TeamBranchPatterns returns the team branch patterns used to enable CI/CD on branches when creating/importing projects
func (*CommonOptions) TeamHelmBin ¶
func (o *CommonOptions) TeamHelmBin() (string, bool, bool, error)
TeamHelmBin returns the helm binary used for a team and whether a remote tiller is disabled
func (*CommonOptions) TeamSettings ¶
func (o *CommonOptions) TeamSettings() (*v1.TeamSettings, error)
TeamSettings returns the team settings
func (*CommonOptions) TektonClient ¶
func (o *CommonOptions) TektonClient() (tektonclient.Interface, string, error)
TektonClient lazily creates a new Knative Pipeline client
func (*CommonOptions) UpdateJenkinsURL ¶
func (o *CommonOptions) UpdateJenkinsURL(namespaces []string) error
UpdateJenkinsURL updates the Jenkins URL
func (*CommonOptions) VaultOperatorClient ¶
func (o *CommonOptions) VaultOperatorClient() (vaultoperatorclient.Interface, error)
VaultOperatorClient returns or creates the vault operator client
func (*CommonOptions) WaitForReadyPodForDeployment ¶
func (o *CommonOptions) WaitForReadyPodForDeployment(c kubernetes.Interface, ns string, name string, names []string, readyOnly bool) (string, error)
WaitForReadyPodForDeployment waits for a pod of a deployment to be ready
func (*CommonOptions) WaitForReadyPodForSelector ¶
func (o *CommonOptions) WaitForReadyPodForSelector(c kubernetes.Interface, ns string, selector labels.Selector, readyOnly bool) (string, error)
WaitForReadyPodForSelector waits for a pod to which the selector applies to be ready
func (*CommonOptions) WaitForReadyPodForSelectorLabels ¶
func (o *CommonOptions) WaitForReadyPodForSelectorLabels(c kubernetes.Interface, ns string, labels map[string]string, readyOnly bool) (string, error)
WaitForReadyPodForSelectorLabels waits for a pod selected by the given labels to be ready
type CreateBucketValues ¶
type CreateBucketValues struct { Bucket string BucketKind string // GKE specific values GKEProjectID string GKEZone string }
CreateBucketValues contains the values to create a Bucket on cloud storage
func (*CreateBucketValues) AddCreateBucketFlags ¶
func (cb *CreateBucketValues) AddCreateBucketFlags(cmd *cobra.Command)
AddCreateBucketFlags adds the CLI arguments to be able to specify to create a new bucket along with any cloud specific parameters
func (*CreateBucketValues) IsEmpty ¶
func (cb *CreateBucketValues) IsEmpty() bool
IsEmpty returns true if there is no bucket name specified
type FatalError ¶
type FatalError struct {
E error
}
FatalError is a wrapper structure around regular error indicating that re(try) processing flow should be interrupted immediately.
func (*FatalError) Error ¶
func (err *FatalError) Error() string
Error converts a fatal error into a string
type GKEClusterOptions ¶
GKEClusterOptions GKE specific configurations
type InitHelmConfig ¶
type InitHelmConfig struct { Namespace string OnlyHelmClient bool Helm3 bool SkipTiller bool GlobalTiller bool TillerNamespace string TillerRole string }
InitHelmConfig configuration for helm initialization
type InvokeDraftPack ¶
type InvokeDraftPack struct { Dir string CustomDraftPack string Jenkinsfile string DefaultJenkinsfile string WithRename bool InitialisedGit bool DisableJenkinsfileCheck bool DisableAddFiles bool UseNextGenPipeline bool CreateJenkinsxYamlIfMissing bool ProjectConfig *config.ProjectConfig }
InvokeDraftPack used to pass arguments into the draft pack invocation
type JenkinsProjectOptions ¶
type JenkinsProjectOptions struct { GitInfo *gits.GitRepository GitProvider gits.GitProvider Credentials string BranchPattern string Jenkinsfile string }
JenkinsProjectOptions store the required options to create a Jenkins project
type JenkinsSelectorOptions ¶
type JenkinsSelectorOptions struct { UseCustomJenkins bool CustomJenkinsName string // contains filtered or unexported fields }
JenkinsSelectorOptions used to represent the options used to refer to a Jenkins. if nothing is specified it assumes the current team is using a static Jenkins server as its execution engine. otherwise we can refer to other additional Jenkins Apps to implement custom Jenkins servers
func (*JenkinsSelectorOptions) AddFlags ¶
func (o *JenkinsSelectorOptions) AddFlags(cmd *cobra.Command)
AddFlags add the command flags for picking a custom Jenkins App to work with
func (*JenkinsSelectorOptions) IsCustom ¶
func (o *JenkinsSelectorOptions) IsCustom() bool
IsCustom returns true if a custom Jenkins App is specified
type ModifyDevEnvironmentFn ¶
type ModifyDevEnvironmentFn func(callback func(env *jenkinsv1.Environment) error) error
ModifyDevEnvironmentFn a callback to create/update the development Environment
type ModifyEnvironmentFn ¶
type ModifyEnvironmentFn func(name string, callback func(env *jenkinsv1.Environment) error) error
ModifyEnvironmentFn a callback to create/update an Environment
type PullRequestDetails ¶
type PullRequestDetails struct { Dir string RepositoryGitURL string RepositoryBranch string RepositoryMessage string BranchNameText string Title string Message string }
PullRequestDetails details to pass in to create a PullRequest if the repository is modified
type ServerFlags ¶
func (*ServerFlags) AddGitServerFlags ¶
func (o *ServerFlags) AddGitServerFlags(cmd *cobra.Command)
AddGitServerFlags add git server flags to the given cobra command
func (*ServerFlags) IsEmpty ¶
func (f *ServerFlags) IsEmpty() bool
IsEmpty returns true if the server flags and server URL are tempry
Source Files ¶
- addon.go
- auth.go
- bucket.go
- buildpacks.go
- cert_manager.go
- clusters.go
- commands.go
- common.go
- constants.go
- devpod.go
- docker.go
- domain.go
- environments.go
- expose.go
- gcp.go
- git.go
- helm.go
- import.go
- install.go
- issues.go
- jenkins.go
- kube_rbac.go
- kustomize.go
- logs.go
- pipelines.go
- plugins.go
- pod.go
- pullrequest.go
- quickstarts.go
- releases.go
- team_settings.go
- version.go