config

package
v2.7.18 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2022 License: LGPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// JavaLeveransepakke ApplicationType
	JavaLeveransepakke ApplicationType = "JavaLeveransepakke"
	// NodeJsLeveransepakke ApplicationType
	NodeJsLeveransepakke ApplicationType = "NodeJsLeveranse"
	// DoozerLeveranse      ApplicationType
	DoozerLeveranse ApplicationType = "DoozerLeveranse"
	// NodeJs string
	NodeJs string = "NODEJS"
	// Doozer string
	Doozer string = "DOOZER"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ApplicationSpec

type ApplicationSpec struct {
	MavenGav      MavenGav
	BaseImageSpec DockerBaseImageSpec
}

ApplicationSpec config

type ApplicationType

type ApplicationType string

ApplicationType type string

type BinaryBuildType

type BinaryBuildType string

BinaryBuildType type string

const (
	// Snapshot BinaryBuildType
	Snapshot BinaryBuildType = "Snapshot"
)

type BuilderSpec

type BuilderSpec struct {
	Version string
}

BuilderSpec config

type Classifier

type Classifier string

Classifier string

const (
	// Leveransepakke Classifier
	Leveransepakke Classifier = "Leveransepakke"
	// Webleveransepakke Classifier
	Webleveransepakke Classifier = "Webleveransepakke"
	// Doozerleveransepakke Classifier
	Doozerleveransepakke Classifier = "Doozerleveransepakke"
)

type CmdConfigReader

type CmdConfigReader struct {
	NoPush bool
	Cmd    *cobra.Command
	Args   []string
}

CmdConfigReader reads build configuration from commandline parameters

func (*CmdConfigReader) ReadConfig

func (m *CmdConfigReader) ReadConfig() (*Config, error)

ReadConfig from commandline parameters

type Config

type Config struct {
	ApplicationType    ApplicationType
	ApplicationSpec    ApplicationSpec
	DockerSpec         DockerSpec
	BuilderSpec        BuilderSpec
	BinaryBuild        bool
	LocalBuild         bool
	TLSVerify          bool
	BuildTimeout       time.Duration
	NoPush             bool
	Sporingstjeneste   string
	OwnerReferenceUUID string
	BinaryBuildType    BinaryBuildType
	NexusIQReportURL   string
}

Config contains the build config

type DockerBaseImageSpec

type DockerBaseImageSpec struct {
	BaseImage   string
	BaseVersion string
}

DockerBaseImageSpec config

type DockerSpec

type DockerSpec struct {
	OutputRegistry       string
	OutputRepository     string
	InternalPullRegistry string
	PushExtraTags        PushExtraTags
	//This is the external docker registry where we check versions.
	ExternalDockerRegistry string
	//The tag to push to. This is only used for ImageStreamTags (as for now) and RETAG functionality
	TagWith   string
	RetagWith string
}

DockerSpec config

func (DockerSpec) GetExternalRegistryWithoutProtocol

func (m DockerSpec) GetExternalRegistryWithoutProtocol() string

GetExternalRegistryWithoutProtocol Get external registry url without protocol

func (DockerSpec) GetInternalPullRegistryWithoutProtocol

func (m DockerSpec) GetInternalPullRegistryWithoutProtocol() string

GetInternalPullRegistryWithoutProtocol Get internal registry url without protocol

type FileConfigReader

type FileConfigReader struct {
	// contains filtered or unexported fields
}

FileConfigReader reads build configuration from file

func (*FileConfigReader) ReadConfig

func (m *FileConfigReader) ReadConfig() (*Config, error)

ReadConfig from file

type InClusterConfigReader

type InClusterConfigReader struct {
}

InClusterConfigReader reads build configuration from the builder pod

func (*InClusterConfigReader) ReadConfig

func (m *InClusterConfigReader) ReadConfig() (*Config, error)

ReadConfig from the buildConfig

type MavenGav

type MavenGav struct {
	ArtifactID string
	GroupID    string
	Version    string
	Classifier Classifier
	Type       PackageType
}

MavenGav GAV parameters

func (*MavenGav) IsSnapshot

func (m *MavenGav) IsSnapshot() bool

IsSnapshot Check if GAV is snapshot

func (*MavenGav) Name

func (m *MavenGav) Name() string

Name Get name

type NexusAccess

type NexusAccess struct {
	Username string
	Password string
	NexusURL string
}

NexusAccess nexus url and nexus credentials

func ReadNexusAccessFromEnvVars

func ReadNexusAccessFromEnvVars() (*NexusAccess, error)

ReadNexusAccessFromEnvVars read nexusUrl, nesusUser, and nexusPassword from env variables and return NexusAccess

func ReadNexusConfigFromFileSystem

func ReadNexusConfigFromFileSystem() (*NexusAccess, error)

ReadNexusConfigFromFileSystem read nexusUrl, nexusUser, and nexusPassword from file and return NexusAccess

func (NexusAccess) IsValid

func (n NexusAccess) IsValid() bool

IsValid check username, password and url is set

func (NexusAccess) String

func (n NexusAccess) String() string

String return as string

type PackageType

type PackageType string

PackageType type string

const (
	// ZipPackaging PackageType
	ZipPackaging PackageType = "zip"
	// TgzPackaging PackageType
	TgzPackaging PackageType = "tgz"
)

type PushExtraTags

type PushExtraTags struct {
	Latest bool
	Major  bool
	Minor  bool
	Patch  bool
}

PushExtraTags config

func ParseExtraTags

func ParseExtraTags(i string) PushExtraTags

ParseExtraTags parse extra tags

func (*PushExtraTags) ToStringValue

func (m *PushExtraTags) ToStringValue() string

ToStringValue Generates the tags given the appversion and extra tag configuration. Don't do any filtering

type Reader added in v2.7.12

type Reader interface {
	ReadConfig() (*Config, error)
}

Reader interface that provides the ReadConfig method

func NewCmdConfigReader

func NewCmdConfigReader(cmd *cobra.Command, args []string, noPush bool) Reader

NewCmdConfigReader returns a Reader of type CmdConfigReader

func NewFileConfigReader

func NewFileConfigReader(filepath string) Reader

NewFileConfigReader returns a Reader of type FileConfigReader

func NewInClusterConfigReader

func NewInClusterConfigReader() Reader

NewInClusterConfigReader returns a Reader of type InClusterConfigReader

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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