opts

package
v1.3.1119 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2019 License: Apache-2.0 Imports: 90 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OptionServerName       = "name"
	OptionServerURL        = "url"
	OptionBatchMode        = "batch-mode"
	OptionVerbose          = "verbose"
	OptionLogLevel         = "log-level"
	OptionNoBrew           = "no-brew"
	OptionInstallDeps      = "install-dependencies"
	OptionSkipAuthSecMerge = "skip-auth-secrets-merge"
	OptionEnvironment      = "env"
	OptionApplication      = "app"
	OptionTimeout          = "timeout"
)
View Source
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
)
View Source
const (
	AdminSecretsFile            = "adminSecrets.yaml"
	ExtraValuesFile             = "extraValues.yaml"
	JXInstallConfig             = "jx-install-config"
	CloudEnvValuesFile          = "myvalues.yaml"
	CloudEnvSecretsFile         = "secrets.yaml"
	CloudEnvSopsConfigFile      = ".sops.yaml"
	DefaultInstallTimeout       = "6000"
	DefaultCloudEnvironmentsURL = "https://github.com/jenkins-x/cloud-environments"
	DefaultVersionsURL          = "https://github.com/jenkins-x/jenkins-x-versions"
)
View Source
const GkeClusterListHeader = "PROJECT_ID"

GkeClusterListHeader header name for GCP project ID when listing the GKE clusters

Variables

This section is empty.

Functions

func AddGitRepoOptionsArguments

func AddGitRepoOptionsArguments(cmd *cobra.Command, repositoryOptions *gits.GitRepositoryOptions)

AddGitRepoOptionsArguments adds common git flags to the given cobra command

func BinaryShouldBeInstalled

func BinaryShouldBeInstalled(d string) string

BinaryShouldBeInstalled appends the binary to the deps array if it cannot be found on the $PATH

func CopyBuildPack

func CopyBuildPack(dest, src string) error

CopyBuildPack copies the build pack from the source dir to the destination dir

func FindGitCredentials

func FindGitCredentials(gitProvider gits.GitProvider, secrets *corev1.SecretList) string

FindGitCredentials finds the credential name from the pipeline git Secrets

func GetSafeUsername

func GetSafeUsername(username string) string

GetSafeUsername returns username by checking the active configuration

func SeeAlsoText

func SeeAlsoText(commands ...string) string

SeeAlsoText returns text to describe which other commands to look at which are related to the current command

func ShouldInstallBinary

func ShouldInstallBinary(name string) (fileName string, download bool, err error)

ShouldInstallBinary checks if the given binary should be installed

Types

type BranchPatterns

type BranchPatterns struct {
	DefaultBranchPattern string
	ForkBranchPattern    string
}

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

	In                     terminal.FileReader
	Out                    terminal.FileWriter
	Err                    io.Writer
	Cmd                    *cobra.Command
	Args                   []string
	BatchMode              bool
	Verbose                bool
	LogLevel               string
	NoBrew                 bool
	InstallDependencies    bool
	SkipAuthSecretsMerge   bool
	ServiceAccount         string
	Username               string
	ExternalJenkinsBaseURL string
	ModifyDevEnvironmentFn ModifyDevEnvironmentFn
	ModifyEnvironmentFn    ModifyEnvironmentFn
	// contains filtered or unexported fields
}

CommonOptions contains common options and helper methods

func NewCommonOptions

func NewCommonOptions(devNamespace string, factory clients.Factory) CommonOptions

NewCommonOptions a helper method to create a new CommonOptions instance pre configured in a specific devNamespace

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) AddChartRepos

func (o *CommonOptions) AddChartRepos(dir string, helmBinary string, chartRepos []string) error

AddChartRepos add chart repositories

func (*CommonOptions) AddCommonFlags

func (options *CommonOptions) AddCommonFlags(cmd *cobra.Command)

addCommonFlags adds the common flags to the given command

func (*CommonOptions) AddHelmBinaryRepoIfMissing

func (o *CommonOptions) AddHelmBinaryRepoIfMissing(helmUrl, repoName, username, password string) error

func (*CommonOptions) AddHelmRepoIfMissing

func (o *CommonOptions) AddHelmRepoIfMissing(helmUrl, repoName, username, password string) error

