Documentation
¶
Index ¶
- func FindGitLabWorkflows(repoPath string) ([]parser.WorkflowFile, error)
- func GenerateFileURL(repoURL, filePath string, lineNumber int) string
- func GitLabRules() []rules.Rule
- func IsGitLabURL(repoURL string) bool
- func LoadSingleGitLabWorkflow(filePath string) ([]parser.WorkflowFile, error)
- func ParseRepositoryURL(repoURL string) (instanceURL, owner, repo string, err error)
- type Client
- type GitLabJob
- type GitLabWorkflow
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FindGitLabWorkflows ¶
func FindGitLabWorkflows(repoPath string) ([]parser.WorkflowFile, error)
FindGitLabWorkflows searches for GitLab CI/CD files in a repository
func GenerateFileURL ¶ added in v0.0.4
GenerateFileURL generates a GitLab URL pointing to a specific file and line number
func GitLabRules ¶
GitLabRules returns GitLab CI/CD specific security rules
func IsGitLabURL ¶
IsGitLabURL checks if a URL is a GitLab repository URL
func LoadSingleGitLabWorkflow ¶
func LoadSingleGitLabWorkflow(filePath string) ([]parser.WorkflowFile, error)
LoadSingleGitLabWorkflow loads and parses a single GitLab CI file
func ParseRepositoryURL ¶
ParseRepositoryURL parses a GitLab repository URL and detects the instance
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client represents a GitLab repository client
func NewClient ¶
NewClient creates a new GitLab client instanceURL can be: - "" or "https://gitlab.com" for GitLab SaaS - "https://gitlab.company.com" for on-premise instances
func (*Client) CloneRepository ¶
CloneRepository clones a GitLab repository to a temporary directory
func (*Client) ValidateConnection ¶
ValidateConnection tests basic connectivity to the GitLab instance
type GitLabJob ¶
type GitLabJob struct {
Stage string `yaml:"stage"`
Image interface{} `yaml:"image"`
Script []string `yaml:"script"`
BeforeScript []string `yaml:"before_script"`
AfterScript []string `yaml:"after_script"`
Variables map[string]interface{} `yaml:"variables"`
Rules []map[string]interface{} `yaml:"rules"`
Only interface{} `yaml:"only"`
Except interface{} `yaml:"except"`
When string `yaml:"when"`
Allow map[string]interface{} `yaml:"allow_failure"`
Artifacts map[string]interface{} `yaml:"artifacts"`
Cache map[string]interface{} `yaml:"cache"`
Services []interface{} `yaml:"services"`
Needs []interface{} `yaml:"needs"`
Tags []string `yaml:"tags"`
Environment map[string]interface{} `yaml:"environment"`
}
GitLabJob represents a job in GitLab CI/CD
type GitLabWorkflow ¶
type GitLabWorkflow struct {
Stages []string `yaml:"stages"`
Image interface{} `yaml:"image"`
Variables map[string]interface{} `yaml:"variables"`
Before []string `yaml:"before_script"`
After []string `yaml:"after_script"`
Jobs map[string]GitLabJob `yaml:",inline"`
Include []map[string]interface{} `yaml:"include"`
Workflow map[string]interface{} `yaml:"workflow"`
}
GitLabWorkflow represents a GitLab CI/CD pipeline