Documentation ¶
Index ¶
- func GetMergeRequestIIDFromRefName(refName string) (string, error)
- func GetRefRegexp(ppr config.ProjectPullRefs, rk RefKind) (re *regexp.Regexp, err error)
- type Deployment
- type Environment
- type EnvironmentKey
- type Environments
- type Job
- type Jobs
- type Metric
- type MetricKey
- type MetricKind
- type Metrics
- type Pipeline
- type Project
- type ProjectKey
- type Projects
- type Ref
- type RefKey
- type RefKind
- type Refs
- type Runner
- type TaskType
- type Tasks
- type TestReport
- type TestSuite
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetMergeRequestIIDFromRefName ¶
GetMergeRequestIIDFromRefName parse a refName to extract a merge request IID.
func GetRefRegexp ¶
GetRefRegexp returns the expected regexp given a ProjectPullRefs config and a RefKind.
Types ¶
type Deployment ¶
type Deployment struct { JobID int RefKind RefKind RefName string Username string Timestamp float64 DurationSeconds float64 CommitShortID string Status string }
Deployment ..
type Environment ¶
type Environment struct { ProjectName string ID int Name string ExternalURL string Available bool LatestDeployment Deployment OutputSparseStatusMetrics bool }
Environment ..
func (Environment) DefaultLabelsValues ¶
func (e Environment) DefaultLabelsValues() map[string]string
DefaultLabelsValues ..
func (Environment) InformationLabelsValues ¶
func (e Environment) InformationLabelsValues() (v map[string]string)
InformationLabelsValues ..
type Environments ¶
type Environments map[EnvironmentKey]Environment
Environments allows us to keep track of all the Environment objects we have discovered.
func (Environments) Count ¶
func (envs Environments) Count() int
Count returns the amount of environments in the map.
type Job ¶
type Job struct { ID int Name string Stage string Timestamp float64 StartTime float64 DurationSeconds float64 QueuedDurationSeconds float64 Status string ArtifactSize float64 Runner Runner }
Job ..
type Metric ¶
type Metric struct { Kind MetricKind Labels prometheus.Labels Value float64 }
Metric ..
type MetricKind ¶
type MetricKind int32
MetricKind ..
const ( // MetricKindCoverage refers to the coerage of a job/pipeline. MetricKindCoverage MetricKind = iota // MetricKindDurationSeconds .. MetricKindDurationSeconds // MetricKindEnvironmentBehindCommitsCount .. MetricKindEnvironmentBehindCommitsCount // MetricKindEnvironmentBehindDurationSeconds .. MetricKindEnvironmentBehindDurationSeconds // MetricKindEnvironmentDeploymentCount .. MetricKindEnvironmentDeploymentCount // MetricKindEnvironmentDeploymentDurationSeconds .. MetricKindEnvironmentDeploymentDurationSeconds // MetricKindEnvironmentDeploymentJobID .. MetricKindEnvironmentDeploymentJobID // MetricKindEnvironmentDeploymentStatus .. MetricKindEnvironmentDeploymentStatus // MetricKindEnvironmentDeploymentTimestamp .. MetricKindEnvironmentDeploymentTimestamp // MetricKindEnvironmentInformation .. MetricKindEnvironmentInformation // MetricKindID .. MetricKindID // MetricKindJobArtifactSizeBytes .. MetricKindJobArtifactSizeBytes // MetricKindJobDurationSeconds .. MetricKindJobDurationSeconds // MetricKindJobID .. MetricKindJobID // MetricKindJobQueuedDurationSeconds .. MetricKindJobQueuedDurationSeconds // MetricKindJobRunCount .. MetricKindJobRunCount // MetricKindJobStatus .. MetricKindJobStatus // MetricKindJobTimestamp .. MetricKindJobTimestamp // MetricKindJobStartTime .. MetricKindJobStartTime // MetricKindQueuedDurationSeconds .. MetricKindQueuedDurationSeconds // MetricKindRunCount .. MetricKindRunCount // MetricKindStatus .. MetricKindStatus // MetricKindTimestamp .. MetricKindTimestamp // MetricKindStartTime .. MetricKindStartTime // MetricKindTestReportTotalTime .. MetricKindTestReportTotalTime // MetricKindTestReportTotalCount .. MetricKindTestReportTotalCount // MetricKindTestReportSuccessCount .. MetricKindTestReportSuccessCount // MetricKindTestReportFailedCount .. MetricKindTestReportFailedCount // MetricKindTestReportSkippedCount .. MetricKindTestReportSkippedCount // MetricKindTestReportErrorCount .. MetricKindTestReportErrorCount // MetricKindTestSuiteTotalTime .. MetricKindTestSuiteTotalTime // MetricKindTestSuiteTotalCount .. MetricKindTestSuiteTotalCount // MetricKindTestSuiteSuccessCount .. MetricKindTestSuiteSuccessCount // MetricKindTestSuiteFailedCount .. MetricKindTestSuiteFailedCount // MetricKindTestSuiteSkippedCount .. MetricKindTestSuiteSkippedCount // MetricKindTestSuiteErrorCount .. MetricKindTestSuiteErrorCount )
type Pipeline ¶
type Pipeline struct { ID int Coverage float64 Timestamp float64 StartTime float64 DurationSeconds float64 QueuedDurationSeconds float64 Status string Variables string TestReport TestReport }
Pipeline ..
type Ref ¶
type Ref struct { Kind RefKind Name string Project Project LatestPipeline Pipeline LatestJobs Jobs }
Ref is what we will use a metrics entity on which we will perform regular pulling operations.
func (Ref) DefaultLabelsValues ¶
DefaultLabelsValues ..
type TaskType ¶
type TaskType string
TaskType represents the type of a task.
const ( // TaskTypePullProjectsFromWildcard .. TaskTypePullProjectsFromWildcard TaskType = "PullProjectsFromWildcard" // TaskTypePullProjectsFromWildcards .. TaskTypePullProjectsFromWildcards TaskType = "PullProjectsFromWildcards" // TaskTypePullEnvironmentsFromProject .. TaskTypePullEnvironmentsFromProject TaskType = "PullEnvironmentsFromProject" // TaskTypePullEnvironmentsFromProjects .. TaskTypePullEnvironmentsFromProjects TaskType = "PullEnvironmentsFromProjects" // TaskTypePullEnvironmentMetrics .. TaskTypePullEnvironmentMetrics TaskType = "PullEnvironmentMetrics" // TaskTypePullMetrics .. TaskTypePullMetrics TaskType = "PullMetrics" // TaskTypePullRefsFromProject .. TaskTypePullRefsFromProject TaskType = "PullRefsFromProject" // TaskTypePullRefsFromProjects .. TaskTypePullRefsFromProjects TaskType = "PullRefsFromProjects" // TaskTypePullRefMetrics .. TaskTypePullRefMetrics TaskType = "PullRefMetrics" // TaskTypeGarbageCollectProjects .. TaskTypeGarbageCollectProjects TaskType = "GarbageCollectProjects" // TaskTypeGarbageCollectEnvironments .. TaskTypeGarbageCollectEnvironments TaskType = "GarbageCollectEnvironments" // TaskTypeGarbageCollectRefs .. TaskTypeGarbageCollectRefs TaskType = "GarbageCollectRefs" // TaskTypeGarbageCollectMetrics .. TaskTypeGarbageCollectMetrics TaskType = "GarbageCollectMetrics" // TaskTypeConfigUpdate .. TaskTypeConfigUpdate TaskType = "ConfigUpdate" // TaskTypeAddWebhooks .. TaskTypeAddWebhooks TaskType = "AddWebhooks" )
type TestReport ¶
type TestReport struct { TotalTime float64 TotalCount int SuccessCount int FailedCount int SkippedCount int ErrorCount int TestSuites []TestSuite }
TestReport ..
func NewTestReport ¶
func NewTestReport(gtr goGitlab.PipelineTestReport) TestReport
NewTestReport ..
Click to show internal directories.
Click to hide internal directories.