AddHelmRepoIfMissing adds the given helm repo if its not already added

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) AddRequiredBinary

func (o *CommonOptions) AddRequiredBinary(binName string, deps []string) []string

AddRequiredBinary add the required binary

func (*CommonOptions) AddonAuthConfigService

func (o *CommonOptions) AddonAuthConfigService(secrets *corev1.SecretList) (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) AuthConfigService

func (o *CommonOptions) AuthConfigService(file string) (auth.ConfigService, error)

AuthConfigService creates the auth config service for given file

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) (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) CreateAddonAuthConfigService

func (o *CommonOptions) CreateAddonAuthConfigService() (auth.ConfigService, error)

CreateAddonAuthConfigService creates an addon auth config service

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() (auth.ConfigService, error)

CreateChatAuthConfigService creates a new chat auth service

func (*CommonOptions) CreateChatProvider

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

CreateChatProvider creates a new chart provider from the given configuration

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) CreateGitAuthConfigService

func (o *CommonOptions) CreateGitAuthConfigService() (auth.ConfigService, error)

CreateGitAuthConfigService creates git auth config service

func (*CommonOptions) CreateGitAuthConfigServiceDryRun

func (o *CommonOptions) CreateGitAuthConfigServiceDryRun(dryRun bool) (auth.ConfigService, error)

CreateGitAuthConfigServiceDryRun creates git auth config service, skips the effective creation when dry run is set

func (*CommonOptions) CreateGitAuthConfigServiceFromSecrets

func (o *CommonOptions) CreateGitAuthConfigServiceFromSecrets(fileName string, secrets *corev1.SecretList, isCDPipeline bool) (auth.ConfigService, error)

CreateGitAuthConfigServiceFromSecrets Creates a git auth config service from secrets

func (*CommonOptions) CreateGitProvider

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() (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) (*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) Debugf

func (o *CommonOptions) Debugf(format string, a ...interface{})

Debugf outputs the given text to the console if verbose mode is enabled

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) DiscoverAppName

func (o *CommonOptions) DiscoverAppName() (string, error)

DiscoverAppNam discovers an app name from a helm chart installation

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) DockerRegistry

func (o *CommonOptions) DockerRegistry() string

DockerRegistry parses the docker registry from various places

func (*CommonOptions) DockerRegistryOrg

func (o *CommonOptions) DockerRegistryOrg(repository *gits.GitRepository) string

DockerRegistryOrg parses the docker registry organisation from various places

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) 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) FilterInstalledDependencies

func (o *CommonOptions) FilterInstalledDependencies(deps []string) []string

FilterInstalledDependencies filters installed dependencies

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) 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) GetBuildNumber

func (o *CommonOptions) GetBuildNumber() string

GetBuildNumber returns the build number

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

func (o *CommonOptions) GetCommandOutput(dir string, name string, args ...string) (string, error)

GetCommandOutput evaluates the given command and returns the trimmed output

func (*CommonOptions) GetDefaultAdminPassword

func (o *CommonOptions) GetDefaultAdminPassword(devNamespace string) (string, error)

GetDefaultAdminPassword returns the default admin password from dev namespace

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) 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 Kuberntes 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) GetGoogleProjectId

func (o *CommonOptions) GetGoogleProjectId() (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) (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) 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) GetJenkinsURL

func (o *CommonOptions) GetJenkinsURL() (string, error)

getJenkinsURL return the Jenkins URL

func (*CommonOptions) GetLatestJXVersion

func (o *CommonOptions) GetLatestJXVersion() (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) GetOut

func (o *CommonOptions) GetOut() terminal.FileWriter

GetOut returns the command output writer

func (*CommonOptions) GetPipelineGitAuth

func (o *CommonOptions) GetPipelineGitAuth() (*auth.AuthServer, *auth.UserAuth, error)

GetPipelineGitAuth 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) 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 version.VersionKind, name, repo 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) GetWebHookEndpoint

func (o *CommonOptions) GetWebHookEndpoint() (string, error)

GetWebHookEndpoint returns the webhook endpoint

func (*CommonOptions) Git

func (o *CommonOptions) Git() gits.Gitter

Git returns the git client

