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

types

package
v1.8.2 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2025 License: Apache-2.0 Imports: 40 Imported by: 25

Documentation

Index

Constants

View Source
const (
	ExternalCiWebhookPath = "orchestrator/webhook/ext-ci"
	DevMode               = "DEV"
	ProdMode              = "PROD"
	CiConfigType          = "CiConfig"
	CdConfigType          = "CdConfig"
)
View Source
const (
	CiArtifactLocationFormat = "%d/%d.zip"
	CdArtifactLocationFormat = "%d/%d.zip"
)
View Source
const (
	GIT_REPO_URL_PREFIX     = "GIT_REPO_URL"
	GIT_COMMIT_HASH_PREFIX  = "GIT_COMMIT_HASH"
	GIT_SOURCE_TYPE_PREFIX  = "GIT_SOURCE_TYPE"
	GIT_SOURCE_VALUE_PREFIX = "GIT_SOURCE_VALUE"
	GIT_SOURCE_COUNT        = "GIT_SOURCE_COUNT"
)
View Source
const (
	PRE                         = "PRE"
	POST                        = "POST"
	CI_NODE_PVC_ALL_ENV         = "devtron.ai/ci-pvc-all"
	CI_NODE_PVC_PIPELINE_PREFIX = "devtron.ai/ci-pvc"
)
View Source
const BLOB_STORAGE_AZURE = "AZURE"
View Source
const BLOB_STORAGE_GCP = "GCP"
View Source
const BLOB_STORAGE_MINIO = "MINIO"
View Source
const BLOB_STORAGE_S3 = "S3"
View Source
const (
	TriggerAuditSchemaVersionV1 = "V1"
)

Variables

This section is empty.

Functions

func DecodeSecretKey

func DecodeSecretKey(secretKey string) string

func GetCiConfigWithWorkflowCacheConfig added in v1.2.1

func GetCiConfigWithWorkflowCacheConfig() (*CiConfig, WorkflowCacheConfig, error)

func GetNodeLabel

func GetNodeLabel(cfg *CiCdConfig, pipelineType bean.WorkflowPipelineType, isExt bool) (map[string]string, error)

func UpdateContainerEnvsFromCmCs

func UpdateContainerEnvsFromCmCs(workflowMainContainer *v1.Container, configMaps []apiBean.ConfigSecretMap, secrets []apiBean.ConfigSecretMap)

Types

type AppLabelMetadata

type AppLabelMetadata struct {
	AppLabelKey   string `json:"APP_LABEL_KEY"`
	AppLabelValue string `json:"APP_LABEL_VALUE"`
}

type ArtifactsForCiJob

type ArtifactsForCiJob struct {
	Artifacts []string `json:"artifacts"`
}

type BuildLogRequest

type BuildLogRequest struct {
	PipelineId        int
	WorkflowId        int
	PodName           string
	LogsFilePath      string
	Namespace         string
	CloudProvider     blob_storage.BlobStorageType
	AwsS3BaseConfig   *blob_storage.AwsS3BaseConfig
	AzureBlobConfig   *blob_storage.AzureBlobBaseConfig
	GcpBlobBaseConfig *blob_storage.GcpBlobBaseConfig
	MinioEndpoint     string
}

func (*BuildLogRequest) SetBuildLogRequest

func (r *BuildLogRequest) SetBuildLogRequest(cmConfig *bean.CmBlobStorageConfig, secretConfig *bean.SecretBlobStorageConfig)

type CancelWfRequestDto added in v1.0.0

type CancelWfRequestDto struct {
	ExecutorType         cdWorkflow.WorkflowExecutorType
	WorkflowName         string
	Namespace            string
	RestConfig           *rest.Config
	IsExt                bool
	Environment          *repository.Environment
	ForceAbort           bool
	WorkflowGenerateName string
}

type CdConfig

type CdConfig struct {
	*CiCdConfig
}

func GetCdConfig

func GetCdConfig() (*CdConfig, error)

type CdPipelineConfig

type CdPipelineConfig struct {
	BeforeTasks []*Task `yaml:"beforeStages"`
	AfterTasks  []*Task `yaml:"afterStages"`
}

type CdTriggerAuditRequest added in v1.8.0

type CdTriggerAuditRequest struct {
	WorkflowRunnerId int
	WorkflowType     WorkflowType
	*CommonAuditRequest
}

CdTriggerAuditRequest represents the request for CD trigger audit (Pre-CD, Post-CD)

type ChildCdMetadata

type ChildCdMetadata struct {
	ChildCdEnvName     string `json:"CHILD_CD_ENV_NAME"`
	ChildCdClusterName string `json:"CHILD_CD_CLUSTER_NAME"`
}

type CiArtifactDTO

type CiArtifactDTO struct {
	Id           int    `json:"id"`
	PipelineId   int    `json:"pipelineId"` // id of the ci pipeline from which this webhook was triggered
	Image        string `json:"image"`
	ImageDigest  string `json:"imageDigest"`
	MaterialInfo string `json:"materialInfo"` // git material metadata json array string
	DataSource   string `json:"dataSource"`
	WorkflowId   *int   `json:"workflowId"`
	// contains filtered or unexported fields
}

type CiCdConfig

