config

package
v2.7.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const FallbackDockerRegistry = "https://docker-registry.aurora.sits.no:5000"

Variables

This section is empty.

Functions

This section is empty.

Types

type ApplicationSpec

type ApplicationSpec struct {
	MavenGav      MavenGav
	BaseImageSpec DockerBaseImageSpec
}

type ApplicationType

type ApplicationType string
const (
	JavaLeveransepakke   ApplicationType = "JavaLeveransepakke"
	NodeJsLeveransepakke ApplicationType = "NodeJsLeveranse"
	DoozerLeveranse      ApplicationType = "DoozerLeveranse"
	NodeJs                               = "NODEJS"
	Doozer                               = "DOOZER"
)

type BinaryBuildType

type BinaryBuildType string
const (
	Snapshot BinaryBuildType = "Snapshot"
	Release  BinaryBuildType = "Release"
)

type BuilderSpec

type BuilderSpec struct {
	Version string
}

type Classifier

type Classifier string
const (
	Leveransepakke       Classifier = "Leveransepakke"
	Webleveransepakke    Classifier = "Webleveransepakke"
	Doozerleveransepakke Classifier = "Doozerleveransepakke"
)

type CmdConfigReader

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

func (*CmdConfigReader) ReadConfig

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

type Config

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

type ConfigReader

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

func NewCmdConfigReader

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

func NewFileConfigReader

func NewFileConfigReader(filepath string) ConfigReader

func NewInClusterConfigReader

func NewInClusterConfigReader() ConfigReader

type DockerBaseImageSpec

type DockerBaseImageSpec struct {
	BaseImage   string
	BaseVersion string
}

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
}

func (DockerSpec) GetExternalRegistryWithoutProtocol

func (m DockerSpec) GetExternalRegistryWithoutProtocol() string

Get external registry url without protocol

func (DockerSpec) GetInternalPullRegistryWithoutProtocol

func (m DockerSpec) GetInternalPullRegistryWithoutProtocol() string

Get internal registry url without protocol

type FileConfigReader

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

func (*FileConfigReader) ReadConfig

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

type InClusterConfigReader

type InClusterConfigReader struct {
}

func (*InClusterConfigReader) ReadConfig

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

type MavenGav

type MavenGav struct {
	ArtifactId string
	GroupId    string
	Version    string
	Classifier Classifier
	Type       PackageType
}

GAV parametersclear

func (*MavenGav) IsSnapshot

func (m *MavenGav) IsSnapshot() bool

Check if GAV is snapshot

func (*MavenGav) Name

func (m *MavenGav) Name() string

Get name

type NexusAccess

type NexusAccess struct {
	Username string
	Password string
	NexusURL string
}

func ReadNexusAccessFromEnvVars

func ReadNexusAccessFromEnvVars() (*NexusAccess, error)

func ReadNexusConfigFromFileSystem

func ReadNexusConfigFromFileSystem() (*NexusAccess, error)

func (NexusAccess) IsValid

func (n NexusAccess) IsValid() bool

func (NexusAccess) String

func (n NexusAccess) String() string

type PackageType

type PackageType string
const (
	ZipPackaging PackageType = "zip"
	TgzPackaging PackageType = "tgz"
)

type PushExtraTags

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

func ParseExtraTags

func ParseExtraTags(i string) PushExtraTags

Parse extra tags

func (*PushExtraTags) ToStringValue

func (m *PushExtraTags) ToStringValue() string

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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