func (*CommonOptions) GitProviderForGitServerURL

func (o *CommonOptions) GitProviderForGitServerURL(gitServiceUrl string, gitKind string) (gits.GitProvider, error)

GitProviderForURL 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) (string, error)

HelmInitDependencyBuild initialises the dependencies an run the build

func (*CommonOptions) HelmInitRecursiveDependencyBuild

func (o *CommonOptions) HelmInitRecursiveDependencyBuild(dir string, chartRepos []string) error

HelmInitRecursiveDependencyBuild helm initialises the dependencies recursively

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() (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 hlem client and server (tillter)

func (*CommonOptions) InstallAws

func (o *CommonOptions) InstallAws() error

InstallAws installs aws

func (*CommonOptions) InstallAzureCli

func (o *CommonOptions) InstallAzureCli() error

InstallAzureCli installs azure cli

func (*CommonOptions) InstallBrew

func (o *CommonOptions) InstallBrew() error

InstallBrew installs brew

func (*CommonOptions) InstallBrewIfRequired

func (o *CommonOptions) InstallBrewIfRequired() error

InstallBrewIfRequired installs brew if required

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, gitOpsDir string, 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 added in v1.3.1109

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) InstallEksCtl

func (o *CommonOptions) InstallEksCtl(skipPathScan bool) error

InstallEksCtl installs eks cli

func (*CommonOptions) InstallEksCtlWithVersion

func (o *CommonOptions) InstallEksCtlWithVersion(version string, skipPathScan bool) error

InstallEksCtlWithVersion install a specific version of eks cli

func (*CommonOptions) InstallGcloud

func (o *CommonOptions) InstallGcloud() error

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) InstallHeptioAuthenticatorAws

func (o *CommonOptions) InstallHeptioAuthenticatorAws(skipPathScan bool) error

InstallHeptioAuthenticatorAws install heptio authenticator for AWS

func (*CommonOptions) InstallHeptioAuthenticatorAwsWithVersion

func (o *CommonOptions) InstallHeptioAuthenticatorAwsWithVersion(version string, skipPathScan bool) error

InstallHeptioAuthenticatorAwsWithVersion install a specific version of heptio authenticator for AWS

func (*CommonOptions) InstallHyperkit

func (o *CommonOptions) InstallHyperkit() error

InstallHyperkit installs hyperkit

func (*CommonOptions) InstallIBMCloud

func (o *CommonOptions) InstallIBMCloud(skipPathScan bool) error

InstallIBMCloud installs IBM cloud cli

func (*CommonOptions) InstallIBMCloudWithVersion

func (o *CommonOptions) InstallIBMCloudWithVersion(version string, skipPathScan bool) error

InstallIBMCloudWithVersion installs a specific version of IBM cloud CLI

func (*CommonOptions) InstallJx

func (o *CommonOptions) InstallJx(upgrade bool, version string) error

InstallJx installs jx cli

func (*CommonOptions) InstallKSync

func (o *CommonOptions) InstallKSync() (string, error)

InstallKSync install ksync

func (*CommonOptions) InstallKops

func (o *CommonOptions) InstallKops() error

InstallKops installs kops

func (*CommonOptions) InstallKubectl

func (o *CommonOptions) InstallKubectl(skipPathScan bool) error

InstallKubectl installs kubectl

func (*CommonOptions) InstallKubectlWithVersion

func (o *CommonOptions) InstallKubectlWithVersion(version string, skipPathScan bool) error

InstallKubectlWithVersion install a specific version of kubectl

func (*CommonOptions) InstallKustomize

func (o *CommonOptions) InstallKustomize() error

InstallKustomize installs kustomize

func (*CommonOptions) InstallKvm

func (o *CommonOptions) InstallKvm() error

InstallKvm installs kvm

func (*CommonOptions) InstallKvm2

func (o *CommonOptions) InstallKvm2() error

InstallKvm2 install kvm2

func (*CommonOptions) InstallMavenIfRequired

func (o *CommonOptions) InstallMavenIfRequired() error

InstallMavenIfRequired installs maven if not available

func (*CommonOptions) InstallMinikube

func (o *CommonOptions) InstallMinikube() error

InstallMinikube installs minikube