type CiCdConfig struct {
	// from ciConfig
	DefaultCacheBucket           string   `env:"DEFAULT_CACHE_BUCKET" envDefault:"ci-caching" description:"Bucket name for build cache" `
	DefaultCacheBucketRegion     string   `env:"DEFAULT_CACHE_BUCKET_REGION" envDefault:"us-east-2" description:"Build Cache bucket region" `
	CiLogsKeyPrefix              string   `env:"CI_LOGS_KEY_PREFIX" envDxefault:"my-artifacts" description:"Prefix for build logs"`
	CiDefaultImage               string   `` /* 134-byte string literal not displayed */
	CiDefaultNamespace           string   `env:"DEFAULT_NAMESPACE" envDefault:"devtron-ci" description:"Timeout for CI to be completed"`
	CiDefaultBuildLogsBucket     string   `env:"DEFAULT_BUILD_LOGS_BUCKET" envDefault:"devtron-pro-ci-logs"`
	CiDefaultCdLogsBucketRegion  string   `env:"DEFAULT_CD_LOGS_BUCKET_REGION" envDefault:"us-east-2"`
	CiTaintKey                   string   `env:"CI_NODE_TAINTS_KEY" envDefault:"" description:"Toleration key for CI"`
	CiTaintValue                 string   `env:"CI_NODE_TAINTS_VALUE" envDefault:"" description:"Toleration value for CI" `
	CiNodeLabelSelector          []string `env:"CI_NODE_LABEL_SELECTOR" description:"Node label selector for  CI"`
	CacheLimit                   int64    `env:"CACHE_LIMIT" envDefault:"5000000000" description:"Cache limit."` // TODO: Add to default db config also
	CiDefaultBuildLogsKeyPrefix  string   `env:"DEFAULT_BUILD_LOGS_KEY_PREFIX" envDefault:"arsenal-v1" description:"Bucket prefix for build logs"`
	CiDefaultArtifactKeyPrefix   string   `` /* 127-byte string literal not displayed */
	CiWorkflowServiceAccount     string   `env:"WORKFLOW_SERVICE_ACCOUNT" envDefault:"ci-runner"`
	ExternalCiApiSecret          string   `env:"EXTERNAL_CI_API_SECRET" envDefault:"devtroncd-secret" description:"External CI API secret."`
	ExternalCiWebhookUrl         string   `` /* 139-byte string literal not displayed */
	ExternalCiPayload            string   `` /* 488-byte string literal not displayed */
	ImageScannerEndpoint         string   `` /* 148-byte string literal not displayed */
	CiDefaultAddressPoolBaseCidr string   `env:"CI_DEFAULT_ADDRESS_POOL_BASE_CIDR" description:"To pass the IP cidr for CI"`
	CiDefaultAddressPoolSize     int      `env:"CI_DEFAULT_ADDRESS_POOL_SIZE" description:"The subnet size to allocate from the base pool for CI"`
	CiRunnerDockerMTUValue       int      `` /* 206-byte string literal not displayed */
	//Deprecated: use WorkflowCacheConfig instead
	IgnoreDockerCacheForCI           bool                            `env:"CI_IGNORE_DOCKER_CACHE" description:"Ignoring docker cache "`
	WorkflowCacheConfig              string                          `` /* 129-byte string literal not displayed */
	VolumeMountsForCiJson            string                          `env:"CI_VOLUME_MOUNTS_JSON" description:"additional volume mount data for CI and JOB"`
	BuildPvcCachePath                string                          `env:"PRE_CI_CACHE_PATH" envDefault:"/devtroncd-cache" description:"Cache path for Pre CI tasks"`
	DefaultPvcCachePath              string                          `` /* 184-byte string literal not displayed */
	BuildxPvcCachePath               string                          `env:"BUILDX_CACHE_PATH" envDefault:"/var/lib/devtron/buildx" description:"Path for the buildx cache"`
	UseBlobStorageConfigInCiWorkflow bool                            `env:"USE_BLOB_STORAGE_CONFIG_IN_CI_WORKFLOW" envDefault:"true" description:"To enable blob storage in pre and post ci"`
	DefaultTargetPlatform            string                          `env:"DEFAULT_TARGET_PLATFORM" envDefault:"" description:"Default architecture for buildx"`
	UseBuildx                        bool                            `env:"USE_BUILDX" envDefault:"false" description:"To enable buildx feature globally"`
	EnableBuildContext               bool                            `env:"ENABLE_BUILD_CONTEXT" envDefault:"false" description:"To Enable build context in Devtron."`
	ImageRetryCount                  int                             `env:"IMAGE_RETRY_COUNT" envDefault:"0" description:"push artifact(image) in ci retry count "`
	ImageRetryInterval               int                             `env:"IMAGE_RETRY_INTERVAL" envDefault:"5" description:"image retry interval takes value in seconds"` // image retry interval takes value in seconds
	CiWorkflowExecutorType           cdWorkflow.WorkflowExecutorType `env:"CI_WORKFLOW_EXECUTOR_TYPE" envDefault:"AWF" description:"Executor type for CI(AWF,System)"`
	BuildxK8sDriverOptions           string                          `env:"BUILDX_K8S_DRIVER_OPTIONS" envDefault:"" description:"To enable the k8s driver and pass args for k8s driver in buildx"`
	CIAutoTriggerBatchSize           int                             `` /* 194-byte string literal not displayed */
	SkipCreatingEcrRepo              bool                            `` /* 160-byte string literal not displayed */
	MaxCiWorkflowRetries             int                             `env:"MAX_CI_WORKFLOW_RETRIES" envDefault:"0" description:"Maximum time CI-workflow create pod if it fails to complete"`
	NatsServerHost                   string                          `env:"NATS_SERVER_HOST" envDefault:"nats://devtron-nats.devtroncd:4222"`
	ImageScanMaxRetries              int                             `env:"IMAGE_SCAN_MAX_RETRIES" envDefault:"3" description:"Max retry count for image-scanning"`
	ImageScanRetryDelay              int                             `env:"IMAGE_SCAN_RETRY_DELAY" envDefault:"5" description:"Delay for the image-scaning to start"`
	ShowDockerBuildCmdInLogs         bool                            `env:"SHOW_DOCKER_BUILD_ARGS" envDefault:"true" description:"To enable showing the args passed for CI in build logs"`
	IgnoreCmCsInCiJob                bool                            `env:"IGNORE_CM_CS_IN_CI_JOB" envDefault:"false" description:"Ignore CM/CS in CI-pipeline as Job"`
	//Deprecated: use WorkflowCacheConfig instead
	SkipCiJobBuildCachePushPull bool `env:"SKIP_CI_JOB_BUILD_CACHE_PUSH_PULL" envDefault:"false" description:"To skip cache Push/Pull for ci job"`
	// from CdConfig
	CdLimitCpu                       string                          `env:"CD_LIMIT_CI_CPU" envDefault:"0.5" description:"CPU Resource Limit Pre/Post CD"`
	CdLimitMem                       string                          `env:"CD_LIMIT_CI_MEM" envDefault:"3G" description:"Memory Resource Limit Pre/Post CD"`
	CdReqCpu                         string                          `env:"CD_REQ_CI_CPU" envDefault:"0.5" description:"CPU Resource Rquest Pre/Post CD"`
	CdReqMem                         string                          `env:"CD_REQ_CI_MEM" envDefault:"3G" description:"Memory Resource Rquest Pre/Post CD"`
	CdTaintKey                       string                          `env:"CD_NODE_TAINTS_KEY" envDefault:"dedicated" description:"Toleration key for Pre/Post CD"`
	ExternalCdTaintKey               string                          `env:"EXTERNAL_CD_NODE_TAINTS_KEY" envDefault:"dedicated"`
	UseExternalNode                  bool                            `` /* 327-byte string literal not displayed */
	CdWorkflowServiceAccount         string                          `env:"CD_WORKFLOW_SERVICE_ACCOUNT" envDefault:"cd-runner" description:"Service account to be used in Pre/Post CD pod"`
	CdDefaultBuildLogsKeyPrefix      string                          `env:"DEFAULT_BUILD_LOGS_KEY_PREFIX" `
	CdDefaultArtifactKeyPrefix       string                          `env:"DEFAULT_CD_ARTIFACT_KEY_LOCATION" description:"Bucket prefix for build cache"`
	CdTaintValue                     string                          `env:"CD_NODE_TAINTS_VALUE" envDefault:"ci" description:"Toleration value for Pre/Post CD"`
	ExternalCdTaintValue             string                          `env:"EXTERNAL_CD_NODE_TAINTS_VALUE" envDefault:"ci"`
	CdDefaultBuildLogsBucket         string                          `env:"DEFAULT_BUILD_LOGS_BUCKET" description:"Bucket name for build logs"`
	CdNodeLabelSelector              []string                        `env:"CD_NODE_LABEL_SELECTOR" description:"Node label selector for  Pre/Post CD"`
	ExternalCdNodeLabelSelector      []string                        `` /* 380-byte string literal not displayed */
	CdDefaultNamespace               string                          `env:"DEFAULT_CD_NAMESPACE" description:"Namespace for devtron stack"`
	CdDefaultImage                   string                          `env:"DEFAULT_CI_IMAGE"`
	CdDefaultTimeout                 int64                           `env:"DEFAULT_CD_TIMEOUT" envDefault:"3600" description:"Timeout for Pre/Post-Cd to be completed"`
	CdDefaultCdLogsBucketRegion      string                          `env:"DEFAULT_CD_LOGS_BUCKET_REGION" `
	WfControllerInstanceID           string                          `env:"WF_CONTROLLER_INSTANCE_ID" envDefault:"devtron-runner" description:"Workflow controller instance ID."`
	CdDefaultAddressPoolBaseCidr     string                          `env:"CD_DEFAULT_ADDRESS_POOL_BASE_CIDR" description:"To pass the IP cidr for Pre/Post cd "`
	CdDefaultAddressPoolSize         int                             `env:"CD_DEFAULT_ADDRESS_POOL_SIZE" description:"The subnet size to allocate from the base pool for CD"`
	ExposeCDMetrics                  bool                            `env:"EXPOSE_CD_METRICS" envDefault:"false" description:"To expose CD metrics"`
	UseBlobStorageConfigInCdWorkflow bool                            `env:"USE_BLOB_STORAGE_CONFIG_IN_CD_WORKFLOW" envDefault:"true" description:"To enable blob storage in pre and post cd"`
	CdWorkflowExecutorType           cdWorkflow.WorkflowExecutorType `env:"CD_WORKFLOW_EXECUTOR_TYPE" envDefault:"AWF" description:"Executor type for Pre/Post CD(AWF,System)"`
	TerminationGracePeriod           int                             `` /* 149-byte string literal not displayed */
	MaxCdWorkflowRunnerRetries       int                             `` /* 134-byte string literal not displayed */

	// common in both ciconfig and cd config
	Type                           string
	Mode                           string `env:"MODE" envDefault:"DEV"`
	OrchestratorHost               string `` /* 144-byte string literal not displayed */
	OrchestratorToken              string `env:"ORCH_TOKEN" envDefault:"" description:"Orchestrator token"`
	ClusterConfig                  *rest.Config
	CloudProvider                  blob_storage.BlobStorageType `env:"BLOB_STORAGE_PROVIDER" envDefault:"S3" description:"Blob storage provider name(AWS/GCP/Azure)"`
	BlobStorageEnabled             bool                         `env:"BLOB_STORAGE_ENABLED" envDefault:"false" description:"To enable blob storage"`
	BlobStorageS3AccessKey         string                       `env:"BLOB_STORAGE_S3_ACCESS_KEY" description:"S3 access key for s3 blob storage"`
	BlobStorageS3SecretKey         string                       `env:"BLOB_STORAGE_S3_SECRET_KEY" description:"Secret key for s3 blob storage"`
	BlobStorageS3Endpoint          string                       `env:"BLOB_STORAGE_S3_ENDPOINT" description:"S3 endpoint URL for s3 blob storage"`
	BlobStorageS3EndpointInsecure  bool                         `env:"BLOB_STORAGE_S3_ENDPOINT_INSECURE" envDefault:"false" description:"To use insecure s3 endpoint"`
	BlobStorageS3BucketVersioned   bool                         `env:"BLOB_STORAGE_S3_BUCKET_VERSIONED" envDefault:"true" description:"To enable buctet versioning for blob storage"`
	BlobStorageGcpCredentialJson   string                       `env:"BLOB_STORAGE_GCP_CREDENTIALS_JSON" description:"GCP cred json for GCS blob storage"`
	AzureAccountName               string                       `env:"AZURE_ACCOUNT_NAME" description:"Account name for azure blob storage"`
	AzureGatewayUrl                string                       `env:"AZURE_GATEWAY_URL" envDefault:"http://devtron-minio.devtroncd:9000" description:"Sent to CI runner for blob"`
	AzureGatewayConnectionInsecure bool                         `env:"AZURE_GATEWAY_CONNECTION_INSECURE" envDefault:"true" description:"Azure gateway connection allows insecure if true"`
	AzureBlobContainerCiLog        string                       `env:"AZURE_BLOB_CONTAINER_CI_LOG" description:"Log bucket for azure blob storage"`
	AzureBlobContainerCiCache      string                       `env:"AZURE_BLOB_CONTAINER_CI_CACHE" description:"Cache bucket name for azure blob storage"`
	AzureAccountKey                string                       `env:"AZURE_ACCOUNT_KEY" description:"If blob storage is being used of azure then pass the secret key to access the bucket"`
	BuildLogTTLValue               int                          `` /* 146-byte string literal not displayed */
	BaseLogLocationPath            string                       `env:"BASE_LOG_LOCATION_PATH" envDefault:"/home/devtron/" description:"Used to store, download logs of ci workflow, artifact"`
	InAppLoggingEnabled            bool                         `` /* 186-byte string literal not displayed */
	BuildxProvenanceMode           string                       `` // provenance is set to false if this flag is not set
	/* 397-byte string literal not displayed */
	ExtBlobStorageCmName                       string `` /* 365-byte string literal not displayed */
	ExtBlobStorageSecretName                   string `` /* 385-byte string literal not displayed */
	UseArtifactListingQueryV2                  bool   `env:"USE_ARTIFACT_LISTING_QUERY_V2" envDefault:"true" description:"To use the V2 query for listing artifacts"`
	UseImageTagFromGitProviderForTagBasedBuild bool   `` // this is being done for https://github.com/devtron-labs/devtron/issues/4263
	/* 148-byte string literal not displayed */
	UseDockerApiToGetDigest      bool `` /* 282-byte string literal not displayed */
	EnableWorkflowExecutionStage bool `` /* 163-byte string literal not displayed */
}

