config

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: 14 Imported by: 25

Documentation

Index

Constants

View Source
const (
	// ProjectConfigFileName is the name of the project configuration file
	ProjectConfigFileName = "jenkins-x.yml"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AddonConfig

type AddonConfig struct {
	Name    string `json:"name,omitempty"`
	Version string `json:"version,omitempty"`
}

type AdminSecretsConfig

type AdminSecretsConfig struct {
	IngressBasicAuth string           `json:"JXBasicAuth,omitempty"`
	ChartMuseum      *ChartMuseum     `json:"chartmuseum,omitempty"`
	Grafana          *Grafana         `json:"grafana,omitempty"`
	Jenkins          *Jenkins         `json:"jenkins,omitempty"`
	Nexus            *Nexus           `json:"nexus,omitempty"`
	PipelineSecrets  *PipelineSecrets `json:"PipelineSecrets,omitempty"`
	KanikoSecret     *KanikoSecret    `json:"KanikoSecret,omitempty"`
}

type AdminSecretsFlags

type AdminSecretsFlags struct {
	DefaultAdminUsername string
	DefaultAdminPassword string
	KanikoSecret         string
}

type AdminSecretsService

type AdminSecretsService struct {
	FileName string
	Secrets  AdminSecretsConfig
	Flags    AdminSecretsFlags
	// contains filtered or unexported fields
}

func (*AdminSecretsService) AddAdminSecretsValues

func (s *AdminSecretsService) AddAdminSecretsValues(cmd *cobra.Command)

func (*AdminSecretsService) ChartMuseumAuth

func (s *AdminSecretsService) ChartMuseumAuth() BasicAuth

ChartMuseumAuth returns the current credentials for ChartMuseum

func (*AdminSecretsService) GrafanaAuth

func (s *AdminSecretsService) GrafanaAuth() BasicAuth

GrafanaAuth returns the current credentials for Grafana

func (*AdminSecretsService) IngressAuth

func (s *AdminSecretsService) IngressAuth() BasicAuth

IngressAuth returns the current basic auth credentials for Ingress

func (*AdminSecretsService) JenkinsAuth

func (s *AdminSecretsService) JenkinsAuth() BasicAuth

JenkinsAuth returns the current basic auth credentials for Jenkins

func (*AdminSecretsService) NewAdminSecretsConfig

func (s *AdminSecretsService) NewAdminSecretsConfig() error

func (*AdminSecretsService) NewAdminSecretsConfigFromSecret

func (s *AdminSecretsService) NewAdminSecretsConfigFromSecret(decryptedSecretsFile string) error

func (*AdminSecretsService) NewMavenSettingsXML

func (s *AdminSecretsService) NewMavenSettingsXML() error

NewMavenSettingsXML generates the maven settings

func (*AdminSecretsService) NexusAuth

func (s *AdminSecretsService) NexusAuth() BasicAuth

NexusAuth returns the current credentials for Nexus

type BasicAuth

type BasicAuth struct {
	// Username stores the basic authentication user name
	Username string `json:"username"`
	// Password stores the basic authentication password
	Password string `json:"password"`
}

BasicAuth keeps the credentials for basic authentication

type BranchBuild

type BranchBuild struct {
	Build Build `json:"build,omitempty"`

	// which kind of pipeline - like release, pullRequest, feature
	Kind string `json:"kind,omitempty"`

	// display name
	Name string `json:"name,omitempty"`

	// List of sources to populate environment variables in all the steps if there is not already
	// an environment variable defined on that step
	EnvFrom []corev1.EnvFromSource `json:"envFrom,omitempty"`

	// List of environment variables to add to each step if there is not already a environment variable of that name
	Env []corev1.EnvVar `json:"env,omitempty"`

	ExcludePodTemplateEnv     bool `json:"excludePodTemplateEnv,omitempty"`
	ExcludePodTemplateVolumes bool `json:"excludePodTemplateVolumes,omitempty"`
}

type Build

type Build struct {
	// Steps are the steps of the build; each step is run sequentially with the
	// source mounted into /workspace.
	Steps []corev1.Container `json:"steps,omitempty"`

	// Volumes is a collection of volumes that are available to mount into the
	// steps of the build.
	Volumes []corev1.Volume `json:"volumes,omitempty"`

	// The name of the service account as which to run this build.
	ServiceAccountName string `json:"serviceAccountName,omitempty"`

	// NodeSelector is a selector which must be true for the pod to fit on a node.
	// Selector which must match a node's labels for the pod to be scheduled on that node.
	// More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/
	// +optional
	NodeSelector map[string]string `json:"nodeSelector,omitempty"`
}

type ChartMuseum

type ChartMuseum struct {
	ChartMuseumEnv ChartMuseumEnv `json:"env"`
}

type ChartMuseumEnv

type ChartMuseumEnv struct {
	ChartMuseumSecret ChartMuseumSecret `json:"secret"`
}

type ChartMuseumSecret

type ChartMuseumSecret struct {
	User     string `json:"BASIC_AUTH_USER"`
	Password string `json:"BASIC_AUTH_PASS"`
}

type ChatConfig

type ChatConfig struct {
	Kind             string `json:"kind,omitempty"`
	URL              string `json:"url,omitempty"`
	DeveloperChannel string `json:"developerChannel,omitempty"`
	UserChannel      string `json:"userChannel,omitempty"`
}

type ControllerBuildConfig

type ControllerBuildConfig struct {
	Enabled *bool `json:"enabled,omitempty"`
}

ControllerBuildConfig to configure the build controller

type ExposeController

type ExposeController struct {
	Config      ExposeControllerConfig `json:"config,omitempty"`
	Annotations map[string]string      `json:"Annotations,omitempty"`
}

type ExposeControllerConfig

type ExposeControllerConfig struct {
	Domain      string `json:"domain,omitempty"`
	Exposer     string `json:"exposer,omitempty"`
	HTTP        string `json:"http,omitempty"`
	TLSAcme     string `json:"tlsacme,omitempty"`
	PathMode    string `json:"pathMode,omitempty"`
	UrlTemplate string `json:"urltemplate,omitempty"`
}

type Grafana

type Grafana struct {
	GrafanaSecret GrafanaSecret `json:"server"`
}

type GrafanaSecret

type GrafanaSecret struct {
	User     string `json:"adminUser"`
	Password string `json:"adminPassword"`
}

type HelmValuesConfig

type HelmValuesConfig struct {
	ExposeController *ExposeController                  `json:"expose,omitempty"`
	Jenkins          JenkinsValuesConfig                `json:"jenkins,omitempty"`
	Prow             ProwValuesConfig                   `json:"prow,omitempty"`
	PipelineSecrets  JenkinsPipelineSecretsValuesConfig `json:"PipelineSecrets,omitempty"`
	ControllerBuild  ControllerBuildConfig              `json:"controllerbuild,omitempty"`
	DockerRegistry   string                             `json:"dockerRegistry,omitempty"`
}

func (*HelmValuesConfig) AddExposeControllerValues

func (c *HelmValuesConfig) AddExposeControllerValues(cmd *cobra.Command, ignoreDomain bool)

func (HelmValuesConfig) String

func (c HelmValuesConfig) String() (string, error)

type HelmValuesConfigService

type HelmValuesConfigService struct {
	FileName string
	Config   HelmValuesConfig
}

type Image

type Image struct {
	Repository string `json:"repository,omitempty"`
	Tag        string `json:"tag,omitempty"`
}

type IssueTrackerConfig

type IssueTrackerConfig struct {
	Kind    string `json:"kind,omitempty"`
	URL     string `json:"url,omitempty"`
	Project string `json:"project,omitempty"`
}

type Jenkins

type Jenkins struct {
	JenkinsSecret JenkinsAdminSecret `json:"Master"`
}

type JenkinsAdminSecret

type JenkinsAdminSecret struct {
	Password string `json:"AdminPassword"`
}

type JenkinsGiteaServersValuesConfig

type JenkinsGiteaServersValuesConfig struct {
	Name       string `json:"Name,omitempty"`
	Url        string `json:"Url,omitempty"`
	Credential string `json:"Credential,omitempty"`
}

type JenkinsGithubServersValuesConfig

type JenkinsGithubServersValuesConfig struct {
	Name string `json:"Name,omitempty"`
	Url  string `json:"Url,omitempty"`
}

type JenkinsPipelineSecretsValuesConfig

type JenkinsPipelineSecretsValuesConfig struct {
	DockerConfig string `json:"DockerConfig,flow,omitempty"`
}

type JenkinsServersGlobalConfig

type JenkinsServersGlobalConfig struct {
	EnvVars map[string]string `json:"EnvVars,omitempty"`
}

type JenkinsServersValuesConfig

type JenkinsServersValuesConfig struct {
	Gitea  []JenkinsGiteaServersValuesConfig  `json:"Gitea,omitempty"`
	GHE    []JenkinsGithubServersValuesConfig `json:"GHE,omitempty"`
	Global JenkinsServersGlobalConfig         `json:"Global,omitempty"`
}

func (*JenkinsServersValuesConfig) GetOrCreateFirstGitea

func (c *JenkinsServersValuesConfig) GetOrCreateFirstGitea() *JenkinsGiteaServersValuesConfig

GetOrCreateFirstGitea returns the first gitea server creating one if required

type JenkinsValuesConfig

type JenkinsValuesConfig struct {
	Servers JenkinsServersValuesConfig `json:"Servers,omitempty"`
	Enabled *bool                      `json:"enabled,omitempty"`
}

type KanikoSecret added in v1.3.840

type KanikoSecret struct {
	Data string `json:"Data,omitempty"`
}

KanikoSecret store the kaniko service account

type Nexus

type Nexus struct {
	DefaultAdminPassword string `json:"defaultAdminPassword,omitempty"`
}

type PipelineSecrets

type PipelineSecrets struct {
	MavenSettingsXML string `json:"MavenSettingsXML,omitempty"`
}

type Preview

type Preview struct {
	Image *Image `json:"image,omitempty"`
}

type PreviewEnvironmentConfig

type PreviewEnvironmentConfig struct {
	Disabled         bool `json:"disabled,omitempty"`
	MaximumInstances int  `json:"maximumInstances,omitempty"`
}

type PreviewValuesConfig

type PreviewValuesConfig struct {
	ExposeController *ExposeController `json:"expose,omitempty"`
	Preview          *Preview          `json:"preview,omitempty"`
}

func (PreviewValuesConfig) String

func (c PreviewValuesConfig) String() (string, error)

type ProjectConfig

type ProjectConfig struct {
	// List of global environment variables to add to each branch build and each step
	Env []corev1.EnvVar `json:"env,omitempty"`

	PreviewEnvironments *PreviewEnvironmentConfig   `json:"previewEnvironments,omitempty"`
	IssueTracker        *IssueTrackerConfig         `json:"issueTracker,omitempty"`
	Chat                *ChatConfig                 `json:"chat,omitempty"`
	Wiki                *WikiConfig                 `json:"wiki,omitempty"`
	Addons              []*AddonConfig              `json:"addons,omitempty"`
	BuildPack           string                      `json:"buildPack,omitempty"`
	BuildPackGitURL     string                      `json:"buildPackGitURL,omitempty"`
	BuildPackGitURef    string                      `json:"buildPackGitRef,omitempty"`
	Workflow            string                      `json:"workflow,omitempty"`
	PipelineConfig      *jenkinsfile.PipelineConfig `json:"pipelineConfig,omitempty"`
	NoReleasePrepare    bool                        `json:"noReleasePrepare,omitempty"`
}

func LoadProjectConfig

func LoadProjectConfig(projectDir string) (*ProjectConfig, string, error)

LoadProjectConfig loads the project configuration if there is a project configuration file

func LoadProjectConfigFile added in v1.3.886

func LoadProjectConfigFile(fileName string) (*ProjectConfig, error)

LoadProjectConfigFile loads a specific project YAML configuration file

func (*ProjectConfig) GetOrCreatePipelineConfig added in v1.3.1056

func (c *ProjectConfig) GetOrCreatePipelineConfig() *jenkinsfile.PipelineConfig

GetOrCreatePipelineConfig lazily creates a PipelineConfig if required

func (*ProjectConfig) IsEmpty

func (c *ProjectConfig) IsEmpty() bool

IsEmpty returns true if this configuration is empty

func (*ProjectConfig) SaveConfig

func (c *ProjectConfig) SaveConfig(fileName string) error

SaveConfig saves the configuration file to the given project directory

type ProwValuesConfig

type ProwValuesConfig struct {
	User       string `json:"user,omitempty"`
	HMACtoken  string `json:"hmacToken,omitempty"`
	OAUTHtoken string `json:"oauthToken,omitempty"`
}

type WikiConfig

type WikiConfig struct {
	Kind  string `json:"kind,omitempty"`
	URL   string `json:"url,omitempty"`
	Space string `json:"space,omitempty"`
}

Jump to

Keyboard shortcuts

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