Documentation ¶
Index ¶
- type BoolPtr
- type Builder
- type DefaultStepImplementation
- func (step *DefaultStepImplementation) ErrorMsg(err error) string
- func (step *DefaultStepImplementation) GetAppName() string
- func (step *DefaultStepImplementation) GetKubeclient() kubernetes.Interface
- func (step *DefaultStepImplementation) GetKubeutil() *kube.Kube
- func (step *DefaultStepImplementation) GetPrometheusOperatorClient() monitoring.Interface
- func (step *DefaultStepImplementation) GetRadixclient() radixclient.Interface
- func (step *DefaultStepImplementation) GetRegistration() *v1.RadixRegistration
- func (step *DefaultStepImplementation) ImplementationForType() pipeline.StepType
- func (step *DefaultStepImplementation) Init(ctx context.Context, kubeclient kubernetes.Interface, ...)
- func (step *DefaultStepImplementation) Run(_ context.Context, pipelineInfo *PipelineInfo) error
- func (step *DefaultStepImplementation) SucceededMsg() string
- type EnvironmentSubPipelineToRun
- type EnvironmentToBuild
- type PipelineArguments
- type PipelineInfo
- func (info *PipelineInfo) IsPipelineType(pipelineType radixv1.RadixPipelineType) bool
- func (info *PipelineInfo) IsUsingBuildKit() bool
- func (info *PipelineInfo) SetApplicationConfig(applicationConfig *application.ApplicationConfig)
- func (info *PipelineInfo) SetGitAttributes(gitCommitHash, gitTags string)
- type PrepareBuildContext
- type Step
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BoolPtr ¶ added in v1.57.18
type BoolPtr struct {
// contains filtered or unexported fields
}
BoolPtr Nillable bool type
type Builder ¶ added in v1.41.9
type Builder struct { ResourcesLimitsMemory string ResourcesRequestsCPU string ResourcesRequestsMemory string }
Builder Holds info about the builder arguments
type DefaultStepImplementation ¶
type DefaultStepImplementation struct { StepType pipeline.StepType ErrorMessage string SuccessMessage string Error error // contains filtered or unexported fields }
DefaultStepImplementation Struct to hold the data common to all step implementations
func (*DefaultStepImplementation) ErrorMsg ¶
func (step *DefaultStepImplementation) ErrorMsg(err error) string
ErrorMsg Default implementation
func (*DefaultStepImplementation) GetAppName ¶
func (step *DefaultStepImplementation) GetAppName() string
GetAppName Default implementation
func (*DefaultStepImplementation) GetKubeclient ¶
func (step *DefaultStepImplementation) GetKubeclient() kubernetes.Interface
GetKubeclient Default implementation
func (*DefaultStepImplementation) GetKubeutil ¶
func (step *DefaultStepImplementation) GetKubeutil() *kube.Kube
GetKubeutil Default implementation
func (*DefaultStepImplementation) GetPrometheusOperatorClient ¶
func (step *DefaultStepImplementation) GetPrometheusOperatorClient() monitoring.Interface
GetPrometheusOperatorClient Default implementation
func (*DefaultStepImplementation) GetRadixclient ¶
func (step *DefaultStepImplementation) GetRadixclient() radixclient.Interface
GetRadixclient Default implementation
func (*DefaultStepImplementation) GetRegistration ¶
func (step *DefaultStepImplementation) GetRegistration() *v1.RadixRegistration
GetRegistration Default implementation
func (*DefaultStepImplementation) ImplementationForType ¶
func (step *DefaultStepImplementation) ImplementationForType() pipeline.StepType
ImplementationForType Default implementation
func (*DefaultStepImplementation) Init ¶
func (step *DefaultStepImplementation) Init(ctx context.Context, kubeclient kubernetes.Interface, radixclient radixclient.Interface, kubeutil *kube.Kube, prometheusOperatorClient monitoring.Interface, rr *v1.RadixRegistration)
Init Initialize step
func (*DefaultStepImplementation) Run ¶
func (step *DefaultStepImplementation) Run(_ context.Context, pipelineInfo *PipelineInfo) error
Run Default implementation
func (*DefaultStepImplementation) SucceededMsg ¶
func (step *DefaultStepImplementation) SucceededMsg() string
SucceededMsg Default implementation
type EnvironmentSubPipelineToRun ¶ added in v1.30.0
type EnvironmentSubPipelineToRun struct { // Environment name Environment string // PipelineFile Name of a sub-pipeline file, which need to be run PipelineFile string }
EnvironmentSubPipelineToRun An application environment sub-pipeline to be run
type EnvironmentToBuild ¶ added in v1.30.0
type EnvironmentToBuild struct { // Environment name Environment string // Components Names of components, which need to be built Components []string }
EnvironmentToBuild An application environment to be built
type PipelineArguments ¶
type PipelineArguments struct { PipelineType string JobName string Branch string // CommitID is sent from GitHub webhook. not to be confused with PipelineInfo.GitCommitHash CommitID string ImageTag string UseCache bool // OverrideUseBuildCache override default or configured build cache option OverrideUseBuildCache *bool PushImage bool DeploymentName string FromEnvironment string ToEnvironment string ComponentsToDeploy []string RadixConfigFile string // Images used for copying radix config/building TektonPipeline string // ImageBuilder Points to the image builder ImageBuilder string // BuildKitImageBuilder Points to the BuildKit compliant image builder BuildKitImageBuilder string // GitCloneNsLookupImage defines image containing nslookup. // Used as option to the CloneInitContainers function. GitCloneNsLookupImage string // GitCloneGitImage defines image containing git cli. // Must support running as user 65534. // Used as option to the CloneInitContainers function. GitCloneGitImage string // GitCloneBashImage defines image with bash. // Used as option to the CloneInitContainers function. GitCloneBashImage string // SeccompProfileFileName Filename of the seccomp profile injected by daemonset, relative to the /var/lib/kubelet/seccomp directory on node SeccompProfileFileName string // Used for tagging meta-information Clustertype string // RadixZone The radix zone. RadixZone string // Clustername The name of the cluster Clustername string // ContainerRegistry The name of the container registry ContainerRegistry string // AppContainerRegistry the name of the app container registry AppContainerRegistry string // SubscriptionId Azure subscription ID SubscriptionId string // Used to indicate debugging session Debug bool // Image tag names for components: component-name:image-tag ImageTagNames map[string]string LogLevel string AppName string Builder Builder DNSConfig *dnsaliasconfig.DNSConfig }
PipelineArguments Holds arguments for the pipeline
type PipelineInfo ¶
type PipelineInfo struct { Definition *pipeline.Definition RadixApplication *radixv1.RadixApplication BuildSecret *corev1.Secret PipelineArguments PipelineArguments Steps []Step // Temporary data RadixConfigMapName string GitConfigMapName string TargetEnvironments []string // GitCommitHash is derived by inspecting HEAD commit after cloning user repository in prepare-pipelines step. // not to be confused with PipelineInfo.PipelineArguments.CommitID GitCommitHash string GitTags string // Holds information about components to be built for each environment BuildComponentImages pipeline.EnvironmentBuildComponentImages // Hold information about components to be deployed DeployEnvironmentComponentImages pipeline.DeployEnvironmentComponentImages // Prepare pipeline job build context PrepareBuildContext *PrepareBuildContext StopPipeline bool StopPipelineMessage string // Promotion job git info SourceDeploymentGitCommitHash string SourceDeploymentGitBranch string }
PipelineInfo Holds info about the pipeline to run
func InitPipeline ¶
func InitPipeline(pipelineType *pipeline.Definition, pipelineArguments *PipelineArguments, stepImplementations ...Step) (*PipelineInfo, error)
InitPipeline Initialize pipeline with step implementations
func (*PipelineInfo) IsPipelineType ¶ added in v1.45.0
func (info *PipelineInfo) IsPipelineType(pipelineType radixv1.RadixPipelineType) bool
IsPipelineType Check pipeline type
func (*PipelineInfo) IsUsingBuildKit ¶ added in v1.56.0
func (info *PipelineInfo) IsUsingBuildKit() bool
func (*PipelineInfo) SetApplicationConfig ¶ added in v1.4.2
func (info *PipelineInfo) SetApplicationConfig(applicationConfig *application.ApplicationConfig)
SetApplicationConfig Set radixconfig to be used later by other steps, as well as deriving info from the config
func (*PipelineInfo) SetGitAttributes ¶ added in v1.21.10
func (info *PipelineInfo) SetGitAttributes(gitCommitHash, gitTags string)
SetGitAttributes Set git attributes to be used later by other steps
type PrepareBuildContext ¶ added in v1.30.0
type PrepareBuildContext struct { // EnvironmentsToBuild List of environments with component names, which need to be built EnvironmentsToBuild []EnvironmentToBuild // ChangedRadixConfig Radix Config file was changed ChangedRadixConfig bool // EnvironmentSubPipelinesToRun Sub-pipeline pipeline file named, if they are configured to be run EnvironmentSubPipelinesToRun []EnvironmentSubPipelineToRun }
PrepareBuildContext Provide optional build instruction from the prepare job to the pipeline job
type Step ¶
type Step interface { Init(context.Context, kubernetes.Interface, radixclient.Interface, *kube.Kube, monitoring.Interface, *v1.RadixRegistration) ImplementationForType() pipeline.StepType ErrorMsg(error) string SucceededMsg() string Run(context.Context, *PipelineInfo) error GetAppName() string GetRegistration() *v1.RadixRegistration GetKubeclient() kubernetes.Interface GetRadixclient() radixclient.Interface GetKubeutil() *kube.Kube GetPrometheusOperatorClient() monitoring.Interface }
Step Generic interface for any Step implementation