Help us shape the future of Go! Take the 2026 Go Developer Survey

bean

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2025 License: Apache-2.0 Imports: 20 Imported by: 4

Documentation

Index

Constants

View Source
const (
	EntityNull = iota
	EntityTypeCiPipelineId
	EntityTypePreCD
	EntityTypePostCD
)
View Source
const (
	ImagePathPattern                                              = "%s/%s:%s" // dockerReg/dockerRepo:Tag
	ImageTagUnavailableMessage                                    = "Desired image tag already exists"
	REGEX_PATTERN_FOR_ENSURING_ONLY_ONE_VARIABLE_BETWEEN_BRACKETS = `\{.{2,}\}`
	REGEX_PATTERN_FOR_CHARACTER_OTHER_THEN_X_OR_x                 = `\{[^xX]|{}\}`
	REGEX_PATTERN_FOR_IMAGE_TAG                                   = `^[a-zA-Z0-9]+[a-zA-Z0-9._-]*$`
)
View Source
const (
	IMAGE_TAG_VARIABLE_NAME_X = "{X}"
	IMAGE_TAG_VARIABLE_NAME_x = "{x}"
)
View Source
const (
	CI_WORKFLOW_NAME           = "ci"
	CI_WORKFLOW_WITH_STAGES    = "ci-stages-with-env"
	CiStage                    = "CI"
	JobStage                   = "JOB"
	CdStage                    = "CD"
	CD_WORKFLOW_NAME           = "cd"
	CD_WORKFLOW_WITH_STAGES    = "cd-stages-with-env"
	WorkflowGenerateNamePrefix = "devtron.ai/generate-name-prefix"
)
View Source
const (
	VULNERABILITY_SCANNING_PLUGIN string = "Vulnerability Scanning"

	NotTriggered       string = "Not Triggered"
	NotDeployed               = "Not Deployed"
	WorkflowTypeDeploy        = "DEPLOY"
	WorkflowTypePre           = "PRE"
	WorkflowTypePost          = "POST"
)
View Source
const IMAGE_SCANNER_ENDPOINT = "IMAGE_SCANNER_ENDPOINT"

Variables

View Source
var (
	ErrImagePathInUse = fmt.Errorf(ImageTagUnavailableMessage)
)

Functions

func ConvertToEncodedForm added in v0.6.18

func ConvertToEncodedForm(data map[string]string) ([]byte, error)

ConvertToEncodedForm Function to encode the values in the input map values

Types

type BuildPrePostStepDataRequest added in v1.1.0

type BuildPrePostStepDataRequest struct {
	PipelineId int
	StageType  string
	Scope      resourceQualifiers.Scope
}

BuildPrePostStepDataRequest is a request object for func BuildPrePostAndRefPluginStepsDataForWfRequest

func NewBuildPrePostStepDataReq added in v1.1.0

func NewBuildPrePostStepDataReq(pipelineId int, stageType string, scope resourceQualifiers.Scope) *BuildPrePostStepDataRequest

NewBuildPrePostStepDataReq creates a new BuildPrePostStepDataRequest object

type BulkPatchFilter added in v0.6.22

type BulkPatchFilter struct {
	AppNameIncludes string `json:"appNameIncludes,omitempty"`
	AppNameExcludes string `json:"appNameExcludes,omitempty"`
	EnvId           int    `json:"envId,omitempty"`
}

type BulkPatchPayload added in v0.6.22

type BulkPatchPayload struct {
	AppId int `json:"appId"`
	EnvId int `json:"envId"`
}

type BulkPatchRequest added in v0.6.22

type BulkPatchRequest struct {
	Payload     []*BulkPatchPayload `json:"payload"`
	Filter      *BulkPatchFilter    `json:"filter,omitempty"`
	ProjectId   int                 `json:"projectId"`
	Global      bool                `json:"global"`
	Type        string              `json:"type"`
	Name        string              `json:"name"`
	Key         string              `json:"key"`
	Value       string              `json:"value"`
	PatchAction int                 `json:"patchAction"` // 1=add, 2=update, 0=delete
	UserId      int32               `json:"-"`
}