CATEGORY=CI_RUNNER

func GetCiCdConfig

func GetCiCdConfig() (*CiCdConfig, error)

func (*CiCdConfig) GetArtifactLocationFormat

func (impl *CiCdConfig) GetArtifactLocationFormat() string

func (*CiCdConfig) GetDefaultAddressPoolBaseCidr

func (impl *CiCdConfig) GetDefaultAddressPoolBaseCidr() string

func (*CiCdConfig) GetDefaultAddressPoolSize

func (impl *CiCdConfig) GetDefaultAddressPoolSize() int

func (*CiCdConfig) GetDefaultBuildLogsBucket

func (impl *CiCdConfig) GetDefaultBuildLogsBucket() string

func (*CiCdConfig) GetDefaultBuildLogsKeyPrefix

func (impl *CiCdConfig) GetDefaultBuildLogsKeyPrefix() string

func (*CiCdConfig) GetDefaultCdLogsBucketRegion

func (impl *CiCdConfig) GetDefaultCdLogsBucketRegion() string

func (*CiCdConfig) GetDefaultImage

func (impl *CiCdConfig) GetDefaultImage() string

func (*CiCdConfig) GetDefaultNamespace

func (impl *CiCdConfig) GetDefaultNamespace() string

func (*CiCdConfig) GetDefaultTimeout