func (*CommonOptions) InstallMinishift

func (o *CommonOptions) InstallMinishift() error

InstallMinishift installs minishift

func (*CommonOptions) InstallMissingDependencies

func (o *CommonOptions) InstallMissingDependencies(providerSpecificDeps []string) error

InstallMissingDependencies installs missing dependencies

func (*CommonOptions) InstallOc

func (o *CommonOptions) InstallOc() error

InstallOc installs oc cli

func (*CommonOptions) InstallOciCli

func (o *CommonOptions) InstallOciCli() error

InstallOciCli installs oci cli

func (*CommonOptions) InstallOrUpdateBinary

func (o *CommonOptions) InstallOrUpdateBinary(options InstallOrUpdateBinaryOptions) error

InstallOrUpdateBinary installs or updates a binary

func (*CommonOptions) InstallProw

func (o *CommonOptions) InstallProw(useTekton bool, isGitOps bool, gitOpsDir string, gitOpsEnvDir string, gitUsername 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) InstallTerraform

func (o *CommonOptions) InstallTerraform() error

InstallTerraform installs terraform

func (*CommonOptions) InstallTiller

func (o *CommonOptions) InstallTiller() error

InstallTiller installs tiller

func (*CommonOptions) InstallVaultCli

func (o *CommonOptions) InstallVaultCli() error

InstallVaultCli installs vault cli

func (*CommonOptions) InstallVirtualBox

func (o *CommonOptions) InstallVirtualBox() error

InstallVirtualBox installs virtual box

func (*CommonOptions) InstallXhyve

func (o *CommonOptions) InstallXhyve() error

InstallXhyve installs xhyve

func (*CommonOptions) Installhyperv

func (o *CommonOptions) Installhyperv() error

Installhyperv installs hyperv

func (*CommonOptions) InvokeDraftPack

func (o *CommonOptions) InvokeDraftPack(i *InvokeDraftPack) (string, error)

InvokeDraftPack invokes a draft pack copying in a Jenkinsfile if required

func (*CommonOptions) IsFlagExplicitlySet added in v1.3.1115

func (o *CommonOptions) IsFlagExplicitlySet(flagName string) bool

IsFlagExplicitlySet checks whether the flag with the specified name is explicitly set by the uer. If so, true is returned, false otherwise.

func (*CommonOptions) IsHelmRepoMissing

func (o *CommonOptions) IsHelmRepoMissing(helmUrlString string) (bool, error)

IsHelmRepoMissing checks if the given helm repository is missing

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

func (o *CommonOptions) JXClientDevAndAdminNamespace() (versioned.Interface, string, string, error)

JXClientDevAndAdminNamespace returns or creates the jx client, dev and admin namespaces

func (*CommonOptions) JenkinsAuthConfigService

func (o *CommonOptions) JenkinsAuthConfigService(client kubernetes.Interface, 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) KnativeBuildClient

func (o *CommonOptions) KnativeBuildClient() (buildclient.Interface, string, error)

KnativeBuildClient returns or creates the knative build 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) LoadPipelineSecrets

func (o *CommonOptions) LoadPipelineSecrets(kind, serviceKind string) (*corev1.SecretList, error)

LoadPipelineSecrets loads the pipeline secrets from kubernetes secrets

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) ModifyDevEnvironmentWithNs

func (o *CommonOptions) ModifyDevEnvironmentWithNs(jxClient versioned.Interface, ns string,
	fn func(env *jenkinsv1.Environment) error) error

ModifyDevEnvironment performs some mutation on the Development environment to modify team 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

func (o *CommonOptions) ModifyHelmValuesFile(dir string, fn func(string) (string, error)) error

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

func (o *CommonOptions) ModifyUser(userName string, callback func(env *v1.User) error) error

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, 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) 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) 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) ReleaseChartMuseumUrl

func (o *CommonOptions) ReleaseChartMuseumUrl() string

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) ResourcesInstaller

func (o *CommonOptions) ResourcesInstaller() resources.Installer

ResourcesInstaller returns the installer for Kubernetes resources

func (*CommonOptions) Retry

func (o *CommonOptions) Retry(attempts int, sleep time.Duration, call func() error) (err error)

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

