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 TestCase
- type TestReport
- type TestSuite
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetMergeRequestIIDFromRefName ¶ added in v0.5.0
GetMergeRequestIIDFromRefName parse a refName to extract a merge request IID.
func GetRefRegexp ¶ added in v0.5.0
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 DurationSeconds float64 QueuedDurationSeconds float64 Status string TagList string ArtifactSize float64 FailureReason string 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 // MetricKindQueuedDurationSeconds .. MetricKindQueuedDurationSeconds // MetricKindRunCount .. MetricKindRunCount // MetricKindStatus .. MetricKindStatus // MetricKindTimestamp .. MetricKindTimestamp // MetricKindTestReportTotalTime .. MetricKindTestReportTotalTime // MetricKindTestReportTotalCount .. MetricKindTestReportTotalCount // MetricKindTestReportSuccessCount .. MetricKindTestReportSuccessCount // MetricKindTestReportFailedCount .. MetricKindTestReportFailedCount // MetricKindTestReportSkippedCount .. MetricKindTestReportSkippedCount // MetricKindTestReportErrorCount .. MetricKindTestReportErrorCount // MetricKindTestSuiteTotalTime .. MetricKindTestSuiteTotalTime // MetricKindTestSuiteTotalCount .. MetricKindTestSuiteTotalCount // MetricKindTestSuiteSuccessCount .. MetricKindTestSuiteSuccessCount // MetricKindTestSuiteFailedCount .. MetricKindTestSuiteFailedCount // MetricKindTestSuiteSkippedCount .. MetricKindTestSuiteSkippedCount // MetricKindTestSuiteErrorCount .. MetricKindTestSuiteErrorCount // MetricKindTestCaseExecutionTime .. MetricKindTestCaseExecutionTime // MetricKindTestCaseStatus .. MetricKindTestCaseStatus )
type Pipeline ¶
type Pipeline struct { ID int Coverage float64 Timestamp float64 DurationSeconds float64 QueuedDurationSeconds float64 Source string 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 ¶ added in v0.5.1
type TaskType string
TaskType represents the type of a task.
const ( // TaskTypePullProject .. TaskTypePullProject TaskType = "PullProject" // 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" )
type TestCase ¶ added in v0.5.6
TestCase ..
func NewTestCase ¶ added in v0.5.6
func NewTestCase(gtc *goGitlab.PipelineTestCases) TestCase
NewTestCase ..
type TestReport ¶ added in v0.5.5
type TestReport struct { TotalTime float64 TotalCount int SuccessCount int FailedCount int SkippedCount int ErrorCount int TestSuites []TestSuite }
TestReport ..
func NewTestReport ¶ added in v0.5.5
func NewTestReport(gtr goGitlab.PipelineTestReport) TestReport
NewTestReport ..
type TestSuite ¶ added in v0.5.5
type TestSuite struct { Name string TotalTime float64 TotalCount int SuccessCount int FailedCount int SkippedCount int ErrorCount int TestCases []TestCase }
TestSuite ..
func NewTestSuite ¶ added in v0.5.5
func NewTestSuite(gts *goGitlab.PipelineTestSuites) TestSuite
NewTestSuite ..