config

package
v0.0.105 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

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

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

type PreviewEnvironmentConfig

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

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"`
	PipelineConfig      *jenkinsfile.PipelineConfig `json:"pipelineConfig,omitempty"`
	NoReleasePrepare    bool                        `json:"noReleasePrepare,omitempty"`
	DockerRegistryHost  string                      `json:"dockerRegistryHost,omitempty"`
	DockerRegistryOwner string                      `json:"dockerRegistryOwner,omitempty"`
}

ProjectConfig defines Jenkins X Pipelines usually stored inside the `jenkins-x.yml` file in projects

func LoadProjectConfig

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

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

func LoadProjectConfigFile

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

LoadProjectConfigFile loads a specific project YAML configuration file

func (*ProjectConfig) GetOrCreatePipelineConfig

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

GetOrCreatePipelineConfig lazily creates a PipelineConfig if required

func (*ProjectConfig) GetPipeline

func (c *ProjectConfig) GetPipeline(kind string) (*syntax.ParsedPipeline, error)

GetPipeline retrieves the parsed pipeline for the specified type

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