func (impl *CiCdConfig) GetDefaultTimeout() int64

func (*CiCdConfig) GetLimitCpu

func (impl *CiCdConfig) GetLimitCpu() string

func (*CiCdConfig) GetLimitMem

func (impl *CiCdConfig) GetLimitMem() string

func (*CiCdConfig) GetReqCpu

func (impl *CiCdConfig) GetReqCpu() string

func (*CiCdConfig) GetReqMem

func (impl *CiCdConfig) GetReqMem() string

func (*CiCdConfig) GetTaintKey

func (impl *CiCdConfig) GetTaintKey() string

func (*CiCdConfig) GetTaintValue

func (impl *CiCdConfig) GetTaintValue() string

func (*CiCdConfig) GetWorkflowExecutorType

func (impl *CiCdConfig) GetWorkflowExecutorType() cdWorkflow.WorkflowExecutorType

func (*CiCdConfig) GetWorkflowServiceAccount

func (impl *CiCdConfig) GetWorkflowServiceAccount() string

func (*CiCdConfig) GetWorkflowVolumeAndVolumeMounts

func (impl *CiCdConfig) GetWorkflowVolumeAndVolumeMounts() ([]v12.Volume, []v12.VolumeMount, error)

func (*CiCdConfig) WorkflowRetriesEnabled

func (impl *CiCdConfig) WorkflowRetriesEnabled() bool

type CiCdTriggerEvent

type CiCdTriggerEvent struct {
	Type                  string           `json:"type"`
	CommonWorkflowRequest *WorkflowRequest `json:"commonWorkflowRequest"`
}

type CiConfig

type CiConfig struct {
	*CiCdConfig
}

func GetCiConfig

func GetCiConfig() (*CiConfig, error)

type CiTriggerAuditRequest added in v1.8.0

type CiTriggerAuditRequest struct {
	WorkflowId int
	*CommonAuditRequest
}

CiTriggerAuditRequest represents the request for CI trigger audit

type CiTriggerRequest added in v1.8.0

type CiTriggerRequest struct {
	PipelineId            int
	CommitHashes          map[int]pipelineConfig.GitCommit
	CiMaterials           []*pipelineConfig.CiPipelineMaterial
	TriggeredBy           int32
	InvalidateCache       bool
	RuntimeParameters     *common.RuntimeParameters // extra env variables which will be used for CI
	EnvironmentId         int
	PipelineType          string
	CiArtifactLastFetch   time.Time
	ReferenceCiWorkflowId int
	// below fields used at the time of retrigger
	IsRetrigger              bool
	RetriggerWorkflowRequest *WorkflowRequest
	RetriggerCiWorkflow      *pipelineConfig.CiWorkflow
}

func (*CiTriggerRequest) BuildTriggerObject added in v1.8.0

