Documentation
¶
Overview ¶
Package artifacts provides analysis and optimization for GitLab CI/CD artifact configurations.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Analyzer ¶
type Analyzer struct {
// contains filtered or unexported fields
}
Analyzer provides artifact configuration analysis.
type ArtifactInfo ¶
type ArtifactInfo struct {
JobName string `json:"job_name"`
VariableName string `json:"variable_name"`
FilePath string `json:"file_path"`
Line int `json:"line"`
Artifacts pipeline.Artifacts `json:"artifacts"`
}
ArtifactInfo holds information about an artifact configuration and its source.
type Issue ¶
type Issue struct {
Type IssueType `json:"type"`
JobName string `json:"job_name"`
Message string `json:"message"`
Severity string `json:"severity"` // "warning" or "error"
}
Issue represents a detected artifact configuration issue.
type IssueType ¶
type IssueType string
IssueType represents the type of artifact configuration issue.
const ( // IssueMissingExpireIn indicates an artifact without expire_in set. IssueMissingExpireIn IssueType = "missing_expire_in" // IssueOversizedPattern indicates a potentially oversized artifact pattern. IssueOversizedPattern IssueType = "oversized_pattern" // IssueDuplicatePath indicates duplicate artifact paths across jobs. IssueDuplicatePath IssueType = "duplicate_path" )
type Recommendation ¶
type Recommendation struct {
Type RecommendationType `json:"type"`
JobName string `json:"job_name"`
Message string `json:"message"`
}
Recommendation represents an optimization suggestion.
type RecommendationType ¶
type RecommendationType string
RecommendationType represents the type of optimization recommendation.
const ( // RecommendCompression suggests using compression for artifacts. RecommendCompression RecommendationType = "compression" // RecommendShorterExpiry suggests reducing artifact expiration time. RecommendShorterExpiry RecommendationType = "shorter_expiry" // RecommendExcludePatterns suggests adding exclude patterns. RecommendExcludePatterns RecommendationType = "exclude_patterns" )
type Report ¶
type Report struct {
TotalArtifacts int `json:"total_artifacts"`
TotalPaths int `json:"total_paths"`
MissingExpireIn int `json:"missing_expire_in"`
OversizedPatterns int `json:"oversized_patterns"`
DuplicatePaths int `json:"duplicate_paths"`
Issues []Issue `json:"issues,omitempty"`
Recommendations []Recommendation `json:"recommendations,omitempty"`
HealthScore float64 `json:"health_score"`
}
Report contains the results of artifact analysis.
Click to show internal directories.
Click to hide internal directories.