type CdWorkflowWithArtifact added in v1.0.0

type CdWorkflowWithArtifact struct {
	Id                    int                                         `json:"id"`
	CdWorkflowId          int                                         `json:"cd_workflow_id"`
	Name                  string                                      `json:"name"`
	Status                string                                      `json:"status"`
	PodStatus             string                                      `json:"pod_status"`
	Message               string                                      `json:"message"`
	StartedOn             time.Time                                   `json:"started_on"`
	FinishedOn            time.Time                                   `json:"finished_on"`
	PipelineId            int                                         `json:"pipeline_id"`
	Namespace             string                                      `json:"namespace"`
	LogFilePath           string                                      `json:"log_file_path"`
	TriggeredBy           int32                                       `json:"triggered_by"`
	EmailId               string                                      `json:"email_id"`
	Image                 string                                      `json:"image"`
	TargetPlatforms       []*bean.TargetPlatform                      `json:"targetPlatforms"`
	MaterialInfo          string                                      `json:"material_info,omitempty"`
	DataSource            string                                      `json:"data_source,omitempty"`
	CiArtifactId          int                                         `json:"ci_artifact_id,omitempty"`
	IsArtifactUploaded    bool                                        `json:"isArtifactUploaded"`
	WorkflowType          string                                      `json:"workflow_type,omitempty"`
	ExecutorType          string                                      `json:"executor_type,omitempty"`
	BlobStorageEnabled    bool                                        `json:"blobStorageEnabled"`
	GitTriggers           map[int]pipelineConfig.GitCommit            `json:"gitTriggers"`
	CiMaterials           []pipelineConfig.CiPipelineMaterialResponse `json:"ciMaterials"`
	ImageReleaseTags      []*repository.ImageTag                      `json:"imageReleaseTags"`
	ImageComment          *repository.ImageComment                    `json:"imageComment"`
	RefCdWorkflowRunnerId int                                         `json:"referenceCdWorkflowRunnerId"`
}

type CiProjectDetails added in v0.6.24

type CiProjectDetails struct {
	GitRepository   string `json:"gitRepository"`
	MaterialName    string `json:"materialName"`
	CheckoutPath    string `json:"checkoutPath"`
	FetchSubmodules bool   `json:"fetchSubmodules"`
	CommitHash      string `json:"commitHash"`
	GitTag          string `json:"gitTag"`
	CommitTime      string `json:"commitTime"`
	//Branch        string          `json:"branch"`
	Type        string               `json:"type"`
	Message     string               `json:"message"`
	Author      string               `json:"author"`
	GitOptions  GitOptions           `json:"gitOptions"`
	SourceType  constants.SourceType `json:"sourceType"`
	SourceValue string               `json:"sourceValue"`
	WebhookData pipelineConfig.WebhookData
}

type CmBlobStorageConfig added in v0.6.25

type CmBlobStorageConfig struct {
	//AWS credentials
	CloudProvider               blob_storage.BlobStorageType `json:"BLOB_STORAGE_PROVIDER"`
	S3AccessKey                 string                       `json:"BLOB_STORAGE_S3_ACCESS_KEY"`
	S3Endpoint                  string                       `json:"BLOB_STORAGE_S3_ENDPOINT"`
	S3EndpointInsecure          string                       `json:"BLOB_STORAGE_S3_ENDPOINT_INSECURE"`
	S3BucketVersioned           string                       `json:"BLOB_STORAGE_S3_BUCKET_VERSIONED"`
	CdDefaultBuildLogsBucket    string                       `json:"DEFAULT_BUILD_LOGS_BUCKET" `
	CdDefaultCdLogsBucketRegion string                       `json:"DEFAULT_CD_LOGS_BUCKET_REGION" `
	DefaultCacheBucket          string                       `json:"DEFAULT_CACHE_BUCKET"`
	DefaultCacheBucketRegion    string                       `json:"DEFAULT_CACHE_BUCKET_REGION"`

	//Azure credentials
	AzureAccountName               string `json:"AZURE_ACCOUNT_NAME"`
	AzureGatewayUrl                string `json:"AZURE_GATEWAY_URL"`
	AzureGatewayConnectionInsecure string `json:"AZURE_GATEWAY_CONNECTION_INSECURE"`
	AzureBlobContainerCiLog        string `json:"AZURE_BLOB_CONTAINER_CI_LOG"`
	AzureBlobContainerCiCache      string `json:"AZURE_BLOB_CONTAINER_CI_CACHE"`
}

