Documentation
¶
Overview ¶
Package gitlab was largely generated by an AI from the schema There doesn't seem to be a reliable way of generating types (go structs) from the CI schema
tried quicktype and
Index ¶
- Variables
- type AfterScriptElement
- type Arch
- type Artifacts
- type ArtifactsClass
- type Bitbucket
- type CachValue
- type Cache
- type CacheKey
- type ChangesetCondition
- type CloneRepositorySettings
- type CloudStepRuntime
- type Condition
- type CustomPipelineItem
- type CustomPipelineVariable
- type DefaultClass
- type DefaultPipeline
- type GitCloneDepth
- type GitCloneDepthEnum
- type GitLabArtifacts
- type GitLabCI
- type GitLabImage
- type GitLabInclude
- type GitLabJob
- type GitLabJobCondition
- type GitLabReports
- type GitLabRetry
- type GitLabService
- type GithubContainer
- type GithubContainerCredentials
- type GithubDefaultRun
- type GithubDefaults
- type GithubInput
- type GithubJob
- type GithubPullRequestEvent
- type GithubPushEvent
- type GithubScheduleEvent
- type GithubStep
- type GithubStrategy
- type GithubTriggerEvents
- type GithubWorkflow
- type GithubWorkflowDispatchEvent
- type GlobalDefinitions
- type GlobalOptions
- type HashType
- type Image
- type ImageClass
- type ImportEntry
- type OrderedMap
- type Parallel
- type ParallelClass
- type ParallelGroupStep
- type ParallelGroupStepStep
- type ParsedHash
- type Pipe
- type PipeVariable
- type PipelineItem
- type PipelineValue
- type Pipelines
- type PullRequestClass
- type PullRequestValue
- type RunsOn
- type ServiceDefinition
- type Stage
- type StageStep
- type StepRuntime
- type StepSize
- type StepStep
- type StringSlice
- type Trigger
- type Type
Constants ¶
This section is empty.
Variables ¶
var ErrMustIncludeSubComponents = errors.New("must include at least one")
var ErrSrcEmpty = errors.New("import entry source must not be empty")
ErrSrcEmpty ensures an empty string for source throws an error
var ErrUnsupportedHashAlgorithm = errors.New("unsupported hash, must be one of ['sha256']")
ErrUnsupportedHashAlgorithm ensures the hash algorithm is supported
var ErrUnsupportedHashFormat = errors.New("unsupported hash format, must be in 'algorithm:hex_digest' format")
ErrUnsupportedHashFormat occurs when an unsupported hash algorithm is specified
Functions ¶
This section is empty.
Types ¶
type AfterScriptElement ¶ added in v0.3.6
List of commands to execute after the step succeeds or fails.
type Artifacts ¶ added in v0.3.6
type Artifacts struct {
ArtifactsClass *ArtifactsClass
StringArray []string
}
type ArtifactsClass ¶ added in v0.3.6
type Bitbucket ¶ added in v0.3.6
type Bitbucket struct {
Clone *CloneRepositorySettings `yaml:"clone,omitempty"`
// The definitions of caches and services used in the declared pipelines.
Definitions *GlobalDefinitions `yaml:"definitions,omitempty"`
// Allows other Bitbucket repositories to import pipeline definitions from this file. A
// shared pipeline definition can't contain another `import` property.
Export *bool `yaml:"export,omitempty"`
Image *Image `yaml:"image,omitempty"`
// Additional key value data supplied in the configuration YAML.
Labels map[string]any `yaml:"labels,omitempty"`
// Global options allow to override the default values applied to all steps in all declared
// pipelines.
Options *GlobalOptions `yaml:"options,omitempty"`
Pipelines *Pipelines `yaml:"pipelines,omitempty"`
}
type CacheKey ¶ added in v0.3.6
type CacheKey struct {
// Checksum of these file paths will be used to generate the cache key.
Files []string `yaml:"files"`
}
type ChangesetCondition ¶ added in v0.3.6
type ChangesetCondition struct {
// Condition which holds only if all of the modified files match any of the specified
// patterns.
ExcludePaths []string `yaml:"excludePaths,omitempty"`
// Condition which holds only if any of the modified files match any of the specified
// patterns.
IncludePaths []string `yaml:"includePaths,omitempty"`
}
Condition on the changesets involved in the pipeline.
type CloneRepositorySettings ¶ added in v0.3.6
type CloneRepositorySettings struct {
// The depth argument of Git clone operation. It can be either number or "full" value
Depth *GitCloneDepth `yaml:"depth,omitempty"`
// Enables cloning of the repository.
Enabled *bool `yaml:"enabled,omitempty"`
// Enables the download of files from LFS storage when cloning.
LFS *bool `yaml:"lfs,omitempty"`
// Disables SSL verification during Git clone operation, allowing the use of self-signed
// certificates.
SkipSSLVerify *bool `yaml:"skip-ssl-verify,omitempty"`
}
Settings for cloning a repository into a container.
type CloudStepRuntime ¶ added in v0.3.6
type CloudStepRuntime struct {
// Architecture type used to run the step.
Arch *Arch `yaml:"arch,omitempty"`
// Whether it uses Atlassian ip ranges.
AtlassianIPRanges *bool `yaml:"atlassian-ip-ranges,omitempty"`
// Cloud Runtime version.
Version *string `yaml:"version,omitempty"`
}
Custom cloud step runtime
type Condition ¶ added in v0.3.6
type Condition struct {
// Condition on the changesets involved in the pipeline.
Changesets ChangesetCondition `yaml:"changesets"`
}
The condition to execute the step.
The condition to execute the stage.
type CustomPipelineItem ¶ added in v0.3.6
type CustomPipelineItem struct {
// List of variables for the custom pipeline.
Variables []CustomPipelineVariable `yaml:"variables,omitempty"`
Step *ParallelGroupStepStep `yaml:"step,omitempty"`
Parallel *Parallel `yaml:"parallel,omitempty"`
Stage *Stage `yaml:"stage,omitempty"`
}
List of variables, steps, stages and parallel groups of the custom pipeline.
List of steps in the parallel group to run concurrently.
type CustomPipelineVariable ¶ added in v0.3.6
type CustomPipelineVariable struct {
// A list of values that are allowed for the variable.
AllowedValues []string `yaml:"allowed-values,omitempty"`
Default *string `yaml:"default,omitempty"`
Description *string `yaml:"description,omitempty"`
Name string `yaml:"name"`
}
Settings for the custom variable.
type DefaultClass ¶ added in v0.3.6
type DefaultClass struct {
// The import needs to match the following format:
// {repo-slug|repo-uuid}:{tag-name|branch-name}:{pipeline-name}.
Import string `yaml:"import"`
}
type DefaultPipeline ¶ added in v0.3.6
type DefaultPipeline struct {
DefaultClass *DefaultClass
PipelineItemArray []PipelineItem
}
Default pipeline runs on every push except for tags unless a branch-specific pipeline is defined.
type GitCloneDepth ¶ added in v0.3.6
type GitCloneDepth struct {
Enum *GitCloneDepthEnum
Integer *int64
}
The depth argument of Git clone operation. It can be either number or "full" value
type GitCloneDepthEnum ¶ added in v0.3.6
type GitCloneDepthEnum string
const (
Full GitCloneDepthEnum = "full"
)
type GitLabArtifacts ¶
type GitLabArtifacts struct {
Paths []string `json:"paths,omitempty" yaml:"paths,omitempty"`
Exclude []string `json:"exclude,omitempty" yaml:"exclude,omitempty"`
ExpireIn string `json:"expire_in,omitempty" yaml:"expire_in,omitempty"`
When string `json:"when,omitempty" yaml:"when,omitempty"`
Reports GitLabReports `json:"reports,omitempty" yaml:"reports,omitempty"`
}
Artifacts represents the configuration for job artifacts.
type GitLabCI ¶
type GitLabCI struct {
Version string `json:"version,omitempty" yaml:"version,omitempty"`
Stages []string `json:"stages,omitempty" yaml:"stages,omitempty"`
Variables map[string]string `json:"variables,omitempty" yaml:"variables,omitempty"`
Include []GitLabInclude `json:"include,omitempty" yaml:"include,omitempty"`
Jobs map[string]GitLabJob `json:"jobs,omitempty" yaml:"jobs,omitempty"`
BeforeScript []string `json:"before_script,omitempty" yaml:"before_script,omitempty"`
AfterScript []string `json:"after_script,omitempty" yaml:"after_script,omitempty"`
Image GitLabImage `json:"image,omitempty" yaml:"image,omitempty"`
Services []GitLabService `json:"services,omitempty" yaml:"services,omitempty"`
}
GitLabCI represents the root structure of a GitLab CI pipeline file.
type GitLabImage ¶
type GitLabImage struct {
Name string `json:"name,omitempty" yaml:"name,omitempty"`
EntryPoint string `json:"entrypoint,omitempty" yaml:"entrypoint,omitempty"`
}
Image represents the Docker image configuration.
type GitLabInclude ¶
type GitLabInclude struct {
Local string `json:"local,omitempty" yaml:"local,omitempty"`
File string `json:"file,omitempty" yaml:"file,omitempty"`
Template string `json:"template,omitempty" yaml:"template,omitempty"`
Remote string `json:"remote,omitempty" yaml:"remote,omitempty"`
Ref string `json:"ref,omitempty" yaml:"ref,omitempty"`
Project string `json:"project,omitempty" yaml:"project,omitempty"`
}
Include represents external files that can be included into the CI configuration.
type GitLabJob ¶
type GitLabJob struct {
Script []string `json:"script,omitempty" yaml:"script,omitempty"`
Stage string `json:"stage,omitempty" yaml:"stage,omitempty"`
Tags []string `json:"tags,omitempty" yaml:"tags,omitempty"`
Only GitLabJobCondition `json:"only,omitempty" yaml:"only,omitempty"`
Except GitLabJobCondition `json:"except,omitempty" yaml:"except,omitempty"`
Variables map[string]string `json:"variables,omitempty" yaml:"variables,omitempty"`
When string `json:"when,omitempty" yaml:"when,omitempty"`
AllowFailure bool `json:"allow_failure,omitempty" yaml:"allow_failure,omitempty"`
BeforeScript []string `json:"before_script,omitempty" yaml:"before_script,omitempty"`
AfterScript []string `json:"after_script,omitempty" yaml:"after_script,omitempty"`
Dependencies []string `json:"dependencies,omitempty" yaml:"dependencies,omitempty"`
Artifacts GitLabArtifacts `json:"artifacts,omitempty" yaml:"artifacts,omitempty"`
Retry GitLabRetry `json:"retry,omitempty" yaml:"retry,omitempty"`
}
Job represents a single job definition in GitLab CI.
type GitLabJobCondition ¶
type GitLabJobCondition struct {
Refs []string `json:"refs,omitempty" yaml:"refs,omitempty"`
Variables []string `json:"variables,omitempty" yaml:"variables,omitempty"`
Kubernetes []string `json:"kubernetes,omitempty" yaml:"kubernetes,omitempty"`
}
JobCondition represents conditions for when a job runs.
type GitLabReports ¶
type GitLabReports struct {
JUnit string `json:"junit,omitempty" yaml:"junit,omitempty"`
Artifacts []string `json:"artifacts,omitempty" yaml:"artifacts,omitempty"`
}
Reports represent specific test reports that are uploaded after a job.
type GitLabRetry ¶
type GitLabRetry struct {
Max int `json:"max,omitempty" yaml:"max,omitempty"`
When []string `json:"when,omitempty" yaml:"when,omitempty"`
}
Retry represents the retry configuration for a job.
type GitLabService ¶
type GitLabService struct {
Name string `json:"name,omitempty" yaml:"name,omitempty"`
Alias string `json:"alias,omitempty" yaml:"alias,omitempty"`
EntryPoint string `json:"entrypoint,omitempty" yaml:"entrypoint,omitempty"`
Command string `json:"command,omitempty" yaml:"command,omitempty"`
}
Service represents services that are used during the job execution.
type GithubContainer ¶
type GithubContainer struct {
Image string `json:"image" yaml:"image"` // The Docker image to use for the container.
Credentials *GithubContainerCredentials `json:"credentials,omitempty" yaml:"credentials,omitempty"` // Credentials for the container registry, if required.
Env map[string]string `json:"env,omitempty" yaml:"env,omitempty"` // Environment variables for the container.
Ports []interface{} `json:"ports,omitempty" yaml:"ports,omitempty"` // Array of ports to expose, can be numbers or strings.
Volumes []string `json:"volumes,omitempty" yaml:"volumes,omitempty"` // Array of volumes to use in the container.
Options string `json:"options,omitempty" yaml:"options,omitempty"` // Additional Docker container options.
}
Container represents a container configuration for a GitHub Action job.
type GithubContainerCredentials ¶
type GithubContainerCredentials struct {
Username string `json:"username,omitempty" yaml:"username,omitempty"` // Username for the container registry.
Password string `json:"password,omitempty" yaml:"password,omitempty"` // Password for the container registry.
}
ContainerCredentials represents credentials for the container registry.
type GithubDefaultRun ¶
type GithubDefaultRun struct {
Shell string `json:"shell,omitempty" yaml:"shell,omitempty"`
WorkingDirectory string `json:"working-directory,omitempty" yaml:"working_directory,omitempty"`
}
DefaultRun represents default run configurations for the jobs in the workflow.
type GithubDefaults ¶
type GithubDefaults struct {
Run GithubDefaultRun `json:"run,omitempty" yaml:"run,omitempty"`
}
Defaults represents default values for jobs in the GitHub workflow.
type GithubInput ¶
type GithubInput struct {
Description string `json:"description,omitempty" yaml:"description,omitempty"`
Required bool `json:"required,omitempty" yaml:"required,omitempty"`
Default string `json:"default,omitempty" yaml:"default,omitempty"`
}
Input represents an input for a workflow dispatch event.
type GithubJob ¶
type GithubJob struct {
Name string `json:"name,omitempty" yaml:"name,omitempty"`
Needs []string `json:"needs,omitempty" yaml:"needs,omitempty"`
RunsOn string `json:"runs-on,omitempty" yaml:"runs-on,omitempty"`
Container *GithubContainer `json:"container,omitempty" yaml:"container,omitempty"`
Steps []*GithubStep `json:"steps,omitempty" yaml:"steps,omitempty"`
If string `json:"if,omitempty" yaml:"if,omitempty"`
Env map[string]any `json:"env,omitempty" yaml:"env,omitempty"`
Environment string `json:"environment,omitempty" yaml:"environment,omitempty"`
TimeoutMinutes int `json:"timeout-minutes,omitempty" yaml:"timeout_minutes,omitempty"`
Strategy *GithubStrategy `json:"strategy,omitempty" yaml:"strategy,omitempty"`
}
Job represents a job in the GitHub workflow.
func (*GithubJob) AddStep ¶
func (job *GithubJob) AddStep(step *GithubStep) error
type GithubPullRequestEvent ¶
type GithubPullRequestEvent struct {
Branches []string `json:"branches,omitempty" yaml:"branches,omitempty"`
Paths []string `json:"paths,omitempty" yaml:"paths,omitempty"`
BranchesIgnore []string `json:"branches-ignore,omitempty" yaml:"branches_ignore,omitempty"`
PathsIgnore []string `json:"paths-ignore,omitempty" yaml:"paths_ignore,omitempty"`
Types []string `json:"types,omitempty" yaml:"types,omitempty"`
}
PullRequestEvent represents a pull request event trigger configuration.
type GithubPushEvent ¶
type GithubPushEvent struct {
Branches []string `json:"branches,omitempty" yaml:"branches,omitempty"`
Tags []string `json:"tags,omitempty" yaml:"tags,omitempty"`
Paths []string `json:"paths,omitempty" yaml:"paths,omitempty"`
PathsIgnore []string `json:"paths-ignore,omitempty" yaml:"paths_ignore,omitempty"`
BranchesIgnore []string `json:"branches-ignore,omitempty" yaml:"branches_ignore,omitempty"`
TagsIgnore []string `json:"tags-ignore,omitempty" yaml:"tags_ignore,omitempty"`
}
PushEvent represents a push event trigger configuration.
type GithubScheduleEvent ¶
type GithubScheduleEvent struct {
Cron string `json:"cron,omitempty" yaml:"cron,omitempty"`
}
ScheduleEvent represents a cron schedule event trigger configuration.
type GithubStep ¶
type GithubStep struct {
Name string `json:"name,omitempty" yaml:"name,omitempty"`
ID string `json:"id,omitempty" yaml:"id,omitempty"`
Uses string `json:"uses,omitempty" yaml:"uses,omitempty"`
Run string `json:"run,omitempty" yaml:"run,omitempty"`
With map[string]string `json:"with,omitempty" yaml:"with,omitempty"`
Env map[string]any `json:"env,omitempty" yaml:"env,omitempty"`
Shell string `json:"shell,omitempty" yaml:"shell,omitempty"`
ContinueOnError bool `json:"continue-on-error,omitempty" yaml:"continue_on_error,omitempty"`
TimeoutMinutes int `json:"timeout-minutes,omitempty" yaml:"timeout_minutes,omitempty"`
If string `json:"if,omitempty" yaml:"if,omitempty"`
}
Step represents a step in a GitHub job.
type GithubStrategy ¶
type GithubStrategy struct {
Matrix map[string][]string `json:"matrix,omitempty" yaml:"matrix,omitempty"`
MaxParallel int `json:"max-parallel,omitempty" yaml:"max_parallel,omitempty"`
FailFast bool `json:"fail-fast,omitempty" yaml:"fail_fast,omitempty"`
}
Strategy represents a job strategy (matrix) configuration.
type GithubTriggerEvents ¶
type GithubTriggerEvents struct {
Push GithubPushEvent `json:"push" yaml:"push,omitempty"`
PullRequest GithubPullRequestEvent `json:"pull_request" yaml:"pull_request,omitempty"`
Schedule []GithubScheduleEvent `json:"schedule,omitempty" yaml:"schedule,omitempty"`
WorkflowDispatch GithubWorkflowDispatchEvent `json:"workflow_dispatch" yaml:"workflow_dispatch,omitempty"`
}
TriggerEvents represents the trigger events for the GitHub workflow.
type GithubWorkflow ¶
type GithubWorkflow struct {
Name string `json:"name,omitempty" yaml:"name,omitempty"`
On *GithubTriggerEvents `json:"on" yaml:"on"`
Jobs OrderedMap `json:"jobs" yaml:"jobs"`
Defaults *GithubDefaults `json:"defaults,omitempty" yaml:"defaults,omitempty"`
Env map[string]any `json:"env,omitempty" yaml:"env,omitempty"`
Permissions map[string]string `json:"permissions,omitempty" yaml:"permissions,omitempty"`
}
Workflow represents the root of a GitHub workflow file.
type GithubWorkflowDispatchEvent ¶
type GithubWorkflowDispatchEvent struct {
Inputs map[string]GithubInput `json:"inputs,omitempty" yaml:"inputs,omitempty"`
}
WorkflowDispatchEvent represents a manually triggered workflow dispatch event.
type GlobalDefinitions ¶ added in v0.3.6
type GlobalDefinitions struct {
Caches map[string]*CachValue `yaml:"caches,omitempty"`
// Definitions of the pipelines which can be used in other repositories of the same
// Bitbucket workspace.
Pipelines map[string]*PipelineValue `yaml:"pipelines,omitempty"`
Services map[string]ServiceDefinition `yaml:"services,omitempty"`
}
The definitions of caches and services used in the declared pipelines.
type GlobalOptions ¶ added in v0.3.6
type GlobalOptions struct {
// Enables Docker service for every step.
Docker *bool `yaml:"docker,omitempty"`
MaxTime *int64 `yaml:"max-time,omitempty"`
Runtime *StepRuntime `yaml:"runtime,omitempty"`
Size *StepSize `yaml:"size,omitempty"`
}
Global options allow to override the default values applied to all steps in all declared pipelines.
type Image ¶ added in v0.3.6
type Image struct {
ImageClass *ImageClass
String *string
}
type ImageClass ¶ added in v0.3.6
type ImageClass struct {
Name string `yaml:"name"`
// The UID of a user in the docker image to run as. Overrides image's default user,
// specified user UID must be an existing user in the image with a valid home directory.
RunAsUser *int64 `yaml:"run-as-user,omitempty"`
Aws any `yaml:"aws,omitempty"`
// The password to use when fetching the Docker image.
Password any `yaml:"password,omitempty"`
// The username to use when fetching the Docker image.
Username any `yaml:"username,omitempty"`
}
The parameters of the Docker image to use when running a step.
type ImportEntry ¶ added in v0.9.12
type ImportEntry struct {
// Src of the config or file
Src string `yaml:"src" json:"src"`
// Hash is the sha256:$SUM of the file
// currently only sha256 is supported but others might be supported in the future
Hash string `yaml:"hash,omitempty" json:"hash,omitempty"`
// Dest is the destination on local disk where the file can be picked up from
Dest string `yaml:"dest,omitempty" json:"dest,omitempty"`
}
ImportEntry represents an entry in the unified import list. Supports both plain string form (backward compatible config import) and object form with src, hash, and dest fields.
Plain strings are treated as config imports (YAML merged into config). Objects with a dest field are treated as file imports (written to disk). The dest field is required for file imports and specifies the path relative to the project root. Objects without dest are treated as config imports with optional hash verification.
func (*ImportEntry) HasHash ¶ added in v0.9.12
func (ie *ImportEntry) HasHash() (bool, ParsedHash, error)
HasHash checks whether a hash verification has been provided and should be performed
func (*ImportEntry) IsFileImport ¶ added in v0.9.12
func (ie *ImportEntry) IsFileImport() bool
IsFileImport returns true if this entry should be handled as a file import (written to disk rather than parsed as config). An entry is a file import when dest is explicitly set.
func (*ImportEntry) UnmarshalYAML ¶ added in v0.9.12
func (ie *ImportEntry) UnmarshalYAML(value *yaml.Node) error
UnmarshalYAML supports both string and object forms in the import list.
type OrderedMap ¶ added in v0.4.1
type OrderedMap struct {
Keys []string
Values map[string]GithubJob
// contains filtered or unexported fields
}
OrderedMap preserves insertion order of keys when (un)marshaling YAML.
func NewOrderedMap ¶ added in v0.4.1
func NewOrderedMap(initialItems ...OrderedMap) OrderedMap
func (*OrderedMap) Add ¶ added in v0.4.1
func (om *OrderedMap) Add(key string, val GithubJob)
func (OrderedMap) MarshalYAML ¶ added in v0.4.1
func (om OrderedMap) MarshalYAML() (any, error)
MarshalYAML implements yaml.Marshaler.
func (*OrderedMap) UnmarshalYAML ¶ added in v0.4.1
func (om *OrderedMap) UnmarshalYAML(node *yaml.Node) error
UnmarshalYAML implements yaml.Unmarshaler.
type Parallel ¶ added in v0.3.6
type Parallel struct {
ParallelClass *ParallelClass
ParallelGroupStepArray []ParallelGroupStep
}
type ParallelClass ¶ added in v0.3.6
type ParallelClass struct {
// Stop the whole parallel group in case one of its steps fails.
FailFast *bool `yaml:"fail-fast,omitempty"`
Steps []ParallelGroupStep `yaml:"steps"`
}
type ParallelGroupStep ¶ added in v0.3.6
type ParallelGroupStep struct {
Step *ParallelGroupStepStep `yaml:"step,omitempty"`
}
List of steps in the parallel group to run concurrently.
type ParallelGroupStepStep ¶ added in v0.3.6
type ParallelGroupStepStep struct {
// List of commands to execute after the step succeeds or fails.
AfterScript []AfterScriptElement `yaml:"after-script,omitempty"`
Artifacts *Artifacts `yaml:"artifacts,omitempty"`
// Caches enabled for the step.
Caches []string `yaml:"caches,omitempty"`
Clone *CloneRepositorySettings `yaml:"clone,omitempty"`
// The deployment environment for the step.
Deployment *string `yaml:"deployment,omitempty"`
// Stop the parent parallel group in case this step fails.
FailFast *bool `yaml:"fail-fast,omitempty"`
Image *Image `yaml:"image,omitempty"`
MaxTime *int64 `yaml:"max-time,omitempty"`
// The name of the step.
Name *string `yaml:"name,omitempty"`
// Enables the use of OpenID Connect to connect a pipeline step to a resource server.
Oidc *bool `yaml:"oidc,omitempty"`
RunsOn *RunsOn `yaml:"runs-on,omitempty"`
Runtime *StepRuntime `yaml:"runtime,omitempty"`
// List of commands that are executed in sequence.
Script []AfterScriptElement `yaml:"script"`
// Services enabled for the step.
Services []string `yaml:"services,omitempty"`
Size *StepSize `yaml:"size,omitempty"`
// The trigger used for the pipeline step.
Trigger *Trigger `yaml:"trigger,omitempty"`
// The condition to execute the step.
Condition *Condition `yaml:"condition,omitempty"`
}
type ParsedHash ¶ added in v0.9.12
ParsedHash struct holds the `algorithm:hex_digest` combination
type Pipe ¶ added in v0.3.6
type Pipe struct {
// The full pipe identifier.
Pipe string `yaml:"pipe"`
// Environment variables passed to the pipe container.
Variables map[string]*PipeVariable `yaml:"variables,omitempty"`
}
The pipe to execute.
type PipeVariable ¶ added in v0.3.6
Environment variable value
type PipelineItem ¶ added in v0.3.6
type PipelineItem struct {
Step *ParallelGroupStepStep `yaml:"step,omitempty"`
Parallel *Parallel `yaml:"parallel,omitempty"`
Stage *Stage `yaml:"stage,omitempty"`
}
List of steps, stages and parallel groups of the pipeline.
List of steps in the parallel group to run concurrently.
type PipelineValue ¶ added in v0.3.6
type PipelineValue struct {
CustomPipelineItemArray []CustomPipelineItem
DefaultClass *DefaultClass
}
type Pipelines ¶ added in v0.3.6
type Pipelines struct {
// Branch-specific build pipelines.
Branches map[string]*DefaultPipeline `yaml:"branches,omitempty"`
// Pipelines that can only be triggered manually or be scheduled.
Custom map[string]*PipelineValue `yaml:"custom,omitempty"`
// Default pipeline runs on every push except for tags unless a branch-specific pipeline is
// defined.
Default *DefaultPipeline `yaml:"default,omitempty"`
// Pull-request-specific build pipelines.
PullRequests map[string]*PullRequestValue `yaml:"pull-requests,omitempty"`
// Tag-specific build pipelines.
Tags map[string]*DefaultPipeline `yaml:"tags,omitempty"`
}
type PullRequestClass ¶ added in v0.3.6
type PullRequestClass struct {
Destinations map[string]*DefaultPipeline `yaml:"destinations,omitempty"`
}
type PullRequestValue ¶ added in v0.3.6
type PullRequestValue struct {
PipelineItemArray []PipelineItem
PullRequestClass *PullRequestClass
}
type ServiceDefinition ¶ added in v0.3.6
type ServiceDefinition struct {
Image *Image `yaml:"image,omitempty"`
// Memory limit for the service container, in megabytes.
Memory *int64 `yaml:"memory,omitempty"`
// Specifies Docker service container (to run Docker-in-Docker).
Type *Type `yaml:"type,omitempty"`
// Environment variables passed to the service container.
Variables map[string]string `yaml:"variables,omitempty"`
}
Custom service properties
type Stage ¶ added in v0.3.6
type Stage struct {
// The condition to execute the stage.
Condition *Condition `yaml:"condition,omitempty"`
// The deployment environment for the stage.
Deployment *string `yaml:"deployment,omitempty"`
// The name of the stage.
Name *string `yaml:"name,omitempty"`
// List of steps in the stage.
Steps []StageStep `yaml:"steps"`
// The trigger used for the pipeline stage.
Trigger *Trigger `yaml:"trigger,omitempty"`
}
type StepRuntime ¶ added in v0.3.6
type StepRuntime struct {
Cloud *CloudStepRuntime `yaml:"cloud,omitempty"`
}
Custom step runtime
type StepSize ¶ added in v0.3.6
type StepSize string
The size of the step, sets the amount of resources allocated.
type StepStep ¶ added in v0.3.6
type StepStep struct {
// List of commands to execute after the step succeeds or fails.
AfterScript []AfterScriptElement `yaml:"after-script,omitempty"`
Artifacts *Artifacts `yaml:"artifacts,omitempty"`
// Caches enabled for the step.
Caches []string `yaml:"caches,omitempty"`
Clone *CloneRepositorySettings `yaml:"clone,omitempty"`
// The deployment environment for the step.
Deployment *string `yaml:"deployment,omitempty"`
// Stop the parent parallel group in case this step fails.
FailFast *bool `yaml:"fail-fast,omitempty"`
Image *Image `yaml:"image,omitempty"`
MaxTime *int64 `yaml:"max-time,omitempty"`
// The name of the step.
Name *string `yaml:"name,omitempty"`
// Enables the use of OpenID Connect to connect a pipeline step to a resource server.
Oidc *bool `yaml:"oidc,omitempty"`
RunsOn *RunsOn `yaml:"runs-on,omitempty"`
Runtime *StepRuntime `yaml:"runtime,omitempty"`
// List of commands that are executed in sequence.
Script []AfterScriptElement `yaml:"script"`
// Services enabled for the step.
Services []string `yaml:"services,omitempty"`
Size *StepSize `yaml:"size,omitempty"`
// The trigger used for the pipeline step.
Trigger *Trigger `yaml:"trigger,omitempty"`
Condition any `yaml:"condition,omitempty"`
}
type StringSlice ¶ added in v0.4.1
type StringSlice []string
StringSlice is a []string that can unmarshal from either a YAML string or a YAML sequence of strings.
func (StringSlice) JSONSchema ¶ added in v0.4.1
func (StringSlice) JSONSchema() *jsonschema.Schema
JSONSchema implements jsonschema.ExtSchema
func (*StringSlice) UnmarshalYAML ¶ added in v0.4.1
func (s *StringSlice) UnmarshalYAML(value *yaml.Node) error
UnmarshalYAML implements yaml.Unmarshaler.