tasks

package
v0.15.0-zenta-beta3 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2022 License: Apache-2.0 Imports: 18 Imported by: 2

Documentation

Index

Constants

View Source
const RAW_BUILD_TABLE = "jenkins_api_builds"
View Source
const RAW_JOB_TABLE = "jenkins_api_jobs"
View Source
const RAW_STAGE_TABLE = "jenkins_api_stages"

Variables

View Source
var CollectApiBuildsMeta = core.SubTaskMeta{
	Name:             "collectApiBuilds",
	EntryPoint:       CollectApiBuilds,
	EnabledByDefault: true,
	Description:      "Collect builds data from jenkins api",
	DomainTypes:      []string{core.DOMAIN_TYPE_CICD},
}
View Source
var CollectApiJobsMeta = core.SubTaskMeta{
	Name:             "collectApiJobs",
	EntryPoint:       CollectApiJobs,
	EnabledByDefault: true,
	Description:      "Collect jobs data from jenkins api",
	DomainTypes:      []string{core.DOMAIN_TYPE_CICD},
}
View Source
var CollectApiStagesMeta = core.SubTaskMeta{
	Name:             "collectApiStages",
	EntryPoint:       CollectApiStages,
	EnabledByDefault: true,
	Description:      "Collect stages data from jenkins api",
	DomainTypes:      []string{core.DOMAIN_TYPE_CICD},
}
View Source
var ConvertBuildReposMeta = core.SubTaskMeta{
	Name:             "convertBuildRepos",
	EntryPoint:       ConvertBuildRepos,
	EnabledByDefault: true,
	Description:      "Convert tool layer table jenkins_builds into  domain layer table builds",
	DomainTypes:      []string{core.DOMAIN_TYPE_CICD},
}
View Source
var ConvertBuildsToCICDMeta = core.SubTaskMeta{
	Name:             "convertBuildsToCICD",
	EntryPoint:       ConvertBuildsToCICD,
	EnabledByDefault: true,
	Description:      "convert builds to cicd",
	DomainTypes:      []string{core.DOMAIN_TYPE_CICD},
}
View Source
var ConvertJobsMeta = core.SubTaskMeta{
	Name:             "convertJobs",
	EntryPoint:       ConvertJobs,
	EnabledByDefault: true,
	Description:      "Convert tool layer table jenkins_jobs into  domain layer table jobs",
	DomainTypes:      []string{core.DOMAIN_TYPE_CICD},
}
View Source
var ConvertStagesMeta = core.SubTaskMeta{
	Name:             "convertStages",
	EntryPoint:       ConvertStages,
	EnabledByDefault: true,
	Description:      "convert jenkins_stages",
	DomainTypes:      []string{core.DOMAIN_TYPE_CICD},
}
View Source
var EnrichApiBuildWithStagesMeta = core.SubTaskMeta{
	Name:             "enrichApiBuildWithStages",
	EntryPoint:       EnrichApiBuildWithStages,
	EnabledByDefault: true,
	Description:      "Enrich  jenkins build with stages",
	DomainTypes:      []string{core.DOMAIN_TYPE_CICD},
}
View Source
var ExtractApiBuildsMeta = core.SubTaskMeta{
	Name:             "extractApiBuilds",
	EntryPoint:       ExtractApiBuilds,
	EnabledByDefault: true,
	Description:      "Extract raw builds data into tool layer table jenkins_builds",
	DomainTypes:      []string{core.DOMAIN_TYPE_CICD},
}
View Source
var ExtractApiJobsMeta = core.SubTaskMeta{
	Name:             "extractApiJobs",
	EntryPoint:       ExtractApiJobs,
	EnabledByDefault: true,
	Description:      "Extract raw jobs data into tool layer table jenkins_jobs",
	DomainTypes:      []string{core.DOMAIN_TYPE_CICD},
}
View Source
var ExtractApiStagesMeta = core.SubTaskMeta{
	Name:             "extractApiStages",
	EntryPoint:       ExtractApiStages,
	EnabledByDefault: true,
	Description:      "Extract raw stages data into tool layer table jenkins_stages",
	DomainTypes:      []string{core.DOMAIN_TYPE_CICD},
}

