Discover modules > cue.dev/x/gitlab > gitlabci
v0.4.0
#Pipeline: ¶
$schema?: net.AbsURL ¶
spec?: ¶
inputs?: #configInputs ¶
image?: #image ¶
services?: #services ¶
before_script?: #before_script ¶
after_script?: #after_script ¶
variables?: #globalVariables ¶
cache?: #cache ¶
"!reference"?: #."!reference" ¶
default?: ¶
after_script?: #after_script ¶
artifacts?: #artifacts ¶
before_script?: #before_script ¶
hooks?: ¶
pre_get_sources_script?: #optional_script ¶
cache?: #cache ¶
image?: #image ¶
interruptible?: #interruptible ¶
id_tokens?: #id_tokens ¶
identity?: #identity ¶
retry?: #retry ¶
services?: #services ¶
tags?: #tags ¶
[0]: matchN(>=1, [strings.MinRunes(1), [_, ...] & [...string]]) ¶
timeout?: #timeout ¶
"!reference"?: #."!reference" ¶
stages?: list.UniqueItems() & [...matchN(>=1, [string, [...string]])] & [_, ...] ¶
[0]: matchN(>=1, [string, [...string]]) ¶
include?: matchN(1, [#include_item, [...#include_item]]) ¶
pages?: ¶
image?: #image ¶
services?: #services ¶
before_script?: #before_script ¶
after_script?: #after_script ¶
hooks?: ¶
pre_get_sources_script?: #optional_script ¶
rules?: #rules ¶
variables?: #jobVariables ¶
cache?: #cache ¶
id_tokens?: #id_tokens ¶
identity?: #identity ¶
inputs?: #jobInputs ¶
secrets?: #secrets ¶
script?: #script ¶
run?: #steps ¶
stage?: matchN(>=1, [strings.MinRunes(1), [_, ...] & [...string]]) ¶

Define what stage the job will run in.

only?: #filter ¶
extends?: matchN(1, [string, [...string] & [_, ...]]) ¶

The name of one or more jobs to inherit configuration from.

needs?:
click to see definition
[...matchN(1, [string, close({
	job!:       string
	artifacts?: bool
	optional?:  bool
	parallel?:  #parallel_matrix
}), close({
	pipeline!:  string
	job!:       string
	artifacts?: bool
	parallel?:  #parallel_matrix
}), close({
	job!:       string
	project!:   string
	ref!:       string
	artifacts?: bool
	parallel?:  #parallel_matrix
}), #."!reference"])]
¶

The list of jobs in previous stages whose sole completion is needed to start the current job.

except?: #filter ¶
tags?: #tags ¶
[0]: matchN(>=1, [strings.MinRunes(1), [_, ...] & [...string]]) ¶
allow_failure?: #allow_failure ¶
timeout?: #timeout ¶
when?: #when ¶
start_in?: #start_in ¶
manual_confirmation?: string ¶
dependencies?: [...string] ¶

Specify a list of job names from earlier stages from which artifacts should be loaded. By default, all previous artifacts are passed. Use an empty array to skip downloading artifacts.

artifacts?: #artifacts ¶
environment?:
click to see definition
matchN(1, [string, close({
	name!: strings.MinRunes(1)
	url?: net.AbsURL & {
		=~"^(https?://.+|\\$[A-Za-z]+)"
	}
	on_stop?:      string
	action?:       "start" | "prepare" | "stop" | "verify" | "access"
	auto_stop_in?: string
	kubernetes?: {
		agent?:              string
		namespace?:          strings.MinRunes(1)
		flux_resource_path?: string
		managed_resources?: {
			enabled?: bool
			...
		}
		dashboard?: {
			namespace?:          strings.MinRunes(1)
			flux_resource_path?: string
			...
		}
		...
	}
	deployment_tier?: string
})])
¶

Used to associate environment metadata with a deploy. Environment can have a name and URL attached to it, and will be displayed under /environments under the project.

release?: ¶

Indicates that the job creates a Release.

tag_name!: strings.MinRunes(1) ¶

The tag_name must be specified. It can refer to an existing Git tag or can be specified by the user.

tag_message?: string ¶

Message to use if creating a new annotated tag.

description!: strings.MinRunes(1) ¶

Specifies the longer description of the Release.

name?: string ¶

The Release name. If omitted, it is populated with the value of release: tag_name.

ref?: string ¶

If the release: tag_name doesn’t exist yet, the release is created from ref. ref can be a commit SHA, another tag name, or a branch name.

milestones?: [...string] ¶

The title of each milestone the release is associated with.

released_at?:
click to see definition
time.Time & {
	=~"^(?:[1-9]\\d{3}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1\\d|2[0-8])|(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[1-9]\\d(?:0[48]|[2468][048]|[13579][26])|(?:[2468][048]|[13579][26])00)-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:Z|[+-][01]\\d:[0-5]\\d)$"
}
¶

The date and time when the release is ready. Defaults to the current date and time if not defined. Should be enclosed in quotes and expressed in ISO 8601 format.

assets?: ¶
links!:
click to see definition
[...close({
	name!:      strings.MinRunes(1)
	url!:       strings.MinRunes(1)
	filepath?:  string
	link_type?: "runbook" | "package" | "image" | "other"
})] & [_, ...]
¶

Include asset links in the release.

[0]: ¶
name!: strings.MinRunes(1) ¶

The name of the link.

url!: strings.MinRunes(1) ¶

The URL to download a file.

filepath?: string ¶

The redirect link to the url.

link_type?: "runbook" | "package" | "image" | "other" ¶

The content kind of what users can download via url.

coverage?: regexp.Valid & { =~"^/.+/$" } ¶

Must be a regular expression, optionally but recommended to be quoted, and must be surrounded with '/'. Example: '/Code coverage: \d+\.\d+/'

retry?: #retry ¶
parallel?: #parallel ¶
interruptible?: #interruptible ¶
resource_group?: string ¶

Limit job concurrency. Can be used to ensure that the Runner will not run certain jobs simultaneously.

trigger?:
click to see definition
matchN(1, [close({
	project!:  =~"(?:\\S/\\S|\\$\\S+)"
	branch?:   string
	strategy?: "depend" | "mirror"
	inputs?:   #inputs
	forward?: close({
		yaml_variables?:     bool
		pipeline_variables?: bool
	})
	branch?: _
	if branch != _|_ // explicit error (_|_ literal) in source
	{
		project!: _
	}
	{}
}), close({
	include?: matchN(1, [net.URL & =~"\\.ya?ml$", list.MaxItems(3) & [...matchN(1, [close({
		local!: net.URL & {
			=~"\\.ya?ml$"
		}
		inputs?: #inputs
	}), close({
		template!: net.URL & {
			=~"\\.ya?ml$"
		}
		inputs?: #inputs
	}), close({
		artifact!: net.URL & {
			=~"\\.ya?ml$"
		}
		job!:    string
		inputs?: #inputs
	}), close({
		project!: =~"(?:\\S/\\S|\\$\\S+)"
		ref?:     strings.MinRunes(1)
		file!: net.URL & {
			=~"\\.ya?ml$"
		}
		inputs?: #inputs
	}), close({
		component!: net.URL
		inputs?:    #inputs
	}), close({
		remote!: net.URL & {
			=~"^https?://.+\\.ya?ml$"
		}
		inputs?: #inputs
	})])]])
	strategy?: "depend" | "mirror"
	forward?: close({
		yaml_variables?:     bool
		pipeline_variables?: bool
	})
}), =~"(?:\\S/\\S|\\$\\S+)"])
¶
inherit?: ¶
default?:
click to see definition
matchN(1, [bool, [..."after_script" | "artifacts" | "before_script" | "cache" | "image" | "interruptible" | "retry" | "services" | "tags" | "timeout"]])
¶
variables?: matchN(1, [bool, [...string]]) ¶
publish?: string ¶

Deprecated. Use `pages.publish` instead. A path to a directory that contains the files to be published with Pages.

pages?:
click to see definition
matchN(1, [close({
	path_prefix?: string
	expire_in?:   string
	publish?:     string
}), bool])
¶
workflow?: ¶
name?: #workflowName ¶
auto_cancel?: ¶
on_job_failure?: "none" | "all" ¶
on_new_commit?: "conservative" | "interruptible" | "none" ¶
rules?:
click to see definition
[...matchN(>=1, [{
	...
}, [_, ...] & [...string]]) & ([...] | close({
	if?:          #if
	changes?:     #changes
	exists?:      #exists
	variables?:   #rulesVariables
	when?:        "always" | "never"
	auto_cancel?: #workflowAutoCancel
}))]
¶
#: ¶
"!reference": [...strings.MinRunes(1)] ¶
#after_script: #optional_script ¶
#allow_failure:
click to see definition
matchN(1, [bool, close({
	exit_codes!: int
}), close({
	exit_codes!: list.UniqueItems() & [_, ...] & [...int]
})])
¶
#artifacts:
click to see definition
null | close({
	paths?: [...string] & [_, ...]
	exclude?: [...string] & [_, ...]
	expose_as?: string
	name?:      string
	untracked?: bool
	when?:      "on_success" | "on_failure" | "always"
	access?:    "none" | "developer" | "maintainer" | "all"
	expire_in?: string
	reports?: close({
		accessibility?: string
		annotations?:   string
		junit?: matchN(1, [string, [...string] & [_, ...]])
		browser_performance?: string
		coverage_report?: null | {
			coverage_format?: "cobertura" | "jacoco"
			path?:            strings.MinRunes(1)
			...
		}
		codequality?:         #string_file_list
		dotenv?:              #string_file_list
		lsif?:                #string_file_list
		sast?:                #string_file_list
		dependency_scanning?: #string_file_list
		container_scanning?:  #string_file_list
		dast?:                #string_file_list
		license_management?:  #string_file_list
		license_scanning?:    #string_file_list
		requirements?:        #string_file_list
		secret_detection?:    #string_file_list
		metrics?:             #string_file_list
		terraform?:           #string_file_list
		cyclonedx?:           #string_file_list
		load_performance?:    #string_file_list
		repository_xray?:     #string_file_list
	})
})
¶
#baseInput: ¶
type?: "array" | "boolean" | "number" | "string" ¶
description?: strings.MaxRunes(1024) ¶
options?: [...bool | number | string] ¶
regex?: string ¶
default?: _ ¶
#before_script: #optional_script ¶
#cache: matchN(1, [#cache_item, [...#cache_item]]) ¶
#cache_item: ¶
key?:
click to see definition
matchN(1, [=~"^[^/]*[^./][^/]*$", {
	files?: list.MaxItems(2) & [...string] & [_, ...]
	files_commits?: list.MaxItems(2) & [...string] & [_, ...]
	prefix?: string
	...
}])
¶
paths?: [...string] ¶
policy?: =~"pull-push|pull|push|\\$\\w{1,255}" ¶
unprotect?: bool ¶
untracked?: bool ¶
when?: "on_success" | "on_failure" | "always" ¶
fallback_keys?: list.MaxItems(5) & [...string] ¶
#changes: matchN(>=1, [close({ paths!: [...string] compare_to?: string }), [...string]]) ¶
#configInputs:
click to see definition
{
	{
		[=~".*"]: matchN(1, [matchN(3, [#baseInput, null | bool | number | string | [...] | {
			rules?: [...{
				...
			}]
			...
		}, matchN(4, [matchIf(null | bool | number | string | [...] | {
			type?: "string"
			...
		}, null | bool | number | string | [...] | {
			default?: null | string
			...
		}, _), matchIf(null | bool | number | string | [...] | {
			type?: "number"
			...
		}, null | bool | number | string | [...] | {
			default?: null | number
			...
		}, _), matchIf(null | bool | number | string | [...] | {
			type?: "boolean"
			...
		}, null | bool | number | string | [...] | {
			default?: null | bool
			...
		}, _), matchIf(null | bool | number | string | [...] | {
			type?: "array"
			...
		}, null | bool | number | string | [...] | {
			default?: null | [...]
			...
		}, _)])]), null])
	}
	...
}
¶
#exists:
click to see definition
matchN(>=1, [[...string], close({
	paths!: [...string]
	project?: string
}), close({
	paths!: [...string]
	project!: string
	ref?:     string
})])
¶
#filter:
click to see definition
matchN(1, [null, #filter_refs, close({
	refs?:       #filter_refs
	kubernetes?: "active"
	variables?: [...string]
	changes?: [...string]
})])
¶
#filter_refs:
click to see definition
[...matchN(>=1, [matchN(1, ["branches", "tags", "api", "external", "pipelines", "pushes", "schedules", "triggers", "web"]), string])]
¶

Filter job by different keywords that determine origin or state, or by supplying string/regex to check against branch/tag names.

#globalVariables:
click to see definition
{
	[=~".*"]: matchN(1, [bool | number | string, close({
		value?: string
		options?: list.UniqueItems() & [...string] & [_, ...]
		description?: string
		expand?:      bool
	})])
}
...
¶
#hooks: ¶
pre_get_sources_script?: #optional_script ¶
#id_tokens:
click to see definition
{
	[=~".*"]: close({
		aud!: matchN(1, [string, list.UniqueItems() & [...string] & [_, ...]])
	})
}
...
¶
#identity: "google_cloud" ¶
#if: string ¶
#image:
click to see definition
matchN(1, [strings.MinRunes(1), close({
	name!: strings.MinRunes(1)
	entrypoint?: [_, ...]
	docker?: close({
		platform?: strings.MinRunes(1)
		user?:     strings.MinRunes(1) & strings.MaxRunes(255)
	})
	kubernetes?: close({
		user?: int | strings.MinRunes(1) & strings.MaxRunes(255)
	})
	pull_policy?: matchN(1, ["always" | "never" | "if-not-present", list.UniqueItems() & [..."always" | "never" | "if-not-present"] & [_, ...]])
})])
¶
#includeRules:
click to see definition
null | [...matchN(>=1, [close({
	if?:      #if
	changes?: #changes
	exists?:  #exists
	when?: matchN(1, ["never" | "always", null])
}), strings.MinRunes(1), [_, ...] & [...string]])]
¶
#include_item:
click to see definition
matchN(1, [matchN(>=1, [=~"^https?://", string & matchN(0, [null | bool | number | =~"^\\w+://" | [...] | {
	...
}])]) & net.URL & =~"\\w\\.ya?ml$", close({
	local!: net.URL & {
		=~"\\.ya?ml$"
	}
	rules?:  #includeRules
	inputs?: #inputs
}), close({
	project!: =~"(?:\\S/\\S|\\$\\S+)"
	ref?:     string
	file!: matchN(1, [=~"\\.ya?ml$", [...=~"\\.ya?ml$"]])
	rules?:  #includeRules
	inputs?: #inputs
}), close({
	template!: net.URL & {
		=~"\\.ya?ml$"
	}
	rules?:  #includeRules
	inputs?: #inputs
}), close({
	component!: net.URL
	rules?:     #includeRules
	inputs?:    #inputs
}), close({
	remote!: net.URL & {
		=~"^https?://.+\\.ya?ml$"
	}
	integrity?: =~"^sha256-[A-Za-z0-9+/]{43}=$"
	rules?:     #includeRules
	inputs?:    #inputs
})])
¶
#inputs:
click to see definition
close({
	[=~"^[a-zA-Z0-9_-]+$"]: matchN(1, [strings.MaxRunes(1024), number, bool, [...matchN(1, [string, number, bool, {
		...
	}, [...null | bool | number | string | [...] | {
		...
	}]])], {
		...
	}, null])
})
¶
#interruptible: bool ¶
#job: ¶
image?: #image ¶
services?: #services ¶
before_script?: #before_script ¶
after_script?: #after_script ¶
hooks?: ¶
pre_get_sources_script?: #optional_script ¶
rules?: #rules ¶
variables?: #jobVariables ¶
cache?: #cache ¶
id_tokens?: #id_tokens ¶
identity?: #identity ¶
inputs?: #jobInputs ¶
secrets?: #secrets ¶
script?: #script ¶
run?: #steps ¶
stage?: matchN(>=1, [strings.MinRunes(1), [_, ...] & [...string]]) ¶

Define what stage the job will run in.

only?: #filter ¶
extends?: matchN(1, [string, [...string] & [_, ...]]) ¶

The name of one or more jobs to inherit configuration from.

needs?:
click to see definition
[...matchN(1, [string, close({
	job!:       string
	artifacts?: bool
	optional?:  bool
	parallel?:  #parallel_matrix
}), close({
	pipeline!:  string
	job!:       string
	artifacts?: bool
	parallel?:  #parallel_matrix
}), close({
	job!:       string
	project!:   string
	ref!:       string
	artifacts?: bool
	parallel?:  #parallel_matrix
}), #."!reference"])]
¶

The list of jobs in previous stages whose sole completion is needed to start the current job.

except?: #filter ¶
tags?: #tags ¶
[0]: matchN(>=1, [strings.MinRunes(1), [_, ...] & [...string]]) ¶
allow_failure?: #allow_failure ¶
timeout?: #timeout ¶
when?: #when ¶
start_in?: #start_in ¶
manual_confirmation?: string ¶
dependencies?: [...string] ¶

Specify a list of job names from earlier stages from which artifacts should be loaded. By default, all previous artifacts are passed. Use an empty array to skip downloading artifacts.

artifacts?: #artifacts ¶
environment?:
click to see definition
matchN(1, [string, close({
	name!: strings.MinRunes(1)
	url?: net.AbsURL & {
		=~"^(https?://.+|\\$[A-Za-z]+)"
	}
	on_stop?:      string
	action?:       "start" | "prepare" | "stop" | "verify" | "access"
	auto_stop_in?: string
	kubernetes?: {
		agent?:              string
		namespace?:          strings.MinRunes(1)
		flux_resource_path?: string
		managed_resources?: {
			enabled?: bool
			...
		}
		dashboard?: {
			namespace?:          strings.MinRunes(1)
			flux_resource_path?: string
			...
		}
		...
	}
	deployment_tier?: string
})])
¶

Used to associate environment metadata with a deploy. Environment can have a name and URL attached to it, and will be displayed under /environments under the project.

release?: ¶

Indicates that the job creates a Release.

tag_name!: strings.MinRunes(1) ¶

The tag_name must be specified. It can refer to an existing Git tag or can be specified by the user.

tag_message?: string ¶

Message to use if creating a new annotated tag.

description!: strings.MinRunes(1) ¶

Specifies the longer description of the Release.

name?: string ¶

The Release name. If omitted, it is populated with the value of release: tag_name.

ref?: string ¶

If the release: tag_name doesn’t exist yet, the release is created from ref. ref can be a commit SHA, another tag name, or a branch name.

milestones?: [...string] ¶

The title of each milestone the release is associated with.

released_at?:
click to see definition
time.Time & {
	=~"^(?:[1-9]\\d{3}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1\\d|2[0-8])|(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[1-9]\\d(?:0[48]|[2468][048]|[13579][26])|(?:[2468][048]|[13579][26])00)-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:Z|[+-][01]\\d:[0-5]\\d)$"
}
¶

The date and time when the release is ready. Defaults to the current date and time if not defined. Should be enclosed in quotes and expressed in ISO 8601 format.

assets?: ¶
links!:
click to see definition
[...close({
	name!:      strings.MinRunes(1)
	url!:       strings.MinRunes(1)
	filepath?:  string
	link_type?: "runbook" | "package" | "image" | "other"
})] & [_, ...]
¶

Include asset links in the release.

[0]: ¶
name!: strings.MinRunes(1) ¶

The name of the link.

url!: strings.MinRunes(1) ¶

The URL to download a file.

filepath?: string ¶

The redirect link to the url.

link_type?: "runbook" | "package" | "image" | "other" ¶

The content kind of what users can download via url.

coverage?: regexp.Valid & { =~"^/.+/$" } ¶

Must be a regular expression, optionally but recommended to be quoted, and must be surrounded with '/'. Example: '/Code coverage: \d+\.\d+/'

retry?: #retry ¶
parallel?: #parallel ¶
interruptible?: #interruptible ¶
resource_group?: string ¶

Limit job concurrency. Can be used to ensure that the Runner will not run certain jobs simultaneously.

trigger?:
click to see definition
matchN(1, [close({
	project!:  =~"(?:\\S/\\S|\\$\\S+)"
	branch?:   string
	strategy?: "depend" | "mirror"
	inputs?:   #inputs
	forward?: close({
		yaml_variables?:     bool
		pipeline_variables?: bool
	})
	branch?: _
	if branch != _|_ // explicit error (_|_ literal) in source
	{
		project!: _
	}
	{}
}), close({
	include?: matchN(1, [net.URL & =~"\\.ya?ml$", list.MaxItems(3) & [...matchN(1, [close({
		local!: net.URL & {
			=~"\\.ya?ml$"
		}
		inputs?: #inputs
	}), close({
		template!: net.URL & {
			=~"\\.ya?ml$"
		}
		inputs?: #inputs
	}), close({
		artifact!: net.URL & {
			=~"\\.ya?ml$"
		}
		job!:    string
		inputs?: #inputs
	}), close({
		project!: =~"(?:\\S/\\S|\\$\\S+)"
		ref?:     strings.MinRunes(1)
		file!: net.URL & {
			=~"\\.ya?ml$"
		}
		inputs?: #inputs
	}), close({
		component!: net.URL
		inputs?:    #inputs
	}), close({
		remote!: net.URL & {
			=~"^https?://.+\\.ya?ml$"
		}
		inputs?: #inputs
	})])]])
	strategy?: "depend" | "mirror"
	forward?: close({
		yaml_variables?:     bool
		pipeline_variables?: bool
	})
}), =~"(?:\\S/\\S|\\$\\S+)"])
¶
inherit?: ¶
default?:
click to see definition
matchN(1, [bool, [..."after_script" | "artifacts" | "before_script" | "cache" | "image" | "interruptible" | "retry" | "services" | "tags" | "timeout"]])
¶
variables?: matchN(1, [bool, [...string]]) ¶
publish?: string ¶

Deprecated. Use `pages.publish` instead. A path to a directory that contains the files to be published with Pages.

pages?:
click to see definition
matchN(1, [close({
	path_prefix?: string
	expire_in?:   string
	publish?:     string
}), bool])
¶
#jobInputs:
click to see definition
struct.MaxFields(50) & {
	{
		[=~".*"]: matchN(3, [#baseInput, null | bool | number | string | [...] | {
			default!: _
			...
		}, matchN(4, [matchIf(null | bool | number | string | [...] | {
			type?: "string"
			...
		}, null | bool | number | string | [...] | {
			default?: string
			...
		}, _), matchIf(null | bool | number | string | [...] | {
			type?: "number"
			...
		}, null | bool | number | string | [...] | {
			default?: number
			...
		}, _), matchIf(null | bool | number | string | [...] | {
			type?: "boolean"
			...
		}, null | bool | number | string | [...] | {
			default?: bool
			...
		}, _), matchIf(null | bool | number | string | [...] | {
			type?: "array"
			...
		}, null | bool | number | string | [...] | {
			default?: [...]
			...
		}, _)])])
	}
	...
}
¶
#jobVariables:
click to see definition
{
	{
		[=~".*"]: matchN(1, [bool | number | string, close({
			value?:  string
			expand?: bool
		})])
	}
	...
}
¶
#job_template: ¶
image?: #image ¶
services?: #services ¶
before_script?: #before_script ¶
after_script?: #after_script ¶
hooks?: ¶
pre_get_sources_script?: #optional_script ¶
rules?: #rules ¶
variables?: #jobVariables ¶
cache?: #cache ¶
id_tokens?: #id_tokens ¶
identity?: #identity ¶
inputs?: #jobInputs ¶
secrets?: #secrets ¶
script?: #script ¶
run?: #steps ¶
stage?: matchN(>=1, [strings.MinRunes(1), [_, ...] & [...string]]) ¶

Define what stage the job will run in.

only?: #filter ¶
extends?: matchN(1, [string, [...string] & [_, ...]]) ¶

The name of one or more jobs to inherit configuration from.

needs?:
click to see definition
[...matchN(1, [string, close({
	job!:       string
	artifacts?: bool
	optional?:  bool
	parallel?:  #parallel_matrix
}), close({
	pipeline!:  string
	job!:       string
	artifacts?: bool
	parallel?:  #parallel_matrix
}), close({
	job!:       string
	project!:   string
	ref!:       string
	artifacts?: bool
	parallel?:  #parallel_matrix
}), #."!reference"])]
¶

The list of jobs in previous stages whose sole completion is needed to start the current job.

except?: #filter ¶
tags?: #tags ¶
[0]: matchN(>=1, [strings.MinRunes(1), [_, ...] & [...string]]) ¶
allow_failure?: #allow_failure ¶
timeout?: #timeout ¶
when?: #when ¶
start_in?: #start_in ¶
manual_confirmation?: string ¶
dependencies?: [...string] ¶

Specify a list of job names from earlier stages from which artifacts should be loaded. By default, all previous artifacts are passed. Use an empty array to skip downloading artifacts.

artifacts?: #artifacts ¶
environment?:
click to see definition
matchN(1, [string, close({
	name!: strings.MinRunes(1)
	url?: net.AbsURL & {
		=~"^(https?://.+|\\$[A-Za-z]+)"
	}
	on_stop?:      string
	action?:       "start" | "prepare" | "stop" | "verify" | "access"
	auto_stop_in?: string
	kubernetes?: {
		agent?:              string
		namespace?:          strings.MinRunes(1)
		flux_resource_path?: string
		managed_resources?: {
			enabled?: bool
			...
		}
		dashboard?: {
			namespace?:          strings.MinRunes(1)
			flux_resource_path?: string
			...
		}
		...
	}
	deployment_tier?: string
})])
¶

Used to associate environment metadata with a deploy. Environment can have a name and URL attached to it, and will be displayed under /environments under the project.

release?: ¶

Indicates that the job creates a Release.

tag_name!: strings.MinRunes(1) ¶

The tag_name must be specified. It can refer to an existing Git tag or can be specified by the user.

tag_message?: string ¶

Message to use if creating a new annotated tag.

description!: strings.MinRunes(1) ¶

Specifies the longer description of the Release.

name?: string ¶

The Release name. If omitted, it is populated with the value of release: tag_name.

ref?: string ¶

If the release: tag_name doesn’t exist yet, the release is created from ref. ref can be a commit SHA, another tag name, or a branch name.

milestones?: [...string] ¶

The title of each milestone the release is associated with.

released_at?:
click to see definition
time.Time & {
	=~"^(?:[1-9]\\d{3}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1\\d|2[0-8])|(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[1-9]\\d(?:0[48]|[2468][048]|[13579][26])|(?:[2468][048]|[13579][26])00)-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:Z|[+-][01]\\d:[0-5]\\d)$"
}
¶

The date and time when the release is ready. Defaults to the current date and time if not defined. Should be enclosed in quotes and expressed in ISO 8601 format.

assets?: ¶
links!:
click to see definition
[...close({
	name!:      strings.MinRunes(1)
	url!:       strings.MinRunes(1)
	filepath?:  string
	link_type?: "runbook" | "package" | "image" | "other"
})] & [_, ...]
¶

Include asset links in the release.

[0]: ¶
name!: strings.MinRunes(1) ¶

The name of the link.

url!: strings.MinRunes(1) ¶

The URL to download a file.

filepath?: string ¶

The redirect link to the url.

link_type?: "runbook" | "package" | "image" | "other" ¶

The content kind of what users can download via url.

coverage?: regexp.Valid & { =~"^/.+/$" } ¶

Must be a regular expression, optionally but recommended to be quoted, and must be surrounded with '/'. Example: '/Code coverage: \d+\.\d+/'

retry?: #retry ¶
parallel?: #parallel ¶
interruptible?: #interruptible ¶
resource_group?: string ¶

Limit job concurrency. Can be used to ensure that the Runner will not run certain jobs simultaneously.

trigger?:
click to see definition
matchN(1, [close({
	project!:  =~"(?:\\S/\\S|\\$\\S+)"
	branch?:   string
	strategy?: "depend" | "mirror"
	inputs?:   #inputs
	forward?: close({
		yaml_variables?:     bool
		pipeline_variables?: bool
	})
	branch?: _
	if branch != _|_ // explicit error (_|_ literal) in source
	{
		project!: _
	}
	{}
}), close({
	include?: matchN(1, [net.URL & =~"\\.ya?ml$", list.MaxItems(3) & [...matchN(1, [close({
		local!: net.URL & {
			=~"\\.ya?ml$"
		}
		inputs?: #inputs
	}), close({
		template!: net.URL & {
			=~"\\.ya?ml$"
		}
		inputs?: #inputs
	}), close({
		artifact!: net.URL & {
			=~"\\.ya?ml$"
		}
		job!:    string
		inputs?: #inputs
	}), close({
		project!: =~"(?:\\S/\\S|\\$\\S+)"
		ref?:     strings.MinRunes(1)
		file!: net.URL & {
			=~"\\.ya?ml$"
		}
		inputs?: #inputs
	}), close({
		component!: net.URL
		inputs?:    #inputs
	}), close({
		remote!: net.URL & {
			=~"^https?://.+\\.ya?ml$"
		}
		inputs?: #inputs
	})])]])
	strategy?: "depend" | "mirror"
	forward?: close({
		yaml_variables?:     bool
		pipeline_variables?: bool
	})
}), =~"(?:\\S/\\S|\\$\\S+)"])
¶
inherit?: ¶
default?:
click to see definition
matchN(1, [bool, [..."after_script" | "artifacts" | "before_script" | "cache" | "image" | "interruptible" | "retry" | "services" | "tags" | "timeout"]])
¶
variables?: matchN(1, [bool, [...string]]) ¶
publish?: string ¶

Deprecated. Use `pages.publish` instead. A path to a directory that contains the files to be published with Pages.

pages?:
click to see definition
matchN(1, [close({
	path_prefix?: string
	expire_in?:   string
	publish?:     string
}), bool])
¶
#optional_script: matchN(1, [string, [...matchN(>=1, [string, [...string]])]]) ¶
#parallel:
click to see definition
matchN(1, [int & >=1 & <=200, close({
	matrix!: list.MaxItems(200) & [...{
		[string]: number | string | [...]
	}]
})])
¶

Splits up a single job into multiple that run in parallel. Provides `CI_NODE_INDEX` and `CI_NODE_TOTAL` environment variables to the jobs.

#parallel_matrix: ¶

Use the `needs:parallel:matrix` keyword to specify parallelized jobs needed to be completed for the job to run. [Learn More](https://docs.gitlab.com/ci/yaml/#needsparallelmatrix)

matrix!: list.MaxItems(200) & [...{ [string]: number | string | [...] }] ¶

Defines different variables for jobs that are running in parallel.

#retry:
click to see definition
matchN(1, [#retry_max, close({
	max?: #retry_max
	when?: matchN(1, [#retry_errors, [...#retry_errors]])
	exit_codes?: matchN(1, [list.UniqueItems() & [_, ...] & [...int], int])
})])
¶
#retry_errors:
click to see definition
matchN(1, ["always", "unknown_failure", "script_failure", "api_failure", "stuck_or_timeout_failure", "runner_system_failure", "runner_unsupported", "stale_schedule", "job_execution_timeout", "archived_failure", "unmet_prerequisites", "scheduler_failure", "data_integrity_failure"])
¶
#retry_max: int & >=0 & <=2 ¶

The number of times the job will be retried if it fails. Defaults to 0 and can max be retried 2 times (3 times total).

#rules:
click to see definition
null | [...matchN(>=1, [close({
	if?:            #if
	changes?:       #changes
	exists?:        #exists
	variables?:     #rulesVariables
	when?:          #when
	start_in?:      #start_in
	allow_failure?: #allow_failure
	needs?:         #rulesNeeds
	interruptible?: #interruptible
}), strings.MinRunes(1), [_, ...] & [...string]])]
¶
#rulesNeeds:
click to see definition
[...matchN(1, [string, close({
	job!:       strings.MinRunes(1)
	artifacts?: bool
	optional?:  bool
})])]
¶
#rulesVariables:
click to see definition
{
	{
		[=~".*"]: bool | number | string
	}
	...
}
¶
#script: matchN(1, [strings.MinRunes(1), [...matchN(>=1, [string, [...string]])] & [_, ...]]) ¶
#secrets:
click to see definition
{
	{
		[=~".*"]: matchN(>=1, [{
			vault!: _
			...
		}, {
			azure_key_vault!: _
			...
		}, {
			gcp_secret_manager!: _
			...
		}, {
			aws_secrets_manager!: _
			...
		}, {
			gitlab_secrets_manager!: _
			...
		}]) & close({
			vault?: matchN(1, [string, close({
				engine!: {
					name!: string
					path!: string
					...
				}
				path!:  string
				field!: string
			})])
			gcp_secret_manager?: close({
				name!: string
				version?: matchN(1, [string, int])
			})
			azure_key_vault?: close({
				name!:    string
				version?: string
			})
			aws_secrets_manager?: matchN(1, [string, close({
				secret_id!:         string
				version_id?:        string
				version_stage?:     string
				region?:            string
				role_arn?:          string
				role_session_name?: string
				field?:             string
			})])
			gitlab_secrets_manager?: close({
				name!:   string
				source?: string
			})
			file?:               bool
			token?:              string
			gcp_secret_manager?: _
			if gcp_secret_manager != _|_ // explicit error (_|_ literal) in source
			{
				token!: _
			}
			{}
		})
	}
	...
}
¶
#services:
click to see definition
[...matchN(1, [strings.MinRunes(1), close({
	name!: strings.MinRunes(1)
	entrypoint?: [_, ...] & [...string]
	docker?: close({
		platform?: strings.MinRunes(1)
		user?:     strings.MinRunes(1) & strings.MaxRunes(255)
	})
	kubernetes?: close({
		user?: int | strings.MinRunes(1) & strings.MaxRunes(255)
	})
	pull_policy?: matchN(1, ["always" | "never" | "if-not-present", list.UniqueItems() & [..."always" | "never" | "if-not-present"] & [_, ...]])
	command?:   #script
	alias?:     strings.MinRunes(1)
	variables?: #jobVariables
})])]
¶
#start_in: strings.MinRunes(1) ¶
#step:
click to see definition
matchN(1, [matchN(1, [matchN(0, [null | bool | number | string | [...] | {
	func!: _
	...
}]) & {
	step!: _
	...
}, matchN(0, [null | bool | number | string | [...] | {
	step!: _
	...
}]) & {
	func!: _
	...
}]) & close({
	name!:   #stepName
	env?:    #stepNamedStrings
	inputs?: #stepNamedValues
	step?:   #stepFuncReference
	func?:   #stepFuncReference
}), close({
	name!:   #stepName
	env?:    #stepNamedStrings
	script!: strings.MinRunes(1)
})])
¶

Any of these function use cases are valid.

#stepFuncReference: matchN(1, [string, #stepGitReference, #stepOciReference]) ¶
#stepGitReference: ¶

GitReference is a reference to a function in a Git repository.

git!: ¶
url!: string ¶
dir?: string ¶
rev!: string ¶
file?: string ¶
#stepName: =~"^[a-zA-Z_][a-zA-Z0-9_]*$" ¶
#stepNamedStrings: close({ [=~"^[a-zA-Z_][a-zA-Z0-9_]*$"]: string }) ¶
#stepNamedValues: close({ [=~"^[a-zA-Z_][a-zA-Z0-9_]*$"]: _ }) ¶
#stepOciReference: ¶

OCIReference is a reference to a function hosted in an OCI repository.

oci!: ¶
registry!: string ¶

The <host>[:<port>] of the container registry server.

repository!: string ¶

A path within the registry containing related OCI images. Typically the namespace, project, and image name.

tag!: string ¶

A pointer to the image manifest hosted in the OCI repository.

dir?: string ¶

A directory inside the OCI image where the function can be found.

file?: string ¶

The name of the file that defines the function, defaults to func.yml.

#steps: [...#step] ¶
#string_file_list: matchN(1, [string, [...string]]) ¶
#tags: [_, ...] & [...matchN(>=1, [strings.MinRunes(1), [_, ...] & [...string]])] ¶
[0]: matchN(>=1, [strings.MinRunes(1), [_, ...] & [...string]]) ¶
#timeout: strings.MinRunes(1) ¶
#when: "on_success" | "on_failure" | "always" | "never" | "manual" | "delayed" ¶
#workflowAutoCancel: ¶

Define the rules for when pipeline should be automatically cancelled.

on_job_failure?: "none" | "all" ¶
on_new_commit?: "conservative" | "interruptible" | "none" ¶
#workflowName: strings.MinRunes(1) & strings.MaxRunes(255) ¶

Source files

  • schema.cue