Documentation
¶
Index ¶
- Constants
- func DecodeSecretKey(secretKey string) string
- func GetNodeLabel(cfg *CiCdConfig, pipelineType bean.WorkflowPipelineType, isExt bool) (map[string]string, error)
- func UpdateContainerEnvsFromCmCs(workflowMainContainer *v1.Container, configMaps []bean3.ConfigSecretMap, ...)
- type AppLabelMetadata
- type ArtifactsForCiJob
- type BuildLogRequest
- type CdConfig
- type CdPipelineConfig
- type ChildCdMetadata
- type CiArtifactDTO
- type CiCdConfig
- func (impl *CiCdConfig) GetArtifactLocationFormat() string
- func (impl *CiCdConfig) GetDefaultAddressPoolBaseCidr() string
- func (impl *CiCdConfig) GetDefaultAddressPoolSize() int
- func (impl *CiCdConfig) GetDefaultArtifactKeyPrefix() string
- func (impl *CiCdConfig) GetDefaultBuildLogsBucket() string
- func (impl *CiCdConfig) GetDefaultBuildLogsKeyPrefix() string
- func (impl *CiCdConfig) GetDefaultCdLogsBucketRegion() string
- func (impl *CiCdConfig) GetDefaultImage() string
- func (impl *CiCdConfig) GetDefaultNamespace() string
- func (impl *CiCdConfig) GetDefaultTimeout() int64
- func (impl *CiCdConfig) GetLimitCpu() string
- func (impl *CiCdConfig) GetLimitMem() string
- func (impl *CiCdConfig) GetReqCpu() string
- func (impl *CiCdConfig) GetReqMem() string
- func (impl *CiCdConfig) GetTaintKey() string
- func (impl *CiCdConfig) GetTaintValue() string
- func (impl *CiCdConfig) GetWorkflowExecutorType() pipelineConfig.WorkflowExecutorType
- func (impl *CiCdConfig) GetWorkflowServiceAccount() string
- func (impl *CiCdConfig) GetWorkflowVolumeAndVolumeMounts() ([]v12.Volume, []v12.VolumeMount, error)
- func (impl *CiCdConfig) WorkflowRetriesEnabled() bool
- type CiCdTriggerEvent
- type CiConfig
- type CiVolumeMount
- type ConfigMapSecretDto
- type DbConfigBean
- type DbMigrationConfigBean
- type DisabledFields
- type DockerArtifactStoreBean
- type DockerRegistryIpsConfigBean
- type GitHostRequest
- type GitMetadata
- type GitRegistry
- type GitTriggerInfoResponse
- type ImageTaggingRequestDTO
- type ImageTaggingResponseDTO
- type Task
- type TaskYaml
- type Trigger
- type WorkflowRequest
- func (workflowRequest *WorkflowRequest) AddNodeConstraintsFromConfig(workflowTemplate *bean.WorkflowTemplate, config *CiCdConfig)
- func (workflowRequest *WorkflowRequest) CheckBlobStorageConfig(config *CiCdConfig) bool
- func (workflowRequest *WorkflowRequest) CheckForJob() bool
- func (workflowRequest *WorkflowRequest) GetBlobStorageLogsKey(config *CiCdConfig) string
- func (workflowRequest *WorkflowRequest) GetConfiguredCmCs() (map[string]bool, map[string]bool, error)
- func (workflowRequest *WorkflowRequest) GetEventTypeForWorkflowRequest() string
- func (workflowRequest *WorkflowRequest) GetExistingCmCsNamePrefix() string
- func (workflowRequest *WorkflowRequest) GetGlobalCmCsNamePrefix() string
- func (workflowRequest *WorkflowRequest) GetLimitReqCpuMem(config *CiCdConfig, infraConfigurations *infraConfig.InfraConfig) v1.ResourceRequirements
- func (workflowRequest *WorkflowRequest) GetNodeConstraints(config *CiCdConfig) *bean.NodeConstraints
- func (workflowRequest *WorkflowRequest) GetPipelineTypeForGlobalCMCS() string
- func (workflowRequest *WorkflowRequest) GetWorkflowJson(config *CiCdConfig) ([]byte, error)
- func (workflowRequest *WorkflowRequest) GetWorkflowMainContainer(config *CiCdConfig, infraConfigurations *infraConfig.InfraConfig, ...) (v1.Container, error)
- func (workflowRequest *WorkflowRequest) GetWorkflowTemplate(workflowJson []byte, config *CiCdConfig) bean.WorkflowTemplate
- func (workflowRequest *WorkflowRequest) GetWorkflowTypeForWorkflowRequest() string
- type WorkflowResponse
- type WorkflowStatus
Constants ¶
View Source
const ( ExternalCiWebhookPath = "orchestrator/webhook/ext-ci" DevMode = "DEV" ProdMode = "PROD" CiConfigType = "CiConfig" CdConfigType = "CdConfig" )
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 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 CI_NODE_PVC_ALL_ENV = "devtron.ai/ci-pvc-all"
View Source
const CI_NODE_PVC_PIPELINE_PREFIX = "devtron.ai/ci-pvc"
View Source
const POST = "POST"
View Source
const PRE = "PRE"
Variables ¶
This section is empty.
Functions ¶
func DecodeSecretKey ¶
func GetNodeLabel ¶
func GetNodeLabel(cfg *CiCdConfig, pipelineType bean.WorkflowPipelineType, isExt bool) (map[string]string, error)
func UpdateContainerEnvsFromCmCs ¶
func UpdateContainerEnvsFromCmCs(workflowMainContainer *v1.Container, configMaps []bean3.ConfigSecretMap, secrets []bean3.ConfigSecretMap)
Types ¶
type AppLabelMetadata ¶
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 CdPipelineConfig ¶
type ChildCdMetadata ¶
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"`
DefaultCacheBucketRegion string `env:"DEFAULT_CACHE_BUCKET_REGION" envDefault:"us-east-2"`
CiLogsKeyPrefix string `env:"CI_LOGS_KEY_PREFIX" envDxefault:"my-artifacts"`
CiDefaultImage string `env:"DEFAULT_CI_IMAGE" envDefault:"686244538589.dkr.ecr.us-east-2.amazonaws.com/cirunner:47"`
CiDefaultNamespace string `env:"DEFAULT_NAMESPACE" envDefault:"devtron-ci"`
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:""`
CiTaintValue string `env:"CI_NODE_TAINTS_VALUE" envDefault:""`
CiNodeLabelSelector []string `env:"CI_NODE_LABEL_SELECTOR"`
CacheLimit int64 `env:"CACHE_LIMIT" envDefault:"5000000000"` // TODO: Add to default db config also
CiDefaultBuildLogsKeyPrefix string `env:"DEFAULT_BUILD_LOGS_KEY_PREFIX" envDefault:"arsenal-v1"`
CiDefaultArtifactKeyPrefix string `env:"DEFAULT_ARTIFACT_KEY_LOCATION" envDefault:"arsenal-v1/ci-artifacts"`
CiWorkflowServiceAccount string `env:"WORKFLOW_SERVICE_ACCOUNT" envDefault:"ci-runner"`
ExternalCiApiSecret string `env:"EXTERNAL_CI_API_SECRET" envDefault:"devtroncd-secret"`
ExternalCiWebhookUrl string `env:"EXTERNAL_CI_WEB_HOOK_URL" envDefault:""`
ExternalCiPayload string `` /* 432-byte string literal not displayed */
CiArtifactLocationFormat string `env:"CI_ARTIFACT_LOCATION_FORMAT" envDefault:"%d/%d.zip"`
ImageScannerEndpoint string `env:"IMAGE_SCANNER_ENDPOINT" envDefault:"http://image-scanner-new-demo-devtroncd-service.devtroncd:80"`
CiDefaultAddressPoolBaseCidr string `env:"CI_DEFAULT_ADDRESS_POOL_BASE_CIDR"`
CiDefaultAddressPoolSize int `env:"CI_DEFAULT_ADDRESS_POOL_SIZE"`
CiRunnerDockerMTUValue int `env:"CI_RUNNER_DOCKER_MTU_VALUE" envDefault:"-1"`
IgnoreDockerCacheForCI bool `env:"CI_IGNORE_DOCKER_CACHE"`
VolumeMountsForCiJson string `env:"CI_VOLUME_MOUNTS_JSON"`
BuildPvcCachePath string `env:"PRE_CI_CACHE_PATH" envDefault:"/devtroncd-cache"`
DefaultPvcCachePath string `env:"DOCKER_BUILD_CACHE_PATH" envDefault:"/var/lib/docker"`
BuildxPvcCachePath string `env:"BUILDX_CACHE_PATH" envDefault:"/var/lib/devtron/buildx"`
UseBlobStorageConfigInCiWorkflow bool `env:"USE_BLOB_STORAGE_CONFIG_IN_CI_WORKFLOW" envDefault:"true"`
DefaultTargetPlatform string `env:"DEFAULT_TARGET_PLATFORM" envDefault:""`
UseBuildx bool `env:"USE_BUILDX" envDefault:"false"`
EnableBuildContext bool `env:"ENABLE_BUILD_CONTEXT" envDefault:"false"`
ImageRetryCount int `env:"IMAGE_RETRY_COUNT" envDefault:"0"`
ImageRetryInterval int `env:"IMAGE_RETRY_INTERVAL" envDefault:"5"` // image retry interval takes value in seconds
CiWorkflowExecutorType pipelineConfig.WorkflowExecutorType `env:"CI_WORKFLOW_EXECUTOR_TYPE" envDefault:"AWF"`
BuildxK8sDriverOptions string `env:"BUILDX_K8S_DRIVER_OPTIONS" envDefault:""`
CIAutoTriggerBatchSize int `env:"CI_SUCCESS_AUTO_TRIGGER_BATCH_SIZE" envDefault:"1"`
SkipCreatingEcrRepo bool `env:"SKIP_CREATING_ECR_REPO" envDefault:"false"`
MaxCiWorkflowRetries int `env:"MAX_CI_WORKFLOW_RETRIES" envDefault:"0"`
NatsServerHost string `env:"NATS_SERVER_HOST" envDefault:"nats://devtron-nats.devtroncd:4222"`
ImageScanMaxRetries int `env:"IMAGE_SCAN_MAX_RETRIES" envDefault:"3"`
ImageScanRetryDelay int `env:"IMAGE_SCAN_RETRY_DELAY" envDefault:"5"`
ShowDockerBuildCmdInLogs bool `env:"SHOW_DOCKER_BUILD_ARGS" envDefault:"true"`
IgnoreCmCsInCiJob bool `env:"IGNORE_CM_CS_IN_CI_JOB" envDefault:"false"`
SkipCiJobBuildCachePushPull bool `env:"SKIP_CI_JOB_BUILD_CACHE_PUSH_PULL" envDefault:"false"`
// from CdConfig
CdLimitCpu string `env:"CD_LIMIT_CI_CPU" envDefault:"0.5"`
CdLimitMem string `env:"CD_LIMIT_CI_MEM" envDefault:"3G"`
CdReqCpu string `env:"CD_REQ_CI_CPU" envDefault:"0.5"`
CdReqMem string `env:"CD_REQ_CI_MEM" envDefault:"3G"`
CdTaintKey string `env:"CD_NODE_TAINTS_KEY" envDefault:"dedicated"`
ExternalCdTaintKey string `env:"EXTERNAL_CD_NODE_TAINTS_KEY" envDefault:"dedicated"`
UseExternalNode bool `env:"USE_EXTERNAL_NODE" envDefault:"false"`
CdWorkflowServiceAccount string `env:"CD_WORKFLOW_SERVICE_ACCOUNT" envDefault:"cd-runner"`
CdDefaultBuildLogsKeyPrefix string `env:"DEFAULT_BUILD_LOGS_KEY_PREFIX" `
CdDefaultArtifactKeyPrefix string `env:"DEFAULT_CD_ARTIFACT_KEY_LOCATION" `
CdTaintValue string `env:"CD_NODE_TAINTS_VALUE" envDefault:"ci"`
ExternalCdTaintValue string `env:"EXTERNAL_CD_NODE_TAINTS_VALUE" envDefault:"ci"`
CdDefaultBuildLogsBucket string `env:"DEFAULT_BUILD_LOGS_BUCKET" `
CdNodeLabelSelector []string `env:"CD_NODE_LABEL_SELECTOR"`
ExternalCdNodeLabelSelector []string `env:"EXTERNAL_CD_NODE_LABEL_SELECTOR"`
CdArtifactLocationFormat string `env:"CD_ARTIFACT_LOCATION_FORMAT" envDefault:"%d/%d.zip"`
CdDefaultNamespace string `env:"DEFAULT_CD_NAMESPACE"`
CdDefaultImage string `env:"DEFAULT_CI_IMAGE"`
CdDefaultTimeout int64 `env:"DEFAULT_CD_TIMEOUT" envDefault:"3600"`
CdDefaultCdLogsBucketRegion string `env:"DEFAULT_CD_LOGS_BUCKET_REGION" `
WfControllerInstanceID string `env:"WF_CONTROLLER_INSTANCE_ID" envDefault:"devtron-runner"`
CdDefaultAddressPoolBaseCidr string `env:"CD_DEFAULT_ADDRESS_POOL_BASE_CIDR"`
CdDefaultAddressPoolSize int `env:"CD_DEFAULT_ADDRESS_POOL_SIZE"`
ExposeCDMetrics bool `env:"EXPOSE_CD_METRICS" envDefault:"false"`
UseBlobStorageConfigInCdWorkflow bool `env:"USE_BLOB_STORAGE_CONFIG_IN_CD_WORKFLOW" envDefault:"true"`
CdWorkflowExecutorType pipelineConfig.WorkflowExecutorType `env:"CD_WORKFLOW_EXECUTOR_TYPE" envDefault:"AWF"`
TerminationGracePeriod int `env:"TERMINATION_GRACE_PERIOD_SECS" envDefault:"180"`
MaxCdWorkflowRunnerRetries int `env:"MAX_CD_WORKFLOW_RUNNER_RETRIES" envDefault:"0"`
// common in both ciconfig and cd config
Type string
Mode string `env:"MODE" envDefault:"DEV"`
OrchestratorHost string `env:"ORCH_HOST" envDefault:"http://devtroncd-orchestrator-service-prod.devtroncd/webhook/msg/nats"`
OrchestratorToken string `env:"ORCH_TOKEN" envDefault:""`
ClusterConfig *rest.Config
CloudProvider blob_storage.BlobStorageType `env:"BLOB_STORAGE_PROVIDER" envDefault:"S3"`
BlobStorageEnabled bool `env:"BLOB_STORAGE_ENABLED" envDefault:"false"`
BlobStorageS3AccessKey string `env:"BLOB_STORAGE_S3_ACCESS_KEY"`
BlobStorageS3SecretKey string `env:"BLOB_STORAGE_S3_SECRET_KEY"`
BlobStorageS3Endpoint string `env:"BLOB_STORAGE_S3_ENDPOINT"`
BlobStorageS3EndpointInsecure bool `env:"BLOB_STORAGE_S3_ENDPOINT_INSECURE" envDefault:"false"`
BlobStorageS3BucketVersioned bool `env:"BLOB_STORAGE_S3_BUCKET_VERSIONED" envDefault:"true"`
BlobStorageGcpCredentialJson string `env:"BLOB_STORAGE_GCP_CREDENTIALS_JSON"`
AzureAccountName string `env:"AZURE_ACCOUNT_NAME"`
AzureGatewayUrl string `env:"AZURE_GATEWAY_URL" envDefault:"http://devtron-minio.devtroncd:9000"`
AzureGatewayConnectionInsecure bool `env:"AZURE_GATEWAY_CONNECTION_INSECURE" envDefault:"true"`
AzureBlobContainerCiLog string `env:"AZURE_BLOB_CONTAINER_CI_LOG"`
AzureBlobContainerCiCache string `env:"AZURE_BLOB_CONTAINER_CI_CACHE"`
AzureAccountKey string `env:"AZURE_ACCOUNT_KEY"`
BuildLogTTLValue int `env:"BUILD_LOG_TTL_VALUE_IN_SECS" envDefault:"3600"`
BaseLogLocationPath string `env:"BASE_LOG_LOCATION_PATH" envDefault:"/home/devtron/"`
InAppLoggingEnabled bool `env:"IN_APP_LOGGING_ENABLED" envDefault:"false"`
BuildxProvenanceMode string `env:"BUILDX_PROVENANCE_MODE" envDefault:""` // provenance is set to false if this flag is not set
ExtBlobStorageCmName string `env:"EXTERNAL_BLOB_STORAGE_CM_NAME" envDefault:"blob-storage-cm"`
ExtBlobStorageSecretName string `env:"EXTERNAL_BLOB_STORAGE_SECRET_NAME" envDefault:"blob-storage-secret"`
UseArtifactListingQueryV2 bool `env:"USE_ARTIFACT_LISTING_QUERY_V2" envDefault:"true"`
UseImageTagFromGitProviderForTagBasedBuild bool `env:"USE_IMAGE_TAG_FROM_GIT_PROVIDER_FOR_TAG_BASED_BUILD" envDefault:"false"` // this is being done for https://github.com/devtron-labs/devtron/issues/4263
UseDockerApiToGetDigest bool `env:"USE_DOCKER_API_TO_GET_DIGEST" envDefault:"false"`
}
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) GetDefaultArtifactKeyPrefix ¶
func (impl *CiCdConfig) GetDefaultArtifactKeyPrefix() string
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() pipelineConfig.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 CiVolumeMount ¶
type ConfigMapSecretDto ¶
type ConfigMapSecretDto struct {
Name string
Data map[string]string
OwnerRef v12.OwnerReference
}
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 GitHostRequest ¶
type GitHostRequest struct {
Id int `json:"id,omitempty" validate:"number"`
Name string `json:"name,omitempty" validate:"required"`
Active bool `json:"active"`
WebhookUrl string `json:"webhookUrl"`
WebhookSecret string `json:"webhookSecret"`
EventTypeHeader string `json:"eventTypeHeader"`
SecretHeader string `json:"secretHeader"`
SecretValidator string `json:"secretValidator"`
UserId int32 `json:"-"`
}
type GitMetadata ¶
type GitRegistry ¶
type GitRegistry struct {
Id int `json:"id,omitempty" validate:"number"`
Name string `json:"name,omitempty" validate:"required"`
Url string `json:"url,omitempty"`
UserName string `json:"userName,omitempty"`
Password string `json:"password,omitempty"`
SshPrivateKey string `json:"sshPrivateKey,omitempty"`
AccessToken string `json:"accessToken,omitempty"`
AuthMode repository.AuthMode `json:"authMode,omitempty" validate:"required"`
Active bool `json:"active"`
UserId int32 `json:"-"`
GitHostId int `json:"gitHostId"`
EnableTLSVerification bool `json:"enableTLSVerification"`
TLSConfig bean.TLSConfig `json:"tlsConfig"`
IsCADataPresent bool `json:"isCADataPresent"`
IsTLSCertDataPresent bool `json:"isTLSCertDataPresent"`
IsTLSKeyDataPresent bool `json:"isTLSKeyDataPresent"`
}
type GitTriggerInfoResponse ¶
type GitTriggerInfoResponse struct {
CiMaterials []pipelineConfig.CiPipelineMaterialResponse `json:"ciMaterials"`
TriggeredByEmail string `json:"triggeredByEmail"`
LastDeployedTime string `json:"lastDeployedTime,omitempty"`
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"`
}
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 Trigger ¶
type Trigger struct {
PipelineId int
CommitHashes map[int]pipelineConfig.GitCommit
CiMaterials []*pipelineConfig.CiPipelineMaterial
TriggeredBy int32
InvalidateCache bool
ExtraEnvironmentVariables map[string]string // extra env variables which will be used for CI
EnvironmentId int
PipelineType string
CiArtifactLastFetch time.Time
ReferenceCiWorkflowId int
}
func (*Trigger) BuildTriggerObject ¶
func (obj *Trigger) BuildTriggerObject(refCiWorkflow *pipelineConfig.CiWorkflow, ciMaterials []*pipelineConfig.CiPipelineMaterial, triggeredBy int32, invalidateCache bool, extraEnvironmentVariables map[string]string, pipelineType string)
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 *CiPipeline.CiBuildConfigBean `json:"ciBuildConfig"`
CiBuildDockerMtuValue int `json:"ciBuildDockerMtuValue"`
IgnoreDockerCachePush bool `json:"ignoreDockerCachePush"`
IgnoreDockerCachePull bool `json:"ignoreDockerCachePull"`
CacheInvalidate bool `json:"cacheInvalidate"`
IsPvcMounted bool `json:"IsPvcMounted"`
ExtraEnvironmentVariables map[string]string `json:"extraEnvironmentVariables"`
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"`
// 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 pipelineConfig.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 *repository.Environment
AppLabels map[string]string
Scope resourceQualifiers.Scope
BuildxCacheModeMin bool `json:"buildxCacheModeMin"`
AsyncBuildxCacheExport bool `json:"asyncBuildxCacheExport"`
UseDockerApiToGetDigest bool `json:"useDockerApiToGetDigest"`
}
func (*WorkflowRequest) AddNodeConstraintsFromConfig ¶
func (workflowRequest *WorkflowRequest) AddNodeConstraintsFromConfig(workflowTemplate *bean.WorkflowTemplate, config *CiCdConfig)
func (*WorkflowRequest) CheckBlobStorageConfig ¶
func (workflowRequest *WorkflowRequest) CheckBlobStorageConfig(config *CiCdConfig) bool
func (*WorkflowRequest) CheckForJob ¶
func (workflowRequest *WorkflowRequest) CheckForJob() bool
func (*WorkflowRequest) GetBlobStorageLogsKey ¶
func (workflowRequest *WorkflowRequest) GetBlobStorageLogsKey(config *CiCdConfig) string
func (*WorkflowRequest) GetConfiguredCmCs ¶
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 *infraConfig.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 *infraConfig.InfraConfig, workflowJson []byte, workflowTemplate *bean.WorkflowTemplate, workflowConfigMaps []bean3.ConfigSecretMap, workflowSecrets []bean3.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
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 []pipelineConfig.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 *bean3.CustomTagErrorResponse `json:"customTag,omitempty"`
PipelineType string `json:"pipelineType"`
ReferenceWorkflowId int `json:"referenceWorkflowId"`
}
type WorkflowStatus ¶ added in v0.6.26
type WorkflowStatus struct {
WorkflowName, Status, PodStatus, Message, LogLocation, PodName string
}
Click to show internal directories.
Click to hide internal directories.