func (*CmBlobStorageConfig) SetCmBlobStorageConfig added in v0.6.25

func (c *CmBlobStorageConfig) SetCmBlobStorageConfig(cm map[string]string) error

type CommandArgsMap

type CommandArgsMap struct {
	Command string   `json:"command"`
	Args    []string `json:"args"`
}

type ConditionDetailDto

type ConditionDetailDto struct {
	Id                  int                                       `json:"id"`
	ConditionOnVariable string                                    `json:"conditionOnVariable"` //name of variable on which condition is written
	ConditionType       repository.PipelineStageStepConditionType `json:"conditionType" validate:"oneof=SKIP TRIGGER FAIL PASS"`
	ConditionalOperator string                                    `json:"conditionOperator"`
	ConditionalValue    string                                    `json:"conditionalValue"`
}

type ConditionObject

type ConditionObject struct {
	ConditionType       string `json:"conditionType"`       //TRIGGER, SKIP, SUCCESS, FAIL
	ConditionOnVariable string `json:"conditionOnVariable"` //name of variable
	ConditionalOperator string `json:"conditionalOperator"`
	ConditionalValue    string `json:"conditionalValue"`
}

type ConfigData added in v0.6.22

type ConfigData struct {
	Name                  string               `json:"name"`
	Type                  string               `json:"type"`
	External              bool                 `json:"external"`
	MountPath             string               `json:"mountPath,omitempty"`
	Data                  json.RawMessage      `json:"data"`
	PatchData             json.RawMessage      `json:"patchData"`
	MergeStrategy         models.MergeStrategy `json:"mergeStrategy"`
	DefaultData           json.RawMessage      `json:"defaultData,omitempty"`
	DefaultMountPath      string               `json:"defaultMountPath,omitempty"`
	Global                bool                 `json:"global"`
	ExternalSecretType    string               `json:"externalType"`
	ESOSecretData         ESOSecretData        `json:"esoSecretData"`
	DefaultESOSecretData  ESOSecretData        `json:"defaultESOSecretData,omitempty"`
	ExternalSecret        []ExternalSecret     `json:"secretData"`
	DefaultExternalSecret []ExternalSecret     `json:"defaultSecretData,omitempty"`
	RoleARN               string               `json:"roleARN"`
	SubPath               bool                 `json:"subPath"`
	ESOSubPath            []string             `json:"esoSubPath"`
	FilePermission        string               `json:"filePermission"`
	Overridden            bool                 `json:"overridden"`
}

func (*ConfigData) IsESOExternalSecretType added in v1.0.0

func (c *ConfigData) IsESOExternalSecretType() bool

type ConfigDataRequest added in v0.6.22

type ConfigDataRequest struct {
	Id            int           `json:"id"`
	AppId         int           `json:"appId"`
	EnvironmentId int           `json:"environmentId,omitempty"`
	ConfigData    []*ConfigData `json:"configData"`
	Deletable     bool          `json:"isDeletable"`
	UserId        int32         `json:"-"`
}

type ConfigNameAndType added in v0.7.3

type ConfigNameAndType struct {
	Id   int
	Name string
	Type ResourceType
}

type ConfigsList added in v1.0.0

type ConfigsList struct {
	ConfigData []*ConfigData `json:"maps"`
}

type ContainerResources added in v0.6.24