func (obj *CiTriggerRequest) BuildTriggerObject(refCiWorkflow *pipelineConfig.CiWorkflow,
	ciMaterials []*pipelineConfig.CiPipelineMaterial, triggeredBy int32,
	invalidateCache bool, runtimeParameters *common.RuntimeParameters,
	pipelineType string)

type CiVolumeMount

type CiVolumeMount struct {
	Name               string `json:"name"`
	HostMountPath      string `json:"hostMountPath"`
	ContainerMountPath string `json:"containerMountPath"`
}

type CommonAuditRequest added in v1.8.0

type CommonAuditRequest struct {
	WorkflowRequest *WorkflowRequest
	TriggeredBy     int32
	PipelineId      int //ciPipelineId in case auditing ci trigger, else cdPipelineId
}

type ConfigMapSecretDto

type ConfigMapSecretDto struct {
	Name     string
	Data     map[string]string
	OwnerRef v12.OwnerReference
	ConfigMapSecretEntDto
}

type ConfigMapSecretEntDto added in v1.5.1

type ConfigMapSecretEntDto struct {
}

type DbConfigBean

type DbConfigBean struct {
	Id       int    `json:"id,omitempty" validate:"number"`
	Name     string `json:"name,omitempty" validate:"required"` //name by which user identifies this db
	Type     string `json:"type,omitempty" validate:"required"` //type of db, PG, MYsql, MariaDb
	Host     string `json:"host,omitempty" validate:"host"`
	Port     string `json:"port,omitempty" validate:"max=4"`
	DbName   string `json:"dbName,omitempty" validate:"required"` //name of database inside PG
	UserName string `json:"userName,omitempty"`
	Password string `json:"password,omitempty"`
	Active   bool   `json:"active,omitempty"`
	UserId   int32  `json:"-"`
}

type DbMigrationConfigBean

type DbMigrationConfigBean struct {
	Id            int    `json:"id"`
	DbConfigId    int    `json:"dbConfigId"`
	PipelineId    int    `json:"pipelineId"`
	GitMaterialId int    `json:"gitMaterialId"`
	ScriptSource  string `json:"scriptSource"` //location of file in git. relative to git root
	MigrationTool string `json:"migrationTool"`
	Active        bool   `json:"active"`
	UserId        int32  `json:"-"`
}

type DisabledFields

type DisabledFields string

type DockerArtifactStoreBean

type DockerArtifactStoreBean struct {
	Id                      string                       `json:"id" validate:"required"`
	PluginId                string                       `json:"pluginId,omitempty" validate:"required"`
	RegistryURL             string                       `json:"registryUrl" validate:"required"`
	RegistryType            repository.RegistryType      `json:"registryType" validate:"required"`
	IsOCICompliantRegistry  bool                         `json:"isOCICompliantRegistry"`
	OCIRegistryConfig       map[string]string            `json:"ociRegistryConfig,omitempty"`
	IsPublic                bool                         `json:"isPublic"`
	RepositoryList          []string                     `json:"repositoryList,omitempty"`
	AWSAccessKeyId          string                       `json:"awsAccessKeyId,omitempty"`
	AWSSecretAccessKey      string                       `json:"awsSecretAccessKey,omitempty"`
	AWSRegion               string                       `json:"awsRegion,omitempty"`
	Username                string                       `json:"username,omitempty"`
	Password                string                       `json:"password,omitempty"`
	IsDefault               bool                         `json:"isDefault"`
	Connection              string                       `json:"connection"`
	Cert                    string                       `json:"cert"`
	Active                  bool                         `json:"active"`
	DisabledFields          []DisabledFields             `json:"disabledFields"`
	User                    int32                        `json:"-"`
	DockerRegistryIpsConfig *DockerRegistryIpsConfigBean `json:"ipsConfig,omitempty"`
}

type DockerRegistryIpsConfigBean

type DockerRegistryIpsConfigBean struct {
	Id                   int                                        `json:"id"`
	CredentialType       repository.DockerRegistryIpsCredentialType `json:"credentialType,omitempty" validate:"oneof=SAME_AS_REGISTRY NAME CUSTOM_CREDENTIAL"`
	CredentialValue      string                                     `json:"credentialValue,omitempty"`
	AppliedClusterIdsCsv string                                     `json:"appliedClusterIdsCsv,omitempty"`
	IgnoredClusterIdsCsv string                                     `json:"ignoredClusterIdsCsv,omitempty"`
	Active               bool                                       `json:"active,omitempty"`
}

type GitMetadata

type GitMetadata struct {
	GitCommitHash  string `json:"GIT_COMMIT_HASH"`
	GitSourceType  string `json:"GIT_SOURCE_TYPE"`
	GitSourceValue string `json:"GIT_SOURCE_VALUE"`
	GitRepoUrl     string `json:"GIT_REPO_URL"`
}

type GitTriggerInfoResponse

type GitTriggerInfoResponse struct {
	CiMaterials      []buildBean.CiPipelineMaterialResponse `json:"ciMaterials"`
	TriggeredByEmail string                                 `json:"triggeredByEmail"`
	LastDeployedTime string                                 `json:"lastDeployedTime,omitempty"`
	CiPipelineId     int                                    `json:"ciPipelineId"`
	AppId            int                                    `json:"appId"`
	AppName          string                                 `json:"appName"`
	EnvironmentId    int                                    `json:"environmentId"`
	EnvironmentName  string                                 `json:"environmentName"`
	Default          bool                                   `json:"default,omitempty"`
	ImageTaggingData ImageTaggingResponseDTO                `json:"imageTaggingData"`
	Image            string                                 `json:"image"`
	TargetPlatforms  []*bean2.TargetPlatform                `json:"targetPlatforms"`
}

type ImageScanningSteps added in v1.2.2

type ImageScanningSteps struct {
	Steps      []*bean.StepObject `json:"steps"`
	ScanToolId int                `json:"scanToolId"`
}

func NewImageScanningStepsDto added in v1.2.2

func NewImageScanningStepsDto() *ImageScanningSteps

func (*ImageScanningSteps) WithScanToolId added in v1.2.2

func (r *ImageScanningSteps) WithScanToolId(scanToolId int) *ImageScanningSteps

func (*ImageScanningSteps) WithSteps added in v1.2.2

func (r *ImageScanningSteps) WithSteps(steps []*bean.StepObject) *ImageScanningSteps

type ImageTaggingRequestDTO

type ImageTaggingRequestDTO struct {
	CreateTags     []*repository.ImageTag  `json:"createTags"`
	SoftDeleteTags []*repository.ImageTag  `json:"softDeleteTags"`
	ImageComment   repository.ImageComment `json:"imageComment"`
	HardDeleteTags []*repository.ImageTag  `json:"hardDeleteTags"`
	ExternalCi     bool                    `json:"-"`
}

type ImageTaggingResponseDTO

type ImageTaggingResponseDTO struct {
	ImageReleaseTags           []*repository.ImageTag   `json:"imageReleaseTags"`
	AppReleaseTags             []string                 `json:"appReleaseTags"`
	ImageComment               *repository.ImageComment `json:"imageComment"`
	ProdEnvExists              bool                     `json:"tagsEditable"`
	HideImageTaggingHardDelete bool                     `json:"hideImageTaggingHardDelete"`
}

type Task

type Task struct {
	Id             int    `json:"id,omitempty"`
	Index          int    `json:"index,omitempty"`
	Name           string `json:"name" yaml:"name"`
	Script         string `json:"script" yaml:"script"`
	OutputLocation string `json:"outputLocation" yaml:"outputLocation"` // file/dir
	RunStatus      bool   `json:"-,omitempty"`                          // task run was attempted or not
}

type TaskYaml

type TaskYaml struct {
	Version          string             `yaml:"version"`
	CdPipelineConfig []CdPipelineConfig `yaml:"cdPipelineConf"`
}

type WorkflowCacheConfig added in v1.2.1

type WorkflowCacheConfig struct {
	IgnoreCI    bool `json:"ignoreCI"`
	IgnoreCIJob bool `json:"ignoreCIJob"`
	IgnoreJob   bool `json:"ignoreJob"`
}

type WorkflowRequest

type WorkflowRequest struct {
	WorkflowNamePrefix          string                            `json:"workflowNamePrefix"`
	PipelineName                string                            `json:"pipelineName"`
	PipelineId                  int                               `json:"pipelineId"`
	DockerImageTag              string                            `json:"dockerImageTag"`
	DockerRegistryId            string                            `json:"dockerRegistryId"`
	DockerRegistryType          string                            `json:"dockerRegistryType"`
	DockerRegistryURL           string                            `json:"dockerRegistryURL"`
	DockerConnection            string                            `json:"dockerConnection"`
	DockerCert                  string                            `json:"dockerCert"`
	DockerRepository            string                            `json:"dockerRepository"`
	CheckoutPath                string                            `json:"checkoutPath"`
	DockerUsername              string                            `json:"dockerUsername"`
	DockerPassword              string                            `json:"dockerPassword"`
	AwsRegion                   string                            `json:"awsRegion"`
	AccessKey                   string                            `json:"accessKey"`
	SecretKey                   string                            `json:"secretKey"`
	CiCacheLocation             string                            `json:"ciCacheLocation"`
	CiCacheRegion               string                            `json:"ciCacheRegion"`
	CiCacheFileName             string                            `json:"ciCacheFileName"`
	CiProjectDetails            []bean.CiProjectDetails           `json:"ciProjectDetails"`
	ContainerResources          bean.ContainerResources           `json:"containerResources"`
	ActiveDeadlineSeconds       int64                             `json:"activeDeadlineSeconds"`
	CiImage                     string                            `json:"ciImage"`
	Namespace                   string                            `json:"namespace"`
	WorkflowId                  int                               `json:"workflowId"`
	TriggeredBy                 int32                             `json:"triggeredBy"`
	CacheLimit                  int64                             `json:"cacheLimit"`
	BeforeDockerBuildScripts    []*bean2.CiScript                 `json:"beforeDockerBuildScripts"`
	AfterDockerBuildScripts     []*bean2.CiScript                 `json:"afterDockerBuildScripts"`
	CiArtifactLocation          string                            `json:"ciArtifactLocation"`
	CiArtifactBucket            string                            `json:"ciArtifactBucket"`
	CiArtifactFileName          string                            `json:"ciArtifactFileName"`
	CiArtifactRegion            string                            `json:"ciArtifactRegion"`
	ScanEnabled                 bool                              `json:"scanEnabled"`
	CloudProvider               blob_storage.BlobStorageType      `json:"cloudProvider"`
	BlobStorageConfigured       bool                              `json:"blobStorageConfigured"`
	BlobStorageS3Config         *blob_storage.BlobStorageS3Config `json:"blobStorageS3Config"`
	AzureBlobConfig             *blob_storage.AzureBlobConfig     `json:"azureBlobConfig"`
	GcpBlobConfig               *blob_storage.GcpBlobConfig       `json:"gcpBlobConfig"`
	BlobStorageLogsKey          string                            `json:"blobStorageLogsKey"`
	InAppLoggingEnabled         bool                              `json:"inAppLoggingEnabled"`
	DefaultAddressPoolBaseCidr  string                            `json:"defaultAddressPoolBaseCidr"`
	DefaultAddressPoolSize      int                               `json:"defaultAddressPoolSize"`
	PreCiSteps                  []*bean.StepObject                `json:"preCiSteps"`
	PostCiSteps                 []*bean.StepObject                `json:"postCiSteps"`
	RefPlugins                  []*bean.RefPluginObject           `json:"refPlugins"`
	AppName                     string                            `json:"appName"`
	TriggerByAuthor             string                            `json:"triggerByAuthor"`
	CiBuildConfig               *bean5.CiBuildConfigBean          `json:"ciBuildConfig"`
	CiBuildDockerMtuValue       int                               `json:"ciBuildDockerMtuValue"`
	IgnoreDockerCachePush       bool                              `json:"ignoreDockerCachePush"`
	IgnoreDockerCachePull       bool                              `json:"ignoreDockerCachePull"`
	CacheInvalidate             bool                              `json:"cacheInvalidate"`
	IsPvcMounted                bool                              `json:"IsPvcMounted"`
	RuntimeEnvironmentVariables map[string]string                 `json:"runtimeEnvironmentVariables"`
	SystemEnvironmentVariables  map[string]string                 `json:"systemEnvironmentVariables"`
	EnableBuildContext          bool                              `json:"enableBuildContext"`
	AppId                       int                               `json:"appId"`
	EnvironmentId               int                               `json:"environmentId"`
	OrchestratorHost            string                            `json:"orchestratorHost"`
	OrchestratorToken           string                            `json:"orchestratorToken"`
	IsExtRun                    bool                              `json:"isExtRun"`
	ImageRetryCount             int                               `json:"imageRetryCount"`
	ImageRetryInterval          int                               `json:"imageRetryInterval"`
	IsReTrigger                 bool                              `json:"isReTrigger"`
	ReferenceCiWorkflowId       int                               `json:"referenceCiWorkflowId"` // data filled when retriggering a ci workflow
	// Data from CD Workflow service
	WorkflowRunnerId            int                                  `json:"workflowRunnerId"`
	CdPipelineId                int                                  `json:"cdPipelineId"`
	StageYaml                   string                               `json:"stageYaml"`
	ArtifactLocation            string                               `json:"artifactLocation"`
	CiArtifactDTO               CiArtifactDTO                        `json:"ciArtifactDTO"`
	CdImage                     string                               `json:"cdImage"`
	StageType                   string                               `json:"stageType"`
	CdCacheLocation             string                               `json:"cdCacheLocation"`
	CdCacheRegion               string                               `json:"cdCacheRegion"`
	WorkflowPrefixForLog        string                               `json:"workflowPrefixForLog"`
	DeploymentTriggeredBy       string                               `json:"deploymentTriggeredBy,omitempty"`
	DeploymentTriggerTime       time.Time                            `json:"deploymentTriggerTime,omitempty"`
	DeploymentReleaseCounter    int                                  `json:"deploymentReleaseCounter,omitempty"`
	WorkflowExecutor            cdWorkflow.WorkflowExecutorType      `json:"workflowExecutor"`
	PrePostDeploySteps          []*bean.StepObject                   `json:"prePostDeploySteps"`
	CiArtifactLastFetch         time.Time                            `json:"ciArtifactLastFetch"`
	CiPipelineType              string                               `json:"ciPipelineType"`
	UseExternalClusterBlob      bool                                 `json:"useExternalClusterBlob"`
	RegistryDestinationImageMap map[string][]string                  `json:"registryDestinationImageMap"`
	RegistryCredentialMap       map[string]bean4.RegistryCredentials `json:"registryCredentialMap"`
	PluginArtifactStage         string                               `json:"pluginArtifactStage"`
	PushImageBeforePostCI       bool                                 `json:"pushImageBeforePostCI"`
	ImageScanMaxRetries         int                                  `json:"imageScanMaxRetries,omitempty"`
	ImageScanRetryDelay         int                                  `json:"imageScanRetryDelay,omitempty"`
	Type                        bean.WorkflowPipelineType
	Pipeline                    *pipelineConfig.Pipeline
	Env                         *repository4.Environment
	AppLabels                   map[string]string
	Scope                       resourceQualifiers.Scope
	BuildxCacheModeMin          bool   `json:"buildxCacheModeMin"`
	AsyncBuildxCacheExport      bool   `json:"asyncBuildxCacheExport"`
	BuildxInterruptionMaxRetry  int    `json:"buildxInterruptionMaxRetry"`
	UseDockerApiToGetDigest     bool   `json:"useDockerApiToGetDigest"`
	HostUrl                     string `json:"hostUrl"`
	WorkflowRequestEnt
}

func (*WorkflowRequest) AddInfraConfigurations added in v1.2.2

func (workflowRequest *WorkflowRequest) AddInfraConfigurations(workflowTemplate *bean.WorkflowTemplate, infraConfiguration *infraBean.InfraConfig)

func (*WorkflowRequest) AddNodeConstraintsFromConfig

func (workflowRequest *WorkflowRequest) AddNodeConstraintsFromConfig(workflowTemplate *bean.WorkflowTemplate, config *CiCdConfig)

func (*WorkflowRequest) CheckBlobStorageConfig

func (workflowRequest *WorkflowRequest) CheckBlobStorageConfig(config *CiCdConfig) bool

func (*WorkflowRequest) CompressWorkflowRequest added in v1.8.0

func (workflowRequest *WorkflowRequest) CompressWorkflowRequest() (string, error)

CompressWorkflowRequest compresses WorkflowRequest to bytes

func (*WorkflowRequest) DecompressWorkflowRequest added in v1.8.0

func (workflowRequest *WorkflowRequest) DecompressWorkflowRequest(compressedData string) error

DecompressWorkflowRequest decompresses bytes to WorkflowRequest

func (*WorkflowRequest) GetBlobStorageLogsKey

func (workflowRequest *WorkflowRequest) GetBlobStorageLogsKey(config *CiCdConfig) string

func (*WorkflowRequest) GetConfiguredCmCs

func (workflowRequest *WorkflowRequest) GetConfiguredCmCs() (map[string]bool, map[string]bool, error)

func (*WorkflowRequest) GetEventTypeForWorkflowRequest

func (workflowRequest *WorkflowRequest) GetEventTypeForWorkflowRequest() string

func (*WorkflowRequest) GetExistingCmCsNamePrefix

func (workflowRequest *WorkflowRequest) GetExistingCmCsNamePrefix() string

func (*WorkflowRequest) GetGlobalCmCsNamePrefix

func (workflowRequest *WorkflowRequest) GetGlobalCmCsNamePrefix() string

func (*WorkflowRequest) GetLimitReqCpuMem

func (workflowRequest *WorkflowRequest) GetLimitReqCpuMem(config *CiCdConfig, infraConfigurations *infraBean.InfraConfig) v1.ResourceRequirements

func (*WorkflowRequest) GetNodeConstraints

func (workflowRequest *WorkflowRequest) GetNodeConstraints(config *CiCdConfig) *bean.NodeConstraints

func (*WorkflowRequest) GetPipelineTypeForGlobalCMCS added in v0.7.0

func (workflowRequest *WorkflowRequest) GetPipelineTypeForGlobalCMCS() string

func (*WorkflowRequest) GetWorkflowJson

func (workflowRequest *WorkflowRequest) GetWorkflowJson(config *CiCdConfig) ([]byte, error)

func (*WorkflowRequest) GetWorkflowMainContainer

func (workflowRequest *WorkflowRequest) GetWorkflowMainContainer(config *CiCdConfig, infraConfigurations *infraBean.InfraConfig, workflowJson []byte, workflowTemplate *bean.WorkflowTemplate, workflowConfigMaps []apiBean.ConfigSecretMap, workflowSecrets []apiBean.ConfigSecretMap) (v1.Container, error)

func (*WorkflowRequest) GetWorkflowTemplate

func (workflowRequest *WorkflowRequest) GetWorkflowTemplate(workflowJson []byte, config *CiCdConfig) bean.WorkflowTemplate

func (*WorkflowRequest) GetWorkflowTypeForWorkflowRequest

func (workflowRequest *WorkflowRequest) GetWorkflowTypeForWorkflowRequest() string

func (*WorkflowRequest) IsCdStageTypePost added in v1.8.0

func (workflowRequest *WorkflowRequest) IsCdStageTypePost() bool

func (*WorkflowRequest) IsCdStageTypePre added in v1.8.0

func (workflowRequest *WorkflowRequest) IsCdStageTypePre() bool

func (*WorkflowRequest) IsCiRetriggerType added in v1.8.0

func (workflowRequest *WorkflowRequest) IsCiRetriggerType() bool

func (*WorkflowRequest) IsCiTypeWorkflowRequest added in v1.8.0

func (workflowRequest *WorkflowRequest) IsCiTypeWorkflowRequest() bool

func (*WorkflowRequest) IsDevtronCI added in v1.2.2

func (workflowRequest *WorkflowRequest) IsDevtronCI() bool

func (*WorkflowRequest) IsDevtronJob added in v1.2.2

func (workflowRequest *WorkflowRequest) IsDevtronJob() bool

func (*WorkflowRequest) ModifyConfigSecretMap added in v1.5.1

func (workflowRequest *WorkflowRequest) ModifyConfigSecretMap(workflowConfigSecretMap apiBean.ConfigSecretMap, configType apiBean.ConfigType) apiBean.ConfigSecretMap

func (*WorkflowRequest) SetEntOnlyFields added in v1.5.1

func (workflowRequest *WorkflowRequest) SetEntOnlyFields(trigger *CiTriggerRequest, ciConfig *CiConfig)

func (*WorkflowRequest) SetExecuteImageScanningVia added in v1.2.2

func (workflowRequest *WorkflowRequest) SetExecuteImageScanningVia(scanVia bean2.ScanExecutionMedium)

func (*WorkflowRequest) SetImageScanningSteps added in v1.2.2

func (workflowRequest *WorkflowRequest) SetImageScanningSteps(imageScanningSteps []*ImageScanningSteps)

type WorkflowRequestEnt added in v1.5.1

type WorkflowRequestEnt struct {
}

type WorkflowResponse

type WorkflowResponse struct {
	Id                     int                                    `json:"id"`
	Name                   string                                 `json:"name"`
	Status                 string                                 `json:"status"`
	PodStatus              string                                 `json:"podStatus"`
	Message                string                                 `json:"message"`
	StartedOn              time.Time                              `json:"startedOn"`
	FinishedOn             time.Time                              `json:"finishedOn"`
	CiPipelineId           int                                    `json:"ciPipelineId"`
	Namespace              string                                 `json:"namespace"`
	LogLocation            string                                 `json:"logLocation"`
	BlobStorageEnabled     bool                                   `json:"blobStorageEnabled"`
	GitTriggers            map[int]pipelineConfig.GitCommit       `json:"gitTriggers"`
	CiMaterials            []buildBean.CiPipelineMaterialResponse `json:"ciMaterials"`
	TriggeredBy            int32                                  `json:"triggeredBy"`
	Artifact               string                                 `json:"artifact"`
	TriggeredByEmail       string                                 `json:"triggeredByEmail"`
	Stage                  string                                 `json:"stage"`
	ArtifactId             int                                    `json:"artifactId"`
	IsArtifactUploaded     bool                                   `json:"isArtifactUploaded"`
	IsVirtualEnvironment   bool                                   `json:"isVirtualEnvironment"`
	PodName                string                                 `json:"podName"`
	EnvironmentId          int                                    `json:"environmentId"`
	EnvironmentName        string                                 `json:"environmentName"`
	ImageReleaseTags       []*repository3.ImageTag                `json:"imageReleaseTags"`
	ImageComment           *repository3.ImageComment              `json:"imageComment"`
	AppWorkflowId          int                                    `json:"appWorkflowId"`
	CustomTag              *apiBean.CustomTagErrorResponse        `json:"customTag,omitempty"`
	PipelineType           string                                 `json:"pipelineType"`
	ReferenceWorkflowId    int                                    `json:"referenceWorkflowId"`
	TargetPlatforms        []*commonBean.TargetPlatform           `json:"targetPlatforms"`
	WorkflowExecutionStage map[string][]*bean6.WorkflowStageDto   `json:"workflowExecutionStages"`
}

type WorkflowStatus added in v0.6.26

type WorkflowStatus struct {
	WorkflowName, Status, PodStatus, Message, LogLocation, PodName string
}

type WorkflowType added in v1.8.0

type WorkflowType string
const (
	CI_WORKFLOW_TYPE      WorkflowType = "CI"
	PRE_CD_WORKFLOW_TYPE  WorkflowType = "PRE_CD"
	POST_CD_WORKFLOW_TYPE WorkflowType = "POST_CD"
)

Jump to

Keyboard shortcuts

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