jx: github.com/jenkins-x/jx/pkg/cmd/opts Index | Files | Directories

package opts

import "github.com/jenkins-x/jx/pkg/cmd/opts"

Index

Package 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 logs.go pipelines.go plugins.go pod.go pullrequest.go quickstarts.go releases.go team_settings.go version.go

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"
)
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",
    }
)

func AddGitRepoOptionsArguments Uses

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

AddGitRepoOptionsArguments adds common git flags to the given cobra command

type BranchPatterns Uses

type BranchPatterns struct {
    DefaultBranchPattern string
    ForkBranchPattern    string
}

type ClusterOptions Uses

type ClusterOptions struct {
    GKE  GKEClusterOptions
    Fake bool
}

ClusterOptions used to determine which kind of cluster to query

func (*ClusterOptions) AddClusterFlags Uses

func (o *ClusterOptions) AddClusterFlags(cmd *cobra.Command)

AddClusterFlags adds the cluster CLI arguments

func (*ClusterOptions) CreateClient Uses

func (o *ClusterOptions) CreateClient(requireProject bool) (cluster.Client, error)

CreateClient creates a new cluster client from the CLI options

type CommonDevPodOptions Uses

type CommonDevPodOptions struct {
    Username string
}

CommonDevPodOptions are common flags that are to be applied across all DevPod commands

func (*CommonDevPodOptions) AddCommonDevPodFlags Uses

func (o *CommonDevPodOptions) AddCommonDevPodFlags(cmd *cobra.Command)

AddCommonDevPodFlags adds the dev pod common flags to the given cobra command

type CommonOptions Uses

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 Uses

func NewCommonOptionsWithFactory(factory clients.Factory) CommonOptions

NewCommonOptionsWithFactory creates a new CommonOptions instance with the given factory

func NewCommonOptionsWithTerm Uses

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 Uses

func (o *CommonOptions) AddBaseFlags(cmd *cobra.Command)

AddBaseFlags adds the base flags for all commands

func (*CommonOptions) AddChartRepos Uses

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

AddChartRepos add chart repositories

func (*CommonOptions) AddHelmBinaryRepoIfMissing Uses

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 Uses

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 Uses

func (o *CommonOptions) AddonAuthConfigService(secrets *corev1.SecretList) (auth.ConfigService, error)

AddonAuthConfigService creates the addon auth config service

func (*CommonOptions) ApiExtensionsClient Uses

func (o *CommonOptions) ApiExtensionsClient() (apiextensionsclientset.Interface, error)

ApiExtensionsClient return or creates the api extension client

func (*CommonOptions) AuthConfigService Uses

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

AuthConfigService creates the auth config service for given file

func (*CommonOptions) CertManagerClient Uses

func (o *CommonOptions) CertManagerClient() (certmngclient.Interface, error)

CertManagerClient returns or creates the cert-manager client

func (*CommonOptions) ChartmuseumAuthConfigService Uses

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

ChartmuseumAuthConfigService creates the chart museum auth config service

func (*CommonOptions) CleanExposecontrollerReources Uses

func (o *CommonOptions) CleanExposecontrollerReources(ns string)

CleanExposecontrollerReources cleans expose controller resources

func (*CommonOptions) CloneJXVersionsRepo Uses

func (o *CommonOptions) CloneJXVersionsRepo(versionRepository string, versionRef string) (string, error)

CloneJXVersionsRepo clones the jenkins-x versions repo to a local working dir

func (*CommonOptions) ComplianceClient Uses

func (o *CommonOptions) ComplianceClient() (*client.SonobuoyClient, error)

ComplianceClient returns or creates the compliance client

func (*CommonOptions) CreateAddonAuthConfigService Uses

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

CreateAddonAuthConfigService creates an addon auth config service

func (*CommonOptions) CreateBucket Uses

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 Uses

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 Uses

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

CreateChatAuthConfigService creates a new chat auth service

func (*CommonOptions) CreateClusterAdmin Uses

func (o *CommonOptions) CreateClusterAdmin() error

CreateClusterAdmin creates a cluster admin

func (*CommonOptions) CreateCustomJenkinsClient Uses

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 Uses

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

CreateGitAuthConfigService creates git auth config service

func (*CommonOptions) CreateGitAuthConfigServiceDryRun Uses

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 Uses

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 Uses

func (o *CommonOptions) CreateGitProvider(dir string) (*gits.GitRepository, gits.GitProvider, issues.IssueProvider, error)

CreateGitProvider creates a git from the given directory

func (*CommonOptions) CreateGitProviderForURLWithoutKind Uses

func (o *CommonOptions) CreateGitProviderForURLWithoutKind(gitURL string) (gits.GitProvider, *gits.GitRepository, error)

CreateGitProviderForURLWithoutKind creates a git provider from URL wihtout kind

func (*CommonOptions) CreateIssueProvider Uses

func (o *CommonOptions) CreateIssueProvider(dir string) (issues.IssueProvider, error)

CreateIssueProvider creates a issues provider

func (*CommonOptions) CreateIssueTrackerAuthConfigService Uses

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

CreateIssueTrackerAuthConfigService creates auth config service for issue tracker

func (*CommonOptions) CreatePipelineUserGitAuthConfigService Uses

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

CreatePipelineUserGitAuthConfigService creates git auth config service for the pipeline user

func (*CommonOptions) CreatePullRequest Uses

func (options *CommonOptions) CreatePullRequest(o *PullRequestDetails, modifyFn func() error) error

CreatePullRequest creates a Pull Request on the given repository

func (*CommonOptions) CreateTable Uses

func (o *CommonOptions) CreateTable() table.Table

CreateTable creates a new Table

func (*CommonOptions) CreateVersionResolver Uses

func (o *CommonOptions) CreateVersionResolver(repo string, gitRef string) (*versionstream.VersionResolver, error)

CreateVersionResolver creates a new VersionResolver service

func (*CommonOptions) CreateWebhookProw Uses

func (o *CommonOptions) CreateWebhookProw(gitURL string, gitProvider gits.GitProvider) error

CreateWebhookProw create a webhook for prow using the given git provider

func (*CommonOptions) CustomJenkinsClient Uses

func (o *CommonOptions) CustomJenkinsClient(jenkinsServiceName string) (gojenkins.JenkinsClient, error)

CustomJenkinsClient returns the Jenkins client for the custom jenkins app

func (*CommonOptions) CustomJenkinsURL Uses

func (o *CommonOptions) CustomJenkinsURL(jenkinsSelector *JenkinsSelectorOptions, kubeClient kubernetes.Interface, ns string) (string, error)

CustomJenkinsURL returns the default or the custom Jenkins URL

func (*CommonOptions) DefaultModifyDevEnvironment Uses

func (o *CommonOptions) DefaultModifyDevEnvironment(callback func(env *v1.Environment) error) error

defaultModifyDevEnvironment default implementation of modifying the Development environment settings

func (*CommonOptions) DefaultModifyEnvironment Uses

func (o *CommonOptions) DefaultModifyEnvironment(name string, callback func(env *v1.Environment) error) error

defaultModifyEnvironment default implementation of modifying an environment

func (*CommonOptions) DefaultReleaseCharts Uses

func (o *CommonOptions) DefaultReleaseCharts() []string

DefaultReleaseCharts returns the default release charts

func (*CommonOptions) DeleteChart Uses

func (o *CommonOptions) DeleteChart(releaseName string, purge bool) error

DeleteChart deletes the given chart

func (*CommonOptions) DevEnvAndTeamSettings Uses

func (o *CommonOptions) DevEnvAndTeamSettings() (*v1.Environment, *v1.TeamSettings, error)

DevEnvAndTeamSettings returns the Dev Environment and Team settings

func (*CommonOptions) DisableFeatures Uses

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 Uses

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

DiscoverAppNam discovers an app name from a helm chart installation

func (*CommonOptions) DiscoverBuildPack Uses

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 Uses

func (o *CommonOptions) DiscoverGitURL(gitConf string) (string, error)

DiscoverGitURL discovers the Git URL

func (*CommonOptions) DoInstallMissingDependencies Uses

func (o *CommonOptions) DoInstallMissingDependencies(install []string) error

DoInstallMissingDependencies install missing dependencies from the given list

func (*CommonOptions) EnableRemoteKubeCluster Uses

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 Uses

func (o *CommonOptions) EnsureAddonServiceAvailable(serviceName string) (string, error)

EnsureAddonServiceAvailable ensures that the given service name is available for addon

func (*CommonOptions) EnsureCertManager Uses

func (o *CommonOptions) EnsureCertManager() error

EnsureCertManager ensures cert-manager is installed

func (*CommonOptions) EnsureClusterRoleBinding Uses

func (o *CommonOptions) EnsureClusterRoleBinding(clusterRoleBindingName string, role string, serviceAccountNamespace string, serviceAccountName string) error

EnsureClusterRoleBinding ensures cluster role binding exists

func (*CommonOptions) EnsureClusterRoleExists Uses

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 Uses

func (o *CommonOptions) EnsureGitServiceCRD(server *auth.AuthServer) error

EnsureGitServiceCRD ensure that the GitService CRD is installed

func (*CommonOptions) EnsureHelm Uses

func (o *CommonOptions) EnsureHelm() error

EnsureHelm ensures helm is installed

func (*CommonOptions) EnsureServiceAccount Uses

func (o *CommonOptions) EnsureServiceAccount(ns string, serviceAccountName string) error

EnsureServiceAccount ensures service account exists in the given namespace

func (*CommonOptions) EnvironmentsDir Uses

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 Uses

func (o *CommonOptions) Expose(devNamespace, targetNamespace, password string) error

Expose runs expose controller in the given target namespace

func (*CommonOptions) FindAddonServer Uses

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 Uses

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 Uses

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 Uses

func (o *CommonOptions) FindEnvironmentNamespace(envName string) (string, error)

FindEnvironmentNamespace returns the namespace of a given environment

func (*CommonOptions) FindGitInfo Uses

func (o *CommonOptions) FindGitInfo(dir string) (*gits.GitRepository, error)

FindGitInfo parses the git information from the given directory

func (*CommonOptions) FindGitServer Uses

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 Uses

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

FindHelmChart finds the helm chart in the current dir

func (*CommonOptions) FindHelmChartInDir Uses

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 Uses

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 Uses

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 Uses

func (o *CommonOptions) FindService(name string) (string, error)

FindService finds the given service and returns its URL

func (*CommonOptions) FindServiceInNamespace Uses

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) GCloud Uses

func (o *CommonOptions) GCloud() gke.GClouder

GCloud returns the implementation of a gcloud helper

func (*CommonOptions) GenerateProwConfig Uses

func (o *CommonOptions) GenerateProwConfig(currentNamespace string, devEnv *v1.Environment) error

GenerateProwConfig regenerates the Prow configurations after we have created a SourceRepository

func (*CommonOptions) GetAddonAuth Uses

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 Uses

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 Uses

func (o *CommonOptions) GetAllPipelineJobNames(jenkinsClient gojenkins.JenkinsClient, jobNames *[]string, jobName string) error

GetAllPipelineJobNames returns all the pipeline job names

func (*CommonOptions) GetBranchName Uses

func (o *CommonOptions) GetBranchName(dir string) string

func (*CommonOptions) GetCloudProvider Uses

func (o *CommonOptions) GetCloudProvider(p string) (string, error)

GetCloudProvider returns the cloud provider

func (*CommonOptions) GetClusterDependencies Uses

func (o *CommonOptions) GetClusterDependencies(depsToInstall []string) []string

GetClusterDependencies returns the dependencies for a cloud provider

func (*CommonOptions) GetClusterUserName Uses

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

GetClusterUserName returns cluster and user name

func (*CommonOptions) GetCommandOutput Uses

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

GetCommandOutput evaluates the given command and returns the trimmed output Deprecated use util.Command

func (*CommonOptions) GetConfiguration Uses

func (o *CommonOptions) GetConfiguration(config interface{}) error

GetConfiguration read the config file marshal into a config struct

func (*CommonOptions) GetDefaultAdminPassword Uses

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

GetDefaultAdminPassword returns the default admin password from dev namespace

func (*CommonOptions) GetDeployNamespace Uses

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 Uses

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 Uses

func (o *CommonOptions) GetDockerRegistry(projectConfig *config.ProjectConfig) string

GetDockerRegistry parses the docker registry from various places

func (*CommonOptions) GetDockerRegistryOrg Uses

func (o *CommonOptions) GetDockerRegistryOrg(projectConfig *config.ProjectConfig, repository *gits.GitRepository) string

GetDockerRegistryOrg parses the docker registry organisation from various places

func (*CommonOptions) GetDomain Uses

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 Uses

func (o *CommonOptions) GetErr() io.Writer

GetErr returns the command error writer

func (*CommonOptions) GetFactory Uses

func (o *CommonOptions) GetFactory() clients.Factory

GetFactory lazily creates a Factory if its not already created

func (*CommonOptions) GetGKEClusterNameFromContext Uses

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

GetGKEClusterNameFromContext returns the GKE cluster name from current Kubernetes context

func (*CommonOptions) GetGoogleProjectID Uses

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 Uses

func (o *CommonOptions) GetGoogleRegion(projectId string) (string, error)

GetGoogleRegion returns the GCP region

func (*CommonOptions) GetGoogleRegionWithDefault Uses

func (o *CommonOptions) GetGoogleRegionWithDefault(projectId string, defaultRegion string) (string, error)

func (*CommonOptions) GetGoogleZone Uses

func (o *CommonOptions) GetGoogleZone(projectID string, defaultZone string) (string, error)

GetGoogleZone returns the GCP zone

func (*CommonOptions) GetGoogleZoneWithDefault Uses

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 Uses

func (o *CommonOptions) GetIn() terminal.FileReader

GetIn returns the command inputs writer

func (*CommonOptions) GetInstalledChartRepos Uses

func (o *CommonOptions) GetInstalledChartRepos(helmBinary string) (map[string]string, error)

GetInstalledChartRepos retruns the installed chart repositories

func (*CommonOptions) GetJenkinsJobName Uses

func (o *CommonOptions) GetJenkinsJobName() string

GetJenkinsJobName returns the Jenkins job name

func (*CommonOptions) GetJenkinsJobs Uses

func (o *CommonOptions) GetJenkinsJobs(jenkinsSelector *JenkinsSelectorOptions, filter string) (map[string]gojenkins.Job, error)

GetJenkinsJobs returns the existing Jenkins jobs

func (*CommonOptions) GetJenkinsURL Uses

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

getJenkinsURL return the Jenkins URL

func (*CommonOptions) GetLatestJXVersion Uses

func (o *CommonOptions) GetLatestJXVersion(resolver *versionstream.VersionResolver) (semver.Version, error)

GetLatestJXVersion returns latest jx version

func (*CommonOptions) GetLatestPipelineBuild Uses

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 Uses

func (o *CommonOptions) GetLatestPipelineBuildByCRD(pipeline string) (string, error)

GetLatestPipelineBuildByCRD returns the latest pipeline build

func (*CommonOptions) GetOrPickClusterName Uses

func (o *CommonOptions) GetOrPickClusterName(client cluster.Client, clusterName string) (string, error)

GetOrPickClusterName returns the selected cluster name or returns an error

func (*CommonOptions) GetOut Uses

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

GetOut returns the command output writer

func (*CommonOptions) GetPackageVersions Uses

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 Uses

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

GetPipelineGitAuth returns the pipeline git authentication credentials

func (*CommonOptions) GetPipelineName Uses

func (o *CommonOptions) GetPipelineName(gitInfo *gits.GitRepository, pipeline string, build string, appName string) (string, string)

GetPipelineName return the pipeline name

func (*CommonOptions) GetPluginCommandGroups Uses

func (o *CommonOptions) GetPluginCommandGroups(verifier extensions.PathVerifier) (templates.PluginCommandGroups, bool,
    error)

GetPluginCommandGroups returns the plugin groups

func (*CommonOptions) GetSecretURLClient Uses

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 Uses

func (o *CommonOptions) GetSecretsLocation() secrets.SecretsLocationKind

GetSecretsLocation returns the location of the secrets

func (*CommonOptions) GetUsername Uses

func (o *CommonOptions) GetUsername(userName string) (string, error)

GetUsername returns current user name

func (*CommonOptions) GetVersionNumber Uses

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 Uses

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 Uses

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

GetWebHookEndpoint returns the webhook endpoint

func (*CommonOptions) Git Uses

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

Git returns the git client

func (*CommonOptions) GitProviderForGitServerURL Uses

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

GitProviderForURL returns a GitProvider for the given Git server URL

func (*CommonOptions) GitProviderForURL Uses

func (o *CommonOptions) GitProviderForURL(gitURL string, message string) (gits.GitProvider, error)

GitProviderForURL returns a GitProvider for the given git URL

func (*CommonOptions) GitServerHostURLKind Uses

func (o *CommonOptions) GitServerHostURLKind(hostURL string) (string, error)

GitServerHostURLKind returns the kind of git server host URL

func (*CommonOptions) GitServerKind Uses

func (o *CommonOptions) GitServerKind(gitInfo *gits.GitRepository) (string, error)

GitServerKind returns the kind of the git server

func (*CommonOptions) Helm Uses

func (o *CommonOptions) Helm() helm.Helmer

Helm returns or creates the helm client

func (*CommonOptions) HelmInit Uses

func (o *CommonOptions) HelmInit(dir string) error

HelmInit initialises helm

func (*CommonOptions) HelmInitDependency Uses

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

HelmInitDependency initialises helm dependencies

func (*CommonOptions) HelmInitDependencyBuild Uses

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

HelmInitDependencyBuild initialises the dependencies an run the build

func (*CommonOptions) HelmInitRecursiveDependencyBuild Uses

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

HelmInitRecursiveDependencyBuild helm initialises the dependencies recursively

func (*CommonOptions) IgnoreModifyDevEnvironment Uses

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 Uses

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 Uses

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 Uses

func (o *CommonOptions) InCDPipeline() bool

InCDPipeline return true if the command execution takes place in the CD pipeline

func (*CommonOptions) InCluster Uses

func (o *CommonOptions) InCluster() bool

InCluster return true if the command execution takes place in k8s cluster

func (*CommonOptions) InitBuildPacks Uses

func (o *CommonOptions) InitBuildPacks(i *InvokeDraftPack) (string, *v1.TeamSettings, error)

InitBuildPacks initialise the build packs

func (*CommonOptions) InitGitConfigAndUser Uses

func (o *CommonOptions) InitGitConfigAndUser() error

InitGitConfigAndUser validates we have git setup

func (*CommonOptions) InitHelm Uses

func (o *CommonOptions) InitHelm(config InitHelmConfig) error

InitHelm initializes helm client and server (tiller)

func (*CommonOptions) InstallAzureCli Uses

func (o *CommonOptions) InstallAzureCli() error

InstallAzureCli installs azure cli

func (*CommonOptions) InstallBrew Uses

func (o *CommonOptions) InstallBrew() error

InstallBrew installs brew

func (*CommonOptions) InstallBrewIfRequired Uses

func (o *CommonOptions) InstallBrewIfRequired() error

InstallBrewIfRequired installs brew if required

func (*CommonOptions) InstallChartAt Uses

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 Uses

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 Uses

func (o *CommonOptions) InstallChartWithOptions(options helm.InstallChartOptions) error

InstallChartWithOptions uses the options to run helm install or helm upgrade

func (*CommonOptions) InstallChartWithOptionsAndTimeout Uses

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 Uses

func (o *CommonOptions) InstallGcloud() error

InstallGcloud installs gcloud cli

func (*CommonOptions) InstallGlooctl Uses

func (o *CommonOptions) InstallGlooctl() error

InstallGlooctl Installs glooctl tool

func (*CommonOptions) InstallHelm Uses

func (o *CommonOptions) InstallHelm() error

InstallHelm install helm cli

func (*CommonOptions) InstallHelm3 Uses

func (o *CommonOptions) InstallHelm3() error

InstallHelm3 installs helm3 cli

func (*CommonOptions) InstallJx Uses

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

InstallJx installs jx cli

func (*CommonOptions) InstallKustomize Uses

func (o *CommonOptions) InstallKustomize() error

InstallKustomize installs kustomize

func (*CommonOptions) InstallMinikube Uses

func (o *CommonOptions) InstallMinikube() error

InstallMinikube installs minikube

func (*CommonOptions) InstallMinishift Uses

func (o *CommonOptions) InstallMinishift() error

InstallMinishift installs minishift

func (*CommonOptions) InstallMissingDependencies Uses

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

InstallMissingDependencies installs missing dependencies

func (*CommonOptions) InstallOciCli Uses

func (o *CommonOptions) InstallOciCli() error

InstallOciCli installs oci cli

func (*CommonOptions) InstallProw Uses

func (o *CommonOptions) InstallProw(useTekton bool, useExternalDNS bool, isGitOps bool, gitOpsEnvDir string, gitUsername string, valuesFiles []string) error

InstallProw installs prow

func (*CommonOptions) InstallRequirements Uses

func (o *CommonOptions) InstallRequirements(cloudProvider string, extraDependencies ...string) error

InstallRequirements installs any requirements for the given provider kind

func (*CommonOptions) InstallTerraform Uses

func (o *CommonOptions) InstallTerraform() error

InstallTerraform installs terraform

func (*CommonOptions) InstallTiller Uses

func (o *CommonOptions) InstallTiller() error

InstallTiller installs tiller

func (*CommonOptions) InstallXhyve Uses

func (o *CommonOptions) InstallXhyve() error

InstallXhyve installs xhyve

func (*CommonOptions) Installhyperv Uses

func (o *CommonOptions) Installhyperv() error

Installhyperv installs hyperv

func (*CommonOptions) InvokeDraftPack Uses

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

InvokeDraftPack invokes a draft pack copying in a Jenkinsfile if required

func (*CommonOptions) IsConfigExplicitlySet Uses

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 Uses

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) IsProw Uses

func (o *CommonOptions) IsProw() (bool, error)

IsProw checks if prow is available in the cluster

func (*CommonOptions) IstioClient Uses

func (o *CommonOptions) IstioClient() (istioclient.Interface, error)

IstioClient creates a new Kubernetes client for Istio resources

func (*CommonOptions) JXClient Uses

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

JXClient returns or creates the jx client and current namespace

func (*CommonOptions) JXClientAndAdminNamespace Uses

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

JXClientAndAdminNamespace returns or creates the jx client and admin namespace

func (*CommonOptions) JXClientAndDevNamespace Uses

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

JXClientAndDevNamespace returns and creates the jx client and dev namespace

func (*CommonOptions) JXClientDevAndAdminNamespace Uses

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

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

func (*CommonOptions) JenkinsAuthConfigService Uses

func (o *CommonOptions) JenkinsAuthConfigService(client kubernetes.Interface, namespace string, selector *JenkinsSelectorOptions) (auth.ConfigService, error)

JenkinsAuthConfigService creates the jenkins auth config service

func (*CommonOptions) JenkinsClient Uses

func (o *CommonOptions) JenkinsClient() (gojenkins.JenkinsClient, error)

JenkinsClient returns the Jenkins client

func (*CommonOptions) KnativeBuildClient Uses

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

KnativeBuildClient returns or creates the knative build client

func (*CommonOptions) KnativeServeClient Uses

func (o *CommonOptions) KnativeServeClient() (kserve.Interface, string, error)

KnativeServeClient returns or creates the knative serve client

func (*CommonOptions) Kube Uses

func (o *CommonOptions) Kube() kube.Kuber

Kube returns the k8s config client

func (*CommonOptions) KubeClient Uses

func (o *CommonOptions) KubeClient() (kubernetes.Interface, error)

KubeClient returns or creates the kube client

func (*CommonOptions) KubeClientAndDevNamespace Uses

func (o *CommonOptions) KubeClientAndDevNamespace() (kubernetes.Interface, string, error)

KubeClientAndDevNamespace returns a kube client and the development namespace

func (*CommonOptions) KubeClientAndNamespace Uses

func (o *CommonOptions) KubeClientAndNamespace() (kubernetes.Interface, string, error)

KubeClientAndNamespace returns or creates the kube client and the current namespace

func (*CommonOptions) LoadPipelineSecrets Uses

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

LoadPipelineSecrets loads the pipeline secrets from kubernetes secrets

func (*CommonOptions) LoadQuickStartsFromLocations Uses

func (o *CommonOptions) LoadQuickStartsFromLocations(locations []v1.QuickStartLocation, config *auth.AuthConfig) (*quickstarts.QuickstartModel, error)

LoadQuickStartsFromLocations Load all quickstarts from the given locatiotns

func (*CommonOptions) LoadQuickStartsModel Uses

func (o *CommonOptions) LoadQuickStartsModel(gitHubOrganisations []string, ignoreTeam bool) (*quickstarts.QuickstartModel, error)

LoadQuickStartsModel Load all quickstarts

func (*CommonOptions) LogImportedProject Uses

func (o *CommonOptions) LogImportedProject(isEnvironment bool, gitInfo *gits.GitRepository)

LogImportedProject logs more details for an imported project

func (*CommonOptions) ModifyDevEnvironment Uses

func (o *CommonOptions) ModifyDevEnvironment(callback func(env *v1.Environment) error) error

ModifyDevEnvironment modifies the development environment settings

func (*CommonOptions) ModifyEnvironment Uses

func (o *CommonOptions) ModifyEnvironment(name string, callback func(env *v1.Environment) error) error

ModifyDevEnvironment modifies the development environment settings

func (*CommonOptions) ModifyHelmValuesFile Uses

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 Uses

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 Uses

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 Uses

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 Uses

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 Uses

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 Uses

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 Uses

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 Uses

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 Uses

func (o *CommonOptions) PickPipelineUserAuth(config *auth.AuthConfig, server *auth.AuthServer) (*auth.UserAuth, error)

PickPipelineUserAuth returns the user auth for pipeline user

func (*CommonOptions) RegisterEnvironmentCRD Uses

func (o *CommonOptions) RegisterEnvironmentCRD() error

RegisterEnvironmentCRD registers the CRD for environmnt

func (*CommonOptions) RegisterEnvironmentRoleBindingCRD Uses

func (o *CommonOptions) RegisterEnvironmentRoleBindingCRD() error

RegisterEnvironmentRoleBindingCRD register RegisterEnvironmentRoleBinding CRD

func (*CommonOptions) RegisterLocalHelmRepo Uses

func (o *CommonOptions) RegisterLocalHelmRepo(repoName, ns string) error

func (*CommonOptions) RegisterPipelineActivityCRD Uses

func (o *CommonOptions) RegisterPipelineActivityCRD() error

RegisterPipelineActivityCRD register PipelineActivity CRD

func (*CommonOptions) RegisterReleaseCRD Uses

func (o *CommonOptions) RegisterReleaseCRD() error

RegisterReleaseCRD register Release CRD

func (*CommonOptions) RegisterTeamCRD Uses

func (o *CommonOptions) RegisterTeamCRD() error

RegisterTeamCRD registers Team CRD

func (*CommonOptions) RegisterUserCRD Uses

func (o *CommonOptions) RegisterUserCRD() error

RegisterUserCRD registers user CRD

func (*CommonOptions) RegisterWorkflowCRD Uses

func (o *CommonOptions) RegisterWorkflowCRD() error

RegisterWorkflowCRD registers Workflow CRD

func (*CommonOptions) ReleaseChartMuseumUrl Uses

func (o *CommonOptions) ReleaseChartMuseumUrl() string

func (*CommonOptions) ResetClientsAndNamespaces Uses

func (o *CommonOptions) ResetClientsAndNamespaces()

ResetClientsAndNamespaces resets the current clients and namespaces

func (*CommonOptions) ResetSecretsLocation Uses

func (o *CommonOptions) ResetSecretsLocation() error

ResetSecretsLocation resets the secrets location

func (*CommonOptions) ResolveChartMuseumURL Uses

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 Uses

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

ResourcesInstaller returns the installer for Kubernetes resources

func (*CommonOptions) Retry Uses

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 Uses

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 Uses

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 Uses

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 Uses

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 Uses

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

RunCommand runs a given command command with arguments Deprecated use util.Command

func (*CommonOptions) RunCommandFromDir Uses

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 Uses

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

RunCommandInteractive run a given command interactively Deprecated use util.Command

func (*CommonOptions) RunCommandInteractiveInDir Uses

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 Uses

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 Uses

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 Uses

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 Uses

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 Uses

func (o *CommonOptions) SetAPIExtensionsClient(client apiextensionsclientset.Interface)

SetAPIExtensionsClient sets the api extensions client

func (*CommonOptions) SetBatchMode Uses

func (o *CommonOptions) SetBatchMode(batchMode bool)

SetBatchMode configures the batch mode

func (*CommonOptions) SetCurrentNamespace Uses

func (o *CommonOptions) SetCurrentNamespace(ns string)

func (*CommonOptions) SetDevNamespace Uses

func (o *CommonOptions) SetDevNamespace(ns string)

SetDevNamespace configures the current dev namespace

func (*CommonOptions) SetEnvironmentsDir Uses

func (o *CommonOptions) SetEnvironmentsDir(dir string)

SetEnvironmentsDir sets the environment directory

func (*CommonOptions) SetFactory Uses

func (o *CommonOptions) SetFactory(f clients.Factory)

SetFactory sets the factory to use

func (*CommonOptions) SetFakeGitProvider Uses

func (o *CommonOptions) SetFakeGitProvider(provider *gits.FakeProvider)

SetFakeGitProvider set the fake git provider for testing purposes

func (*CommonOptions) SetFakeKubeClient Uses

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 Uses

func (o *CommonOptions) SetGCloudClient(gcloudClient gke.GClouder)

SetGCloudClient set the gcloud client

func (*CommonOptions) SetGit Uses

func (o *CommonOptions) SetGit(git gits.Gitter)

SetGit sets the git client

func (*CommonOptions) SetHelm Uses

func (o *CommonOptions) SetHelm(helmer helm.Helmer)

SetHelm sets the helmer used for this object

func (*CommonOptions) SetJenkinsClient Uses

func (o *CommonOptions) SetJenkinsClient(jenkinsClient gojenkins.JenkinsClient)

SetJenkinsClient sets the JenkinsClient - usually used in testing

func (*CommonOptions) SetJxClient Uses

func (o *CommonOptions) SetJxClient(jxClient versioned.Interface)

SetJxClient set the jx client

func (*CommonOptions) SetKnativeServeClient Uses

func (o *CommonOptions) SetKnativeServeClient(client kserve.Interface)

SetKnativeServeClient sets the kantive serve client

func (*CommonOptions) SetKube Uses

func (o *CommonOptions) SetKube(kuber kube.Kuber)

SetKube sets the kube config client

func (*CommonOptions) SetKubeClient Uses

func (o *CommonOptions) SetKubeClient(kubeClient kubernetes.Interface)

SetKubeClient sets the kube client

func (*CommonOptions) SetResourcesInstaller Uses

func (o *CommonOptions) SetResourcesInstaller(installer resources.Installer)

SetResourcesInstaller configures the installer for Kubernetes resources

func (*CommonOptions) SetSecretURLClient Uses

func (o *CommonOptions) SetSecretURLClient(client secreturl.Client)

SetSecretURLClient sets the Secret URL Client

func (*CommonOptions) SetSecretsLocation Uses

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

SetSecretsLocation sets the secrets location

func (*CommonOptions) SetVersionResolver Uses

func (o *CommonOptions) SetVersionResolver(resolver *versionstream.VersionResolver)

SetVersionResolver gets a VersionResolver, lazy creating one if required

func (*CommonOptions) SystemVaultClient Uses

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

SystemVaultClient return or creates the system vault client

func (*CommonOptions) TailJenkinsBuildLog Uses

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 Uses

func (o *CommonOptions) TailLogs(ns string, pod string, containerName string) error

TailLogs returns the logs from a given pod

func (*CommonOptions) TeamAndEnvironmentNames Uses

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

TeamAndEnvironmentNames returns team and environment namespace

func (*CommonOptions) TeamBranchPatterns Uses

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 Uses

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 Uses

func (o *CommonOptions) TeamSettings() (*v1.TeamSettings, error)

TeamSettings returns the team settings

func (*CommonOptions) TektonClient Uses

func (o *CommonOptions) TektonClient() (tektonclient.Interface, string, error)

TektonClient lazily creates a new Knative Pipeline client

func (*CommonOptions) UpdateJenkinsURL Uses

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

UpdateJenkinsURL updates the Jenkins URL

func (*CommonOptions) UpdatePipelineGitCredentialsSecret Uses

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 Uses

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

VaultClient returns or creates the vault client

func (*CommonOptions) VaultOperatorClient Uses

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

VaultOperatorClient returns or creates the vault operator client

func (*CommonOptions) WaitForReadyKnativeBuildPod Uses

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 Uses

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 Uses

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 Uses

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 Uses

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 Uses

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 Uses

func (cb *CreateBucketValues) IsEmpty() bool

IsEmpty returns true if there is no bucket name specified

type FatalError Uses

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 Uses

func (err *FatalError) Error() string

Error converts a fatal error into a string

type GKEClusterOptions Uses

type GKEClusterOptions struct {
    Project string
    Region  string
}

GKEClusterOptions GKE specific configurations

type InitHelmConfig Uses

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

InitHelmConfig configuration for helm initialization

type InvokeDraftPack Uses

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 Uses

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 Uses

func (o *JenkinsSelectorOptions) AddFlags(cmd *cobra.Command)

AddFlags add the command flags for picking a custom Jenkins App to work with

func (*JenkinsSelectorOptions) IsCustom Uses

func (o *JenkinsSelectorOptions) IsCustom() bool

IsCustom returns true if a custom Jenkins App is specified

type LogLevel Uses

type LogLevel string

LogLevel represents the logging level when reporting feedback

type ModifyDevEnvironmentFn Uses

type ModifyDevEnvironmentFn func(callback func(env *jenkinsv1.Environment) error) error

ModifyDevEnvironmentFn a callback to create/update the development Environment

type ModifyEnvironmentFn Uses

type ModifyEnvironmentFn func(name string, callback func(env *jenkinsv1.Environment) error) error

ModifyEnvironmentFn a callback to create/update an Environment

type PullRequestDetails Uses

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 Uses

type ServerFlags struct {
    ServerName string
    ServerURL  string
}

func (*ServerFlags) AddGitServerFlags Uses

func (o *ServerFlags) AddGitServerFlags(cmd *cobra.Command)

AddGitServerFlags add git server flags to the given cobra command

func (*ServerFlags) IsEmpty Uses

func (f *ServerFlags) IsEmpty() bool

IsEmpty returns true if the server flags and server URL are tempry

Directories

PathSynopsis
step
upgrade

Package opts imports 111 packages (graph) and is imported by 54 packages. Updated 2019-09-12. Refresh now. Tools for package owners.