type ContainerResources struct {
	MinCpu        string `json:"minCpu"`
	MaxCpu        string `json:"maxCpu"`
	MinStorage    string `json:"minStorage"`
	MaxStorage    string `json:"maxStorage"`
	MinEphStorage string `json:"minEphStorage"`
	MaxEphStorage string `json:"maxEphStorage"`
	MinMem        string `json:"minMem"`
	MaxMem        string `json:"maxMem"`
}

type CreateJobEnvOverridePayload added in v0.6.22

type CreateJobEnvOverridePayload struct {
	AppId  int   `json:"appId"`
	EnvId  int   `json:"envId"`
	UserId int32 `json:"-"`
}

type CustomTagArrayResponse added in v0.7.2

type CustomTagArrayResponse map[int]map[string]*repository.CustomTag

func (CustomTagArrayResponse) GetCustomTagForEntityKey added in v0.7.2

func (resp CustomTagArrayResponse) GetCustomTagForEntityKey(entityKey int, entityValue string) *repository.CustomTag

type ESOData added in v0.6.22

type ESOData struct {
	SecretKey string `json:"secretKey"`
	Key       string `json:"key"`
	Property  string `json:"property,omitempty"`
}

type ESOSecretData added in v0.6.22

type ESOSecretData struct {
	SecretStore     json.RawMessage `json:"secretStore,omitempty"`
	SecretStoreRef  json.RawMessage `json:"secretStoreRef,omitempty"`
	ESOData         []ESOData       `json:"esoData,omitempty"`
	RefreshInterval string          `json:"refreshInterval,omitempty"`
	ESODataFrom     json.RawMessage `json:"esoDataFrom,omitempty"`
	Template        json.RawMessage `json:"template,omitempty"`
}

type EnvironmentOverrideCreateInternalDTO added in v1.1.0

type EnvironmentOverrideCreateInternalDTO struct {
	Chart                                              *chartRepoRepository.Chart
	EnvironmentId                                      int
	UserId                                             int32
	ManualReviewed                                     bool
	ChartStatus                                        models.ChartStatus
	IsOverride, IsAppMetricsEnabled, IsBasicViewLocked bool
	Namespace                                          string
	CurrentViewEditor                                  models.ChartsViewEditorType
	MergeStrategy                                      models.MergeStrategy
}

type EnvironmentProperties added in v0.6.22

type EnvironmentProperties struct {
	Id                int                         `json:"id"`
	EnvOverrideValues json.RawMessage             `json:"envOverrideValues"`
	Status            models.ChartStatus          `json:"status" validate:"number,required"` //default new, when its ready for deployment CHARTSTATUS_SUCCESS
	ManualReviewed    bool                        `json:"manualReviewed" validate:"required"`
	Active            bool                        `json:"active" validate:"required"`
	Namespace         string                      `json:"namespace"`
	EnvironmentId     int                         `json:"environmentId"`
	EnvironmentName   string                      `json:"environmentName"`
	Latest            bool                        `json:"latest"`
	UserId            int32                       `json:"-"`
	AppMetrics        *bool                       `json:"isAppMetricsEnabled"`
	ChartRefId        int                         `json:"chartRefId,omitempty"  validate:"number"`
	IsOverride        bool                        `sql:"isOverride"`
	IsBasicViewLocked bool                        `json:"isBasicViewLocked"`
	CurrentViewEditor models.ChartsViewEditorType `json:"currentViewEditor"` //default "UNDEFINED" in db
	Description       string                      `json:"description" validate:"max=40"`
	ClusterId         int                         `json:"clusterId"`
	MergeStrategy     models.MergeStrategy        `json:"mergeStrategy"`
}

type EnvironmentPropertiesResponse added in v0.6.22

type EnvironmentPropertiesResponse struct {
	EnvironmentConfig EnvironmentProperties `json:"environmentConfig"`
	GlobalConfig      json.RawMessage       `json:"globalConfig"`
	AppMetrics        *bool                 `json:"appMetrics"`
	IsOverride        bool                  `sql:"is_override"`
	GlobalChartRefId  int                   `json:"globalChartRefId,omitempty"  validate:"number"`
	ChartRefId        int                   `json:"chartRefId,omitempty"  validate:"number"`
	Namespace         string                `json:"namespace" validate:"name-space-component"`
	Schema            json.RawMessage       `json:"schema"`
	Readme            string                `json:"readme"`
}

type ExternalSecret added in v0.6.22

type ExternalSecret struct {
	Key      string `json:"key"`
	Name     string `json:"name"`
	Property string `json:"property,omitempty"`
	IsBinary bool   `json:"isBinary"`
}

type GitOptions added in v0.6.24

type GitOptions struct {
	UserName              string             `json:"userName"`
	Password              string             `json:"password"`
	SshPrivateKey         string             `json:"sshPrivateKey"`
	AccessToken           string             `json:"accessToken"`
	AuthMode              constants.AuthMode `json:"authMode"`
	TlsKey                string             `json:"tlsKey"`
	TlsCert               string             `json:"tlsCert"`
	CaCert                string             `json:"caCert"`
	EnableTLSVerification bool               `json:"enableTLSVerification"`
}

type GlobalCMCSDto added in v0.6.17

type GlobalCMCSDto struct {
	Id         int    `json:"id"`
	ConfigType string `json:"configType" validate:"oneof=CONFIGMAP SECRET"`
	Name       string `json:"name"  validate:"required"`
	Type       string `json:"type" validate:"oneof=environment volume"`
	//map of key:value, example: '{ "a" : "b", "c" : "d"}'
	Data               map[string]string `json:"data"  validate:"required"`
	MountPath          string            `json:"mountPath"`
	Deleted            bool              `json:"deleted"`
	UserId             int32             `json:"-"`
	SecretIngestionFor string            `json:"SecretIngestionFor"` // value can be one of [ci, cd, ci/cd]
}

func (GlobalCMCSDto) ConvertToConfigSecretMap added in v0.6.17

func (dto GlobalCMCSDto) ConvertToConfigSecretMap() (bean.ConfigSecretMap, error)

type InlineStepDetailDto

type InlineStepDetailDto struct {
	ScriptType               repository2.ScriptType                `json:"scriptType" validate:"omitempty,oneof=SHELL DOCKERFILE CONTAINER_IMAGE"`
	Script                   string                                `json:"script"`
	StoreScriptAt            string                                `json:"storeScriptAt"`
	DockerfileExists         bool                                  `json:"dockerfileExists,omitempty"`
	MountPath                string                                `json:"mountPath,omitempty"`
	MountCodeToContainer     bool                                  `json:"mountCodeToContainer,omitempty"`
	MountCodeToContainerPath string                                `json:"mountCodeToContainerPath,omitempty"`
	MountDirectoryFromHost   bool                                  `json:"mountDirectoryFromHost"`
	ContainerImagePath       string                                `json:"containerImagePath,omitempty"`
	ImagePullSecretType      repository2.ScriptImagePullSecretType `json:"imagePullSecretType,omitempty" validate:"omitempty,oneof=CONTAINER_REGISTRY SECRET_PATH"`
	ImagePullSecret          string                                `json:"imagePullSecret,omitempty"`
	MountPathMap             []*MountPathMap                       `json:"mountPathMap,omitempty" validate:"omitempty,dive"`
	CommandArgsMap           []*CommandArgsMap                     `json:"commandArgsMap,omitempty" validate:"omitempty,dive"`
	PortMap                  []*PortMap                            `json:"portMap,omitempty" validate:"omitempty,dive"`
	InputVariables           []*StepVariableDto                    `json:"inputVariables" validate:"dive"`
	OutputVariables          []*StepVariableDto                    `json:"outputVariables" validate:"dive"`
	ConditionDetails         []*ConditionDetailDto                 `json:"conditionDetails" validate:"dive"`
}

type JobEnvOverrideResponse added in v0.6.22

type JobEnvOverrideResponse struct {
	Id              int    `json:"id"`
	AppId           int    `json:"appId"`
	EnvironmentId   int    `json:"environmentId,omitempty"`
	EnvironmentName string `json:"environmentName,omitempty"`
}

type LimitReqCpuMem added in v0.6.24

type LimitReqCpuMem struct {
	LimitCpu string
	LimitMem string
	ReqCpu   string
	ReqMem   string
}

type MountPath

type MountPath struct {
	SourcePath      string `json:"sourcePath"`
	DestinationPath string `json:"destinationPath"`
}

type MountPathMap

type MountPathMap struct {
	FilePathOnDisk      string `json:"filePathOnDisk"`
	FilePathOnContainer string `json:"filePathOnContainer"`
}

type NodeConstraints added in v0.6.24

type NodeConstraints struct {
	ServiceAccount   string
	TaintKey         string
	TaintValue       string
	NodeLabel        map[string]string
	SkipNodeSelector bool
}

type PipelineStageDto

type PipelineStageDto struct {
	Id          int                          `json:"id"`
	Name        string                       `json:"name,omitempty"`
	Description string                       `json:"description,omitempty"`
	Type        repository.PipelineStageType `json:"type,omitempty" validate:"omitempty,oneof=PRE_CI POST_CI PRE_CD POST_CD"`
	Steps       []*PipelineStageStepDto      `json:"steps"`
	TriggerType pipelineConfig.TriggerType   `json:"triggerType,omitempty"`
}

type PipelineStageStepDto

type PipelineStageStepDto struct {
	Id                       int                         `json:"id"`
	Name                     string                      `json:"name" validate:"required"`
	Description              string                      `json:"description"`
	Index                    int                         `json:"index"`
	StepType                 repository.PipelineStepType `json:"stepType" validate:"omitempty,oneof=INLINE REF_PLUGIN"`
	OutputDirectoryPath      []string                    `json:"outputDirectoryPath"`
	InlineStepDetail         *InlineStepDetailDto        `json:"inlineStepDetail" validate:"omitempty,dive"`
	RefPluginStepDetail      *RefPluginStepDetailDto     `json:"pluginRefStepDetail" validate:"omitempty,dive"`
	TriggerIfParentStageFail bool                        `json:"triggerIfParentStageFail"`
}

type PortMap

type PortMap struct {
	PortOnLocal     int `json:"portOnLocal" validate:"number,gt=0"`
	PortOnContainer int `json:"portOnContainer" validate:"number,gt=0"`
}

type PrePostAndRefPluginStepsResponse added in v0.6.24

type PrePostAndRefPluginStepsResponse struct {
	PreStageSteps    []*StepObject
	PostStageSteps   []*StepObject
	RefPluginData    []*RefPluginObject
	VariableSnapshot map[string]string
}

type RefPluginObject

type RefPluginObject struct {
	Id    int           `json:"id"`
	Steps []*StepObject `json:"steps"`
}

type RefPluginStepDetailDto

type RefPluginStepDetailDto struct {
	PluginId         int                   `json:"pluginId"`
	InputVariables   []*StepVariableDto    `json:"inputVariables"`
	OutputVariables  []*StepVariableDto    `json:"outputVariables"`
	ConditionDetails []*ConditionDetailDto `json:"conditionDetails"`
}

type ResolvedCmCsRequest added in v1.2.2

type ResolvedCmCsRequest struct {
	Scope resourceQualifiers.Scope
	AppId int
	EnvId int
	IsJob bool
}

func NewResolvedCmCsRequest added in v1.2.2

func NewResolvedCmCsRequest(scope resourceQualifiers.Scope) *ResolvedCmCsRequest

func (*ResolvedCmCsRequest) ForJob added in v1.2.2

func (r *ResolvedCmCsRequest) ForJob(isJob bool) *ResolvedCmCsRequest

func (*ResolvedCmCsRequest) WithAppId added in v1.2.2

func (r *ResolvedCmCsRequest) WithAppId(appId int) *ResolvedCmCsRequest

func (*ResolvedCmCsRequest) WithEnvId added in v1.2.2

func (r *ResolvedCmCsRequest) WithEnvId(envId int) *ResolvedCmCsRequest

type ResourceType added in v0.7.3

type ResourceType string
const (
	CM                 ResourceType = "ConfigMap"
	CS                 ResourceType = "Secret"
	DeploymentTemplate ResourceType = "Deployment Template"
	PipelineStrategy   ResourceType = "Pipeline Strategy"
)

func (ResourceType) ToString added in v0.7.3

func (r ResourceType) ToString() string

type SecretBlobStorageConfig added in v0.6.25

type SecretBlobStorageConfig struct {
	//aws
	S3SecretKey string `json:"BLOB_STORAGE_S3_SECRET_KEY"`
	//gcp
	GcpBlobStorageCredentialJson string `json:"BLOB_STORAGE_GCP_CREDENTIALS_JSON"`
	//azure
	AzureAccountKey string `json:"AZURE_ACCOUNT_KEY"`
}

func (*SecretBlobStorageConfig) SetSecretBlobStorageConfig added in v0.6.25

func (s *SecretBlobStorageConfig) SetSecretBlobStorageConfig(secret map[string][]byte) error

input secret data contains encoded bytes

type SecretsList added in v0.6.26

type SecretsList struct {
	ConfigData []*ConfigData `json:"secrets"`
}

type StepObject

type StepObject struct {
	Name                     string                       `json:"name"`
	Index                    int                          `json:"index"`
	StepType                 string                       `json:"stepType"`               // REF_PLUGIN or INLINE
	ExecutorType             string                       `json:"executorType,omitempty"` //SHELL, DOCKERFILE, CONTAINER_IMAGE
	RefPluginId              int                          `json:"refPluginId,omitempty"`
	Script                   string                       `json:"script,omitempty"`
	InputVars                []*commonBean.VariableObject `json:"inputVars"`
	ExposedPorts             map[int]int                  `json:"exposedPorts"` //map of host:container
	OutputVars               []*commonBean.VariableObject `json:"outputVars"`
	TriggerSkipConditions    []*ConditionObject           `json:"triggerSkipConditions"`
	SuccessFailureConditions []*ConditionObject           `json:"successFailureConditions"`
	DockerImage              string                       `json:"dockerImage"`
	Command                  string                       `json:"command"`
	Args                     []string                     `json:"args"`
	CustomScriptMount        *MountPath                   `json:"customScriptMount"` // destination path - storeScriptAt
	SourceCodeMount          *MountPath                   `json:"sourceCodeMount"`   // destination path - mountCodeToContainerPath
	ExtraVolumeMounts        []*MountPath                 `json:"extraVolumeMounts"` // filePathMapping
	ArtifactPaths            []string                     `json:"artifactPaths"`
	TriggerIfParentStageFail bool                         `json:"triggerIfParentStageFail"`
}

type StepVariableDto

type StepVariableDto struct {
	Id              int                                            `json:"id"`
	Name            string                                         `json:"name" validate:"required"`
	Format          repository.PipelineStageStepVariableFormatType `json:"format" validate:"oneof=STRING NUMBER BOOL DATE FILE"`
	Description     string                                         `json:"description"`
	AllowEmptyValue bool                                           `json:"allowEmptyValue,omitempty"`
	DefaultValue    string                                         `json:"defaultValue,omitempty"`
	Value           string                                         `json:"value"`
	// ValueType – Ideally it should have json tag `valueType` instead of `variableType`
	ValueType                 repository.PipelineStageStepVariableValueType `json:"variableType,omitempty" validate:"oneof=NEW FROM_PREVIOUS_STEP GLOBAL"`
	PreviousStepIndex         int                                           `json:"refVariableStepIndex,omitempty"`
	ReferenceVariableName     string                                        `json:"refVariableName,omitempty"`
	VariableStepIndexInPlugin int                                           `json:"variableStepIndexInPlugin,omitempty"`
	ReferenceVariableStage    repository.PipelineStageType                  `json:"refVariableStage,omitempty" validate:"omitempty,oneof=PRE_CI POST_CI PRE_CD POST_CD"`
	StepVariableEntDto
}

StepVariableDto is used to define the input/output variables for a step TODO: duplicate definition found - bean.PluginVariableDto. Have multiple conflicting fields with bean.PluginVariableDto.

func (*StepVariableDto) GetValue added in v1.1.0

func (s *StepVariableDto) GetValue() string

func (*StepVariableDto) IsEmptyValue added in v1.1.0

func (s *StepVariableDto) IsEmptyValue() bool

func (*StepVariableDto) IsEmptyValueAllowed added in v1.1.0

func (s *StepVariableDto) IsEmptyValueAllowed(isTriggerStage bool) bool

type StepVariableEntDto added in v1.1.0

type StepVariableEntDto struct {
}

type VariableAndConditionDataForStep added in v1.1.0

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

func NewVariableAndConditionDataForStep added in v1.1.0

func NewVariableAndConditionDataForStep() *VariableAndConditionDataForStep

func (*VariableAndConditionDataForStep) AddInputVariable added in v1.1.0

func (*VariableAndConditionDataForStep) AddOutputVariable added in v1.1.0

func (*VariableAndConditionDataForStep) AddSuccessFailureCondition added in v1.1.0

func (v *VariableAndConditionDataForStep) AddSuccessFailureCondition(condition *ConditionObject) *VariableAndConditionDataForStep

func (*VariableAndConditionDataForStep) AddTriggerSkipCondition added in v1.1.0

func (*VariableAndConditionDataForStep) GetInputVariables added in v1.1.0

func (v *VariableAndConditionDataForStep) GetInputVariables() []*commonBean.VariableObject

func (*VariableAndConditionDataForStep) GetOutputVariables added in v1.1.0

func (v *VariableAndConditionDataForStep) GetOutputVariables() []*commonBean.VariableObject

func (*VariableAndConditionDataForStep) GetSuccessFailureConditions added in v1.1.0

func (v *VariableAndConditionDataForStep) GetSuccessFailureConditions() []*ConditionObject

func (*VariableAndConditionDataForStep) GetTriggerSkipConditions added in v1.1.0

func (v *VariableAndConditionDataForStep) GetTriggerSkipConditions() []*ConditionObject

type WorkflowPipelineType added in v0.6.24

type WorkflowPipelineType string
const (
	CI_WORKFLOW_PIPELINE_TYPE  WorkflowPipelineType = "CI"
	CD_WORKFLOW_PIPELINE_TYPE  WorkflowPipelineType = "CD"
	JOB_WORKFLOW_PIPELINE_TYPE WorkflowPipelineType = "JOB"
)

type WorkflowTemplate added in v0.6.17

type WorkflowTemplate struct {
	WorkflowId       int
	WorkflowRunnerId int
	v1.PodSpec
	ConfigMaps             []bean.ConfigSecretMap
	Secrets                []bean.ConfigSecretMap
	TTLValue               *int32
	WorkflowRequestJson    string
	WorkflowNamePrefix     string
	WfControllerInstanceID string
	ClusterConfig          *rest.Config
	Namespace              string
	ArchiveLogs            bool
	BlobStorageConfigured  bool
	BlobStorageS3Config    *blob_storage.BlobStorageS3Config
	CloudProvider          blob_storage.BlobStorageType
	AzureBlobConfig        *blob_storage.AzureBlobConfig
	GcpBlobConfig          *blob_storage.GcpBlobConfig
	CloudStorageKey        string
	PrePostDeploySteps     []*StepObject
	RefPlugins             []*RefPluginObject
	TerminationGracePeriod int
	WorkflowType           string
}

func (*WorkflowTemplate) CreateObjectMetadata added in v0.6.24

func (workflowTemplate *WorkflowTemplate) CreateObjectMetadata() *v12.ObjectMeta

func (*WorkflowTemplate) GetEntrypoint added in v0.6.24

func (workflowTemplate *WorkflowTemplate) GetEntrypoint() string

func (*WorkflowTemplate) SetActiveDeadlineSeconds added in v1.2.1

func (workflowTemplate *WorkflowTemplate) SetActiveDeadlineSeconds(timeout int64)

Jump to

Keyboard shortcuts

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