Functions

func CollectApiBuilds

func CollectApiBuilds(taskCtx core.SubTaskContext) errors.Error

func CollectApiJobs

func CollectApiJobs(taskCtx core.SubTaskContext) errors.Error

func CollectApiStages added in v0.13.0

func CollectApiStages(taskCtx core.SubTaskContext) errors.Error

func ConvertBuildRepos added in v0.13.0

func ConvertBuildRepos(taskCtx core.SubTaskContext) errors.Error

func ConvertBuildsToCICD added in v0.13.0

func ConvertBuildsToCICD(taskCtx core.SubTaskContext) (err errors.Error)

func ConvertJobs

func ConvertJobs(taskCtx core.SubTaskContext) errors.Error

func ConvertStages added in v0.13.0

func ConvertStages(taskCtx core.SubTaskContext) (err errors.Error)

func CreateApiClient

func CreateApiClient(taskCtx core.TaskContext, connection *models.JenkinsConnection) (*helper.ApiAsyncClient, errors.Error)

func EnrichApiBuildWithStages added in v0.13.0

func EnrichApiBuildWithStages(taskCtx core.SubTaskContext) errors.Error

func ExtractApiBuilds

func ExtractApiBuilds(taskCtx core.SubTaskContext) errors.Error

func ExtractApiJobs

func ExtractApiJobs(taskCtx core.SubTaskContext) errors.Error

func ExtractApiStages added in v0.13.0

func ExtractApiStages(taskCtx core.SubTaskContext) errors.Error

Types

type JenkinsApiParams added in v0.12.0

type JenkinsApiParams struct {
	ConnectionId uint64
	JobName      string
	JobPath      string
}

type JenkinsBuildWithRepoStage added in v0.13.0

type JenkinsBuildWithRepoStage struct {
	// collected fields
	ConnectionId        uint64 `gorm:"primaryKey"`
	ID                  string `json:"id" gorm:"primaryKey;type:varchar(255)"`
	Name                string `json:"name" gorm:"type:varchar(255)"`
	ExecNode            string `json:"execNode" gorm:"type:varchar(255)"`
	CommitSha           string `gorm:"type:varchar(255)"`
	Result              string // Result
	Status              string `json:"status" gorm:"type:varchar(255)"`
	StartTimeMillis     int64  `json:"startTimeMillis"`
	DurationMillis      int    `json:"durationMillis"`
	PauseDurationMillis int    `json:"pauseDurationMillis"`
	Type                string `gorm:"index;type:varchar(255)"`
	BuildName           string `gorm:"primaryKey;type:varchar(255)"`
	Branch              string `gorm:"type:varchar(255)"`
	RepoUrl             string `gorm:"type:varchar(255)"`
	common.NoPKModel
}

type JenkinsOptions

type JenkinsOptions struct {
	ConnectionId               uint64 `json:"connectionId"`
	JobName                    string `json:"jobName"`
	JobPath                    string `json:"jobPath"`
	Since                      string
	Tasks                      []string `json:"tasks,omitempty"`
	models.TransformationRules `mapstructure:"transformationRules" json:"transformationRules"`
}

func DecodeAndValidateTaskOptions added in v0.12.0

func DecodeAndValidateTaskOptions(options map[string]interface{}) (*JenkinsOptions, errors.Error)

type JenkinsTaskData

type JenkinsTaskData struct {
	Options    *JenkinsOptions
	ApiClient  *helper.ApiAsyncClient
	Connection *models.JenkinsConnection
	Since      *time.Time
	Job        *models.JenkinsJob
}

type SimpleBuild added in v0.13.0

type SimpleBuild struct {
	Number          string
	FullDisplayName string
}

type SimpleJob

type SimpleJob struct {
	Name string
	Path string
}

Jump to

Keyboard shortcuts

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