func (*CommonOptions) RunCommandFromDir

func (o *CommonOptions) RunCommandFromDir(dir, name string, args ...string) error

TODO Refactor to use util.Run or util.RunWithoutRetry? RunCommandFromDir runs a command in the given directory

func (*CommonOptions) RunCommandInteractive

func (o *CommonOptions) RunCommandInteractive(interactive bool, name string, args ...string) error

RunCommandInteractive run a given command interactively

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

func (*CommonOptions) RunCommandQuietly

func (o *CommonOptions) RunCommandQuietly(name string, args ...string) error

RunCommandQuietly runs commands and discard the stdout and stderr

func (*CommonOptions) RunCommandVerbose

func (o *CommonOptions) RunCommandVerbose(name string, args ...string) error

RunCommandVerbose runs a given command with arguments in verbose mode

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

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 added in v1.3.1115

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) 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) SetSecretsLocation

func (o *CommonOptions) SetSecretsLocation(location secrets.SecretsLocationKind, persist bool) error

SetSecretsLocation sets the secrets location

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) UninstallBinary

func (o *CommonOptions) UninstallBinary(binDir string, name string) error

UninstallBinary uninstalls given binary

func (*CommonOptions) UpdateJenkinsURL

func (o *CommonOptions) UpdateJenkinsURL(namespaces []string) error

UpdateJenkinsURL updates the Jenkins URL

func (*CommonOptions) UpdatePipelineGitCredentialsSecret

func (o *CommonOptions) UpdatePipelineGitCredentialsSecret(server *auth.AuthServer, userAuth *auth.UserAuth) (string, error)

UpdatePipelineGitCredentialsSecret updates the pipeline git credentials in a kubernetes secret

func (*CommonOptions) VaultClient

func (o *CommonOptions) VaultClient(name string, namespace string) (vault.Client, error)

VaultClient returns or creates the vault client

func (*CommonOptions) VaultOperatorClient

func (o *CommonOptions) VaultOperatorClient() (vaultoperatorclient.Interface, error)

VaultOperatorClient returns or creates the vault operator client

func (*CommonOptions) WaitForReadyKnativeBuildPod

func (o *CommonOptions) WaitForReadyKnativeBuildPod(c kubernetes.Interface, ns string, readyOnly bool) (string, error)

WaitForReadyKnativeBuildPod waits for knative build pod to be ready

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 InitHelmConfig

type InitHelmConfig struct {
	Namespace       string
	OnlyHelmClient  bool
	Helm3           bool
	SkipTiller      bool
	GlobalTiller    bool
	TillerNamespace string
	TillerRole      string
}

InitHelmConfig configuration for helm initialization

type InstallOrUpdateBinaryOptions

type InstallOrUpdateBinaryOptions struct {
	Binary                       string
	GitHubOrganization           string
	DownloadUrlTemplate          string
	DownloadUrlTemplateLowerCase bool
	Version                      string
	SkipPathScan                 bool
	VersionExtractor             packages.VersionExtractor
	Archived                     bool
	ArchiveDirectory             string
}

InstallOrUpdateBinaryOptions options for install or update binary

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 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 Prow

type Prow struct {
	Version     string
	Chart       string
	SetValues   string
	ReleaseName string
	HMACToken   string
	OAUTHToken  string
}

Prow keeps install information for prow chart

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

type ServerFlags struct {
	ServerName string
	ServerURL  string
}

ServerFlags keeps generic server flags

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

type VersionResolver

type VersionResolver struct {
	VersionsDir string
}

VersionResolver resolves versions of charts, packages or docker images

func (*VersionResolver) ResolveDockerImage

func (v *VersionResolver) ResolveDockerImage(image string) (string, error)

ResolveDockerImage ensures the given docker image has a valid version if there is one in the version stream

func (*VersionResolver) StableVersion

func (v *VersionResolver) StableVersion(kind version.VersionKind, name string) (*version.StableVersion, error)

StableVersion returns the stable version of the given kind name

func (*VersionResolver) StableVersionNumber

func (v *VersionResolver) StableVersionNumber(kind version.VersionKind, name string) (string, error)

StableVersionNumber returns the stable version number of the given kind name

Jump to

Keyboard shortcuts

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