API Reference ¶
Structs ¶
AddChildrenProps ¶
Initializer ¶
Properties ¶
Name | Type | Description |
---|---|---|
jobsOrJobCollections |
Job | JobCollection[] |
No description. |
name |
string |
No description. |
stage |
string |
No description. |
jobsOrJobCollections
Required ¶
- Type: Job | JobCollection[]
name
Optional ¶
- Type: string
stage
Optional ¶
- Type: string
ArtifactsProps ¶
Initializer ¶
Properties ¶
Name | Type | Description |
---|---|---|
excludes |
string[] |
Paths that prevent files from being added to an artifacts archive. |
expireIn |
string |
How long the artifacts will be saved before it gets deleted. |
exposeAs |
string |
Used to expose artifacts in merge requests. |
name |
string |
Name of the artifacts archive. |
paths |
string[] |
Paths relative to project directory $CI_PROJECT_DIR , found files will be used to create the artifacts. |
public |
boolean |
True makes artifacts public. |
reports |
ArtifactsReport[] |
Reports must be a valid dictionary, the key represents a ArtifactsReport and the value must be a valid relativ file path to the reports file. |
untracked |
boolean |
If true adds all untracked file to artifacts archive. |
when |
WhenStatement |
When to upload artifacts, Only on_success , on_failure or always is allowed. |
excludes
Optional ¶
- Type: string[]
Paths that prevent files from being added to an artifacts archive.
expireIn
Optional ¶
- Type: string
How long the artifacts will be saved before it gets deleted.
exposeAs
Optional ¶
- Type: string
Used to expose artifacts in merge requests.
name
Optional ¶
- Type: string
Name of the artifacts archive.
Internally defaults to {PredefinedVariables.ciJobName}-{PredefinedVariables.ciCommitRefSlug}.
paths
Optional ¶
- Type: string[]
Paths relative to project directory $CI_PROJECT_DIR
, found files will be used to create the artifacts.
public
Optional ¶
- Type: boolean
True makes artifacts public.
reports
Optional ¶
- Type: ArtifactsReport[]
Reports must be a valid dictionary, the key represents a ArtifactsReport and the value must be a valid relativ file path to the reports file.
untracked
Optional ¶
- Type: boolean
If true adds all untracked file to artifacts archive.
when
Optional ¶
- Type: WhenStatement
When to upload artifacts, Only on_success
, on_failure
or always
is allowed.
ArtifactsReport ¶
Initializer ¶
Properties ¶
Name | Type | Description |
---|---|---|
file |
string |
Relative path withing the project, where to find the generated report file. |
reportType |
string |
https://docs.gitlab.com/ee/ci/yaml/artifacts_reports.html ArtifactsReport type to use. |
file
Required ¶
- Type: string
Relative path withing the project, where to find the generated report file.
reportType
Required ¶
- Type: string
https://docs.gitlab.com/ee/ci/yaml/artifacts_reports.html ArtifactsReport type to use.
CacheKeyProps ¶
Initializer ¶
Properties ¶
Name | Type | Description |
---|---|---|
files |
string[] |
No description. |
key |
string |
No description. |
prefix |
string |
No description. |
files
Optional ¶
- Type: string[]
key
Optional ¶
- Type: string
- Default: gcix.PredefinedVariables.ciCommitRefSlug
prefix
Optional ¶
- Type: string
CacheProps ¶
Initializer ¶
Properties ¶
Name | Type | Description |
---|---|---|
paths |
string[] |
No description. |
cacheKey |
CacheKey |
No description. |
policy |
CachePolicy |
No description. |
untracked |
boolean |
Set the untracked keyword to True to cache all files that are untracked in your Git repository. |
when |
WhenStatement |
No description. |
paths
Required ¶
- Type: string[]
cacheKey
Optional ¶
- Type: CacheKey
- Default: to
CacheKey
with default arguments.
policy
Optional ¶
- Type: CachePolicy
untracked
Optional ¶
- Type: boolean
Set the untracked keyword to True
to cache all files that are untracked in your Git repository.
when
Optional ¶
- Type: WhenStatement
ChildDict ¶
Initializer ¶
Properties ¶
Name | Type | Description |
---|---|---|
child |
Job | JobCollection |
No description. |
name |
string |
No description. |
stage |
string |
No description. |
child
Required ¶
- Type: Job | JobCollection
name
Optional ¶
- Type: string
stage
Optional ¶
- Type: string
ImageProps ¶
Initializer ¶
Properties ¶
Name | Type | Description |
---|---|---|
name |
string |
No description. |
entrypoint |
string[] |
No description. |
tag |
string |
No description. |
name
Required ¶
- Type: string
entrypoint
Optional ¶
- Type: string[]
tag
Optional ¶
- Type: string
IncludeArtifactProps ¶
Initializer ¶
Properties ¶
Name | Type | Description |
---|---|---|
artifact |
string |
Relative path to the artifact which is produced by job . |
job |
string |
Job name to include the artifact from. |
artifact
Required ¶
- Type: string
Relative path to the artifact which is produced by job
.
job
Required ¶
- Type: string
Job name to include the artifact from.
IncludeFileProps ¶
Initializer ¶
Properties ¶
Name | Type | Description |
---|---|---|
file |
string |
Relative path to the file to include. |
project |
string |
Project to include the file from. |
ref |
string |
Project branch to include the file from. |
file
Required ¶
- Type: string
Relative path to the file to include.
project
Required ¶
- Type: string
Project to include the file from.
ref
Optional ¶
- Type: string
Project branch to include the file from.
IncludeLocalProps ¶
Initializer ¶
Properties ¶
Name | Type | Description |
---|---|---|
local |
string |
Relative path to the file within this repository to include. |
local
Required ¶
- Type: string
Relative path to the file within this repository to include.
IncludeRemoteProps ¶
Initializer ¶
Properties ¶
Name | Type | Description |
---|---|---|
remote |
string |
URL to include the file from. |
remote
Required ¶
- Type: string
URL to include the file from.
IncludeTemplateProps ¶
Initializer ¶
Properties ¶
Name | Type | Description |
---|---|---|
template |
string |
Gitlab template pipeline to include. |
template
Required ¶
- Type: string
Gitlab template pipeline to include.
JobProps ¶
Initializer ¶
Properties ¶
Name | Type | Description |
---|---|---|
scripts |
string[] |
No description. |
allowFailure |
boolean | number[] |
No description. |
artifacts |
Artifacts |
No description. |
cache |
Cache |
No description. |
dependencies |
Job | JobCollection[] |
No description. |
image |
string | Image |
No description. |
name |
string |
No description. |
needs |
Job | JobCollection | Need[] |
No description. |
rules |
Rule[] |
No description. |
stage |
string |
No description. |
tags |
string[] |
No description. |
variables |
{[ key: string ]: string} |
No description. |
scripts
Required ¶
- Type: string[]
allowFailure
Optional ¶
- Type: boolean | number[]
artifacts
Optional ¶
- Type: Artifacts
cache
Optional ¶
- Type: Cache
dependencies
Optional ¶
- Type: Job | JobCollection[]
image
Optional ¶
- Type: string | Image
name
Optional ¶
- Type: string
needs
Optional ¶
- Type: Job | JobCollection | Need[]
rules
Optional ¶
- Type: Rule[]
stage
Optional ¶
- Type: string
tags
Optional ¶
- Type: string[]
variables
Optional ¶
- Type: {[ key: string ]: string}
NeedProps ¶
Initializer ¶
Properties ¶
Name | Type | Description |
---|---|---|
artifacts |
boolean |
No description. |
job |
string |
No description. |
pipeline |
string |
No description. |
project |
string |
No description. |
ref |
string |
No description. |
artifacts
Optional ¶
- Type: boolean
- Default: true
job
Optional ¶
- Type: string
- Default: undefined but requires
pipeline
to be set.
pipeline
Optional ¶
- Type: string
- Default: undefined which requires
job
to be set.
project
Optional ¶
- Type: string
- Default: undefined
ref
Optional ¶
- Type: string
- Default: undefined
PipelineProps ¶
Initializer ¶
Properties ¶
Name | Type | Description |
---|---|---|
includes |
Include[] |
You can add global gcix.Include s to the pipeline. Gitlab CI Documentation: "Use include to include external YAML files in your CI/CD configuration.". |
includes
Optional ¶
- Type: Include[]
You can add global gcix.Include
s to the pipeline. Gitlab CI Documentation: "Use include to include external YAML files in your CI/CD configuration.".
RenderedImage ¶
This module represents the Gitlab CI Image keyword. Use Image
to specify a Docker image to use for the gcix.Job
.
Instances of this class are intended to be immutable. Image objects are typically defined in a central location and often reused throughout the codebase. Modifying an Image object at one place may result in unexpected changes at any other reference to that object. Therefore, this class does not provide any setter methods to modify its properties directly.
However, you can create an altered copy of an Image object using the .withTag() and .withEntrypoint() methods. These methods return a new Image object with the specified modifications, allowing you to reuse the original Image object while making specific changes for a particular use case.
By following this approach, you can maintain a central repository of Image objects and easily create customized versions as needed, without affecting the original object or introducing unintended side effects.
Initializer ¶
Properties ¶
Name | Type | Description |
---|---|---|
name |
string |
No description. |
entrypoint |
string[] |
No description. |
name
Required ¶
- Type: string
entrypoint
Optional ¶
- Type: string[]
RenderedIncludeArtifact ¶
Initializer ¶
Properties ¶
Name | Type | Description |
---|---|---|
artifact |
string |
No description. |
job |
string |
No description. |
artifact
Required ¶
- Type: string
job
Required ¶
- Type: string
RenderedIncludeFile ¶
Initializer ¶
Properties ¶
Name | Type | Description |
---|---|---|
file |
string |
No description. |
project |
string |
No description. |
ref |
string |
No description. |
file
Required ¶
- Type: string
project
Required ¶
- Type: string
ref
Optional ¶
- Type: string
RenderedIncludeLocal ¶
Initializer ¶
Properties ¶
Name | Type | Description |
---|---|---|
local |
string |
No description. |
local
Required ¶
- Type: string
RenderedIncludeRemote ¶
Initializer ¶
Properties ¶
Name | Type | Description |
---|---|---|
remote |
string |
No description. |
remote
Required ¶
- Type: string
RenderedIncludeTemplate ¶
Initializer ¶
Properties ¶
Name | Type | Description |
---|---|---|
template |
string |
No description. |
template
Required ¶
- Type: string
RenderedJob ¶
Initializer ¶
RuleProps ¶
Initializer ¶
Properties ¶
Name | Type | Description |
---|---|---|
allowFailure |
boolean |
No description. |
changes |
string[] |
No description. |
exists |
string[] |
No description. |
ifStatement |
string |
No description. |
variables |
{[ key: string ]: string} |
No description. |
when |
WhenStatement |
No description. |
allowFailure
Optional ¶
- Type: boolean
- Default: false
changes
Optional ¶
- Type: string[]
exists
Optional ¶
- Type: string[]
ifStatement
Optional ¶
- Type: string
variables
Optional ¶
- Type: {[ key: string ]: string}
when
Optional ¶
- Type: WhenStatement
- Default: WhenStatement.ON_SUCCESS.
ServiceProps ¶
Initializer ¶
Properties ¶
Name | Type | Description |
---|---|---|
name |
string |
No description. |
name
Required ¶
- Type: string
TriggerJobProps ¶
Initializer ¶
Properties ¶
Name | Type | Description |
---|---|---|
branch |
string |
No description. |
includes |
IncludeLocal | IncludeFile | IncludeRemote | IncludeTemplate | IncludeArtifact[] |
No description. |
name |
string |
No description. |
project |
string |
No description. |
stage |
string |
No description. |
strategy |
string |
No description. |
branch
Optional ¶
- Type: string
includes
Optional ¶
- Type: IncludeLocal | IncludeFile | IncludeRemote | IncludeTemplate | IncludeArtifact[]
name
Optional ¶
- Type: string
project
Optional ¶
- Type: string
stage
Optional ¶
- Type: string
strategy
Optional ¶
- Type: string
Classes ¶
Artifacts ¶
- Implements: IArtifacts
This class represents the artifacts keyword.
Gitlab CI documentation: "Use artifacts to specify a list of files and
directories that are attached to the gcix.Job
when it succeeds,
fails, or always. [...] by default, gcix.Job
s in later stages
automatically download all the artifacts created by jobs in earlier stages.
You can control artifact download behavior in Job's with dependencies."
Initializers ¶
Name | Type | Description |
---|---|---|
props |
ArtifactsProps |
No description. |
props
Required ¶
- Type: ArtifactsProps
Methods ¶
Name | Description |
---|---|
addExcludes |
No description. |
addPaths |
No description. |
isEqual |
isEqual checks if this object is equal to given object. |
render |
Returns a representation of any object which implements IBase . |
addExcludes
¶
excludes
Required ¶
- Type: string[]
addPaths
¶
paths
Required ¶
- Type: string[]
isEqual
¶
isEqual
checks if this
object is equal to given object.
comparable
Required ¶
- Type: IBase
render
¶
Returns a representation of any object which implements IBase
.
The rendered representation is used by the gcix
to dump it
in YAML format as part of the .gitlab-ci.yml
pipeline.
Properties ¶
Name | Type | Description |
---|---|---|
excludes |
string[] |
No description. |
paths |
string[] |
No description. |
expireIn |
string |
No description. |
exposeAs |
string |
No description. |
name |
string |
No description. |
public |
boolean |
No description. |
reports |
ArtifactsReport[] |
No description. |
untracked |
boolean |
No description. |
when |
WhenStatement |
No description. |
orderedExcludes |
OrderedStringSet |
No description. |
orderedPaths |
OrderedStringSet |
No description. |
excludes
Required ¶
- Type: string[]
paths
Required ¶
- Type: string[]
expireIn
Optional ¶
- Type: string
exposeAs
Optional ¶
- Type: string
name
Optional ¶
- Type: string
public
Optional ¶
- Type: boolean
reports
Optional ¶
- Type: ArtifactsReport[]
untracked
Optional ¶
- Type: boolean
when
Optional ¶
- Type: WhenStatement
orderedExcludes
Required ¶
- Type: OrderedStringSet
orderedPaths
Required ¶
- Type: OrderedStringSet
Cache ¶
- Implements: ICache
This class represents the cache keyword.
Gitlab CI documentation:
"Use cache to specify a list of files and directories to cache between
gcix.Job
s. [...] Caching is shared between
gcix.Pipeline
s and gcix.Job
s.
Caches are restored before artifacts."
Initializers ¶
Name | Type | Description |
---|---|---|
props |
CacheProps |
No description. |
props
Required ¶
- Type: CacheProps
Methods ¶
Name | Description |
---|---|
isEqual |
isEqual checks if this object is equal to given object. |
render |
Returns a representation of any object which implements IBase . |
isEqual
¶
isEqual
checks if this
object is equal to given object.
comparable
Required ¶
- Type: IBase
render
¶
Returns a representation of any object which implements IBase
.
The rendered representation is used by the gcix
to dump it
in YAML format as part of the .gitlab-ci.yml
pipeline.
Properties ¶
Name | Type | Description |
---|---|---|
cacheKey |
CacheKey |
No description. |
paths |
string[] |
No description. |
policy |
CachePolicy |
No description. |
untracked |
boolean |
No description. |
when |
WhenStatement |
No description. |
cacheKey
Required ¶
- Type: CacheKey
paths
Required ¶
- Type: string[]
policy
Optional ¶
- Type: CachePolicy
untracked
Optional ¶
- Type: boolean
when
Optional ¶
- Type: WhenStatement
CacheKey ¶
- Implements: ICacheKey
This class represents the cache:key keyword.
Gitlab CI documentation: "The key keyword defines the affinity of caching between jobs. You can have a single cache for all jobs, cache per-job, cache per-branch, or any other way that fits your workflow."
Initializers ¶
Name | Type | Description |
---|---|---|
props |
CacheKeyProps |
No description. |
props
Required ¶
- Type: CacheKeyProps
Methods ¶
Name | Description |
---|---|
isEqual |
isEqual checks if this object is equal to given object. |
render |
Returns a representation of any object which implements IBase . |
isEqual
¶
isEqual
checks if this
object is equal to given object.
comparable
Required ¶
- Type: IBase
render
¶
Returns a representation of any object which implements IBase
.
The rendered representation is used by the gcix
to dump it
in YAML format as part of the .gitlab-ci.yml
pipeline.
Properties ¶
Name | Type | Description |
---|---|---|
files |
string[] |
No description. |
key |
string |
No description. |
prefix |
string |
No description. |
files
Optional ¶
- Type: string[]
key
Optional ¶
- Type: string
prefix
Optional ¶
- Type: string
Image ¶
Initializers ¶
Name | Type | Description |
---|---|---|
props |
ImageProps |
No description. |
props
Required ¶
- Type: ImageProps
Methods ¶
Name | Description |
---|---|
isEqual |
isEqual checks if this object is equal to given object. |
render |
Returns a representation of any object which implements IBase . |
withEntrypoint |
No description. |
withTag |
No description. |
isEqual
¶
isEqual
checks if this
object is equal to given object.
comparable
Required ¶
- Type: IBase
render
¶
Returns a representation of any object which implements IBase
.
The rendered representation is used by the gcix
to dump it
in YAML format as part of the .gitlab-ci.yml
pipeline.
withEntrypoint
¶
entrypoint
Required ¶
- Type: string[]
withTag
¶
tag
Required ¶
- Type: string
Properties ¶
Name | Type | Description |
---|---|---|
name |
string |
No description. |
entrypoint |
string[] |
No description. |
tag |
string |
No description. |
name
Required ¶
- Type: string
entrypoint
Optional ¶
- Type: string[]
tag
Optional ¶
- Type: string
Include ¶
- Implements: IInclude
This is just an abstract superclass.
Please use one of the subclasses:
IncludeLocal
IncludeFile
IncludeRemote
IncludeTemplate
IncludeArtifact
Initializers ¶
Name | Type | Description |
---|---|---|
Methods ¶
Name | Description |
---|---|
isEqual |
isEqual checks if this object is equal to given object. |
render |
Returns a representation of any object which implements IBase . |
isEqual
¶
isEqual
checks if this
object is equal to given object.
comparable
Required ¶
- Type: IBase
render
¶
Returns a representation of any object which implements IBase
.
The rendered representation is used by the gcix
to dump it
in YAML format as part of the .gitlab-ci.yml
pipeline.
Properties ¶
Name | Type | Description |
---|---|---|
rendered |
any |
No description. |
rendered
Required ¶
- Type: any
IncludeArtifact ¶
- Implements: IIncludeArtifact
Initializers ¶
Name | Type | Description |
---|---|---|
props |
IncludeArtifactProps |
No description. |
props
Required ¶
- Type: IncludeArtifactProps
Methods ¶
Name | Description |
---|---|
isEqual |
isEqual checks if this object is equal to given object. |
render |
Returns a representation of any object which implements IBase . |
isEqual
¶
isEqual
checks if this
object is equal to given object.
comparable
Required ¶
- Type: IBase
render
¶
Returns a representation of any object which implements IBase
.
The rendered representation is used by the gcix
to dump it
in YAML format as part of the .gitlab-ci.yml
pipeline.
Properties ¶
Name | Type | Description |
---|---|---|
rendered |
any |
No description. |
rendered
Required ¶
- Type: any
IncludeFile ¶
- Implements: IIncludeFile
This module represents the Gitlab CI include:file keyword.
Initializers ¶
Name | Type | Description |
---|---|---|
props |
IncludeFileProps |
No description. |
props
Required ¶
- Type: IncludeFileProps
Methods ¶
Name | Description |
---|---|
isEqual |
isEqual checks if this object is equal to given object. |
render |
Returns a representation of any object which implements IBase . |
isEqual
¶
isEqual
checks if this
object is equal to given object.
comparable
Required ¶
- Type: IBase
render
¶
Returns a representation of any object which implements IBase
.
The rendered representation is used by the gcix
to dump it
in YAML format as part of the .gitlab-ci.yml
pipeline.
Properties ¶
Name | Type | Description |
---|---|---|
rendered |
any |
No description. |
rendered
Required ¶
- Type: any
IncludeLocal ¶
- Implements: IIncludeLocal
This module represents the Gitlab CI include:local keyword.
Initializers ¶
Name | Type | Description |
---|---|---|
props |
IncludeLocalProps |
No description. |
props
Required ¶
- Type: IncludeLocalProps
Methods ¶
Name | Description |
---|---|
isEqual |
isEqual checks if this object is equal to given object. |
render |
Returns a representation of any object which implements IBase . |
isEqual
¶
isEqual
checks if this
object is equal to given object.
comparable
Required ¶
- Type: IBase
render
¶
Returns a representation of any object which implements IBase
.
The rendered representation is used by the gcix
to dump it
in YAML format as part of the .gitlab-ci.yml
pipeline.
Properties ¶
Name | Type | Description |
---|---|---|
rendered |
any |
No description. |
rendered
Required ¶
- Type: any
IncludeRemote ¶
- Implements: IIncludeRemote
Initializers ¶
Name | Type | Description |
---|---|---|
props |
IncludeRemoteProps |
No description. |
props
Required ¶
- Type: IncludeRemoteProps
Methods ¶
Name | Description |
---|---|
isEqual |
isEqual checks if this object is equal to given object. |
render |
Returns a representation of any object which implements IBase . |
isEqual
¶
isEqual
checks if this
object is equal to given object.
comparable
Required ¶
- Type: IBase
render
¶
Returns a representation of any object which implements IBase
.
The rendered representation is used by the gcix
to dump it
in YAML format as part of the .gitlab-ci.yml
pipeline.
Properties ¶
Name | Type | Description |
---|---|---|
rendered |
any |
No description. |
rendered
Required ¶
- Type: any
IncludeTemplate ¶
- Implements: IIncludeTemplate
Initializers ¶
Name | Type | Description |
---|---|---|
props |
IncludeTemplateProps |
No description. |
props
Required ¶
- Type: IncludeTemplateProps
Methods ¶
Name | Description |
---|---|
isEqual |
isEqual checks if this object is equal to given object. |
render |
Returns a representation of any object which implements IBase . |
isEqual
¶
isEqual
checks if this
object is equal to given object.
comparable
Required ¶
- Type: IBase
render
¶
Returns a representation of any object which implements IBase
.
The rendered representation is used by the gcix
to dump it
in YAML format as part of the .gitlab-ci.yml
pipeline.
Properties ¶
Name | Type | Description |
---|---|---|
rendered |
any |
No description. |
rendered
Required ¶
- Type: any
Job ¶
- Implements: IJob
This class represents the Gitlab CI Job.
Initializers ¶
Name | Type | Description |
---|---|---|
props |
JobProps |
No description. |
props
Required ¶
- Type: JobProps
Methods ¶
Name | Description |
---|---|
addDependencies |
No description. |
addNeeds |
No description. |
addParent |
This method is called by gcix.JobCollection s when the job is added to that JobCollection. |
addTags |
No description. |
addVariables |
No description. |
appendRules |
No description. |
appendScripts |
No description. |
assignAllowFailure |
No description. |
assignArtifacts |
No description. |
assignCache |
No description. |
assignDependencies |
No description. |
assignImage |
Sets the image of this job. |
assignNeeds |
No description. |
assignTags |
No description. |
copy |
Returns an independent, deep copy object of this job. |
extendName |
This method is used by gcix.JobCollection s to populate the jobs name. |
extendStage |
This method is used by gcix.JobCollection s to populate the jobs name and stage. |
extendStageValue |
This method is used by gcix.JobCollection s to populate the jobs stage. |
getAllInstanceNames |
Return all instance names from the given child. |
isEqual |
isEqual checks if this object is equal to given object. |
prependRules |
No description. |
prependScripts |
No description. |
render |
Returns a representation of any object which implements IBase . |
addDependencies
¶
dependencies
Required ¶
- Type: Job | JobCollection | Need[]
addNeeds
¶
needs
Required ¶
- Type: Job | JobCollection | Need[]
addParent
¶
This method is called by gcix.JobCollection
s when the job is added to that JobCollection.
The job needs to know its parents when getAllInstanceNames()
is called.
parent
Required ¶
- Type: Job | JobCollection
addTags
¶
tags
Required ¶
- Type: string[]
addVariables
¶
variables
Required ¶
- Type: {[ key: string ]: string}
appendRules
¶
rules
Required ¶
- Type: Rule[]
appendScripts
¶
scripts
Required ¶
- Type: string[]
assignAllowFailure
¶
allowFailure
Required ¶
- Type: boolean | number[]
assignArtifacts
¶
artifacts
Required ¶
- Type: Artifacts
assignCache
¶
cache
Required ¶
- Type: Cache
assignDependencies
¶
dependencies
Required ¶
- Type: Job | JobCollection | Need[]
assignImage
¶
Sets the image of this job.
For a simple container image you can provide the origin of the image. If you want to set the entrypoint, you have to provide an Image object instead.
!! Any previous values will be overwritten.
image
Required ¶
- Type: string | Image
assignNeeds
¶
needs
Required ¶
- Type: Job | JobCollection | Need[]
assignTags
¶
tags
Required ¶
- Type: string[]
copy
¶
Returns an independent, deep copy object of this job.
extendName
¶
This method is used by gcix.JobCollection
s to populate the jobs name.
name
Required ¶
- Type: string
extendStage
¶
This method is used by gcix.JobCollection
s to populate the jobs name and stage.
stage
Required ¶
- Type: string
extendStageValue
¶
This method is used by gcix.JobCollection
s to populate the jobs stage.
stage
Required ¶
- Type: string
getAllInstanceNames
¶
Return all instance names from the given child.
That means all combinations of the childs name and stage within this sequence and all parent sequences.
child
Optional ¶
- Type: Job | JobCollection
isEqual
¶
isEqual
checks if this
object is equal to given object.
comparable
Required ¶
- Type: IBase
prependRules
¶
rules
Required ¶
- Type: Rule[]
prependScripts
¶
scripts
Required ¶
- Type: string[]
render
¶
Returns a representation of any object which implements IBase
.
The rendered representation is used by the gcix
to dump it
in YAML format as part of the .gitlab-ci.yml
pipeline.
Properties ¶
Name | Type | Description |
---|---|---|
tags |
string[] |
Getter method to receive added tags. |
allowFailure |
string | boolean | number[] |
No description. |
name |
string |
No description. |
orderedTags |
OrderedStringSet |
No description. |
parents |
Job | JobCollection[] |
No description. |
scripts |
string[] |
No description. |
stage |
string |
No description. |
artifacts |
Artifacts |
No description. |
cache |
Cache |
No description. |
dependencies |
Job | JobCollection | Need[] |
No description. |
image |
Image |
No description. |
needs |
Job | JobCollection | Need[] |
No description. |
original |
Job |
No description. |
rules |
Rule[] |
No description. |
variables |
{[ key: string ]: string} |
No description. |
tags
Required ¶
- Type: string[]
Getter method to receive added tags.
allowFailure
Required ¶
- Type: string | boolean | number[]
name
Required ¶
- Type: string
orderedTags
Required ¶
- Type: OrderedStringSet
parents
Required ¶
- Type: Job | JobCollection[]
scripts
Required ¶
- Type: string[]
stage
Required ¶
- Type: string
artifacts
Optional ¶
- Type: Artifacts
cache
Optional ¶
- Type: Cache
dependencies
Optional ¶
- Type: Job | JobCollection | Need[]
image
Optional ¶
- Type: Image
needs
Optional ¶
- Type: Job | JobCollection | Need[]
original
Optional ¶
- Type: Job
rules
Optional ¶
- Type: Rule[]
variables
Optional ¶
- Type: {[ key: string ]: string}
JobCollection ¶
- Implements: IJobCollection
A JobCollection collects multiple gcix.Job
s and/or other gcix.JobCollection
s into a group.
Initializers ¶
Name | Type | Description |
---|---|---|
Methods ¶
Name | Description |
---|---|
addChildren |
Add gcix.Job s or other gcix.JobCollection s to this JobCollection. |
addDependencies |
No description. |
addNeeds |
No description. |
addParent |
No description. |
addTags |
No description. |
addVariables |
No description. |
appendRules |
No description. |
appendScripts |
No description. |
assignArtifacts |
No description. |
assignCache |
No description. |
getAllInstanceNames |
Return all instance names from the given child. |
initializeAllowFailure |
Calling gcix.Job.assignAllowFailure() to all jobs within this JobCollection that haven't been set the allowFailure before. |
initializeArtifacts |
Sets gcix.Job.artifacts to all jobs within this JobCollection that haven't been set the artifacs before. |
initializeCache |
Calling gcix.Job.assigneCache() to all jobs within this JobCollection that haven't been set the cache before. |
initializeDependencies |
Calling gcix.Job.assignDependencies() to all jobs within the first stage of this JobCollection that haven't been added dependencies before. |
initializeImage |
Calling gcix.Job.assignImage() to all jobs within this JobCollection. |
initializeNeeds |
Calling gcix.Job.assignNeeds() to all jobs within the first stage of this JobCollection that haven't been added needs before. |
initializeRules |
Calling gcix.Job.append_rules() to all jobs within this JobCollection that haven't been added rules before. |
initializeTags |
Calling gcix.Job.addTags([...]) to all jobs within this JobCollection that haven't been added tags before. |
initializeVariables |
Calling gcix.Job.addVariables({...}) to all jobs within this JobCollection that haven't been added variables before. |
isEqual |
isEqual checks if this object is equal to given object. |
overrideAllowFailure |
Calling gcix.Job.assignAllowFailure() to all jobs within this JobCollection overriding any previous set value. |
overrideDependencies |
Calling gcix.Job.assignDependencies() to all jobs within the first stage of this JobCollection and overriding any previously added dependencies to that jobs. |
overrideImage |
Calling gcix.Job.assignImage() to all jobs within this JobCollection overriding any previous set value. |
overrideNeeds |
Calling gcix.Job.assignNeeds() to all jobs within the first stage of this JobCollection and overriding any previously added needs to that jobs. |
overrideRules |
Calling gcix.Job.overrideRules() to all jobs within this JobCollection and overriding any previously added rules to that jobs. |
overrideTags |
Calling gcix.Job.addTags([...]) to all jobs within this JobCollection and overriding any previously added tags to that jobs. |
overrideVariables |
Calling gcix.Job.addVariables({...}) to all jobs within this JobCollection and overriding any previously added variables to that jobs. |
prependRules |
No description. |
prependScripts |
No description. |
render |
Returns a representation of any object which implements IBase . |
addChildren
¶
Add gcix.Job
s or other gcix.JobCollection
s to this JobCollection.
Adding a child creates a copy of that child. You should provide a name or stage when adding children, to make them different from other places where they will be used.
props
Required ¶
- Type: AddChildrenProps
addDependencies
¶
dependencies
Required ¶
- Type: Job | JobCollection | Need[]
addNeeds
¶
needs
Required ¶
- Type: Job | JobCollection | Need[]
addParent
¶
parent
Required ¶
- Type: JobCollection
addTags
¶
tags
Required ¶
- Type: string[]
addVariables
¶
variables
Required ¶
- Type: {[ key: string ]: string}
appendRules
¶
rules
Required ¶
- Type: Rule[]
appendScripts
¶
scripts
Required ¶
- Type: string[]
assignArtifacts
¶
artifacts
Required ¶
- Type: Artifacts
assignCache
¶
cache
Required ¶
- Type: Cache
getAllInstanceNames
¶
Return all instance names from the given child.
That means all combinations of the childs name and stage within this JobCollection and all parent JobCollection's.
child
Optional ¶
- Type: Job | JobCollection
initializeAllowFailure
¶
Calling gcix.Job.assignAllowFailure()
to all jobs within this JobCollection that haven't been set the allowFailure before.
allowFailure
Required ¶
- Type: boolean | number[]
initializeArtifacts
¶
Sets gcix.Job.artifacts
to all jobs within this JobCollection that haven't been set the artifacs before.
artifacts
Required ¶
- Type: Artifacts
initializeCache
¶
Calling gcix.Job.assigneCache()
to all jobs within this JobCollection that haven't been set the cache before.
cache
Required ¶
- Type: Cache
initializeDependencies
¶
Calling gcix.Job.assignDependencies()
to all jobs within the first stage of this JobCollection that haven't been added dependencies before.
An empty parameter list means that jobs will get an empty dependency list and thus does not download artifacts by default.
dependencies
Required ¶
- Type: Job | JobCollection | Need[]
initializeImage
¶
Calling gcix.Job.assignImage()
to all jobs within this JobCollection.
image
Required ¶
- Type: string | Image
initializeNeeds
¶
Calling gcix.Job.assignNeeds()
to all jobs within the first stage of this JobCollection that haven't been added needs before.
An empty parameter list means that jobs will get an empty dependency list and thus does not depend on other jobs by default.
needs
Required ¶
- Type: Job | JobCollection | Need[]
initializeRules
¶
Calling gcix.Job.append_rules()
to all jobs within this JobCollection that haven't been added rules before.
rules
Required ¶
- Type: Rule[]
initializeTags
¶
Calling gcix.Job.addTags([...])
to all jobs within this JobCollection that haven't been added tags before.
tags
Required ¶
- Type: string[]
initializeVariables
¶
Calling gcix.Job.addVariables({...})
to all jobs within this JobCollection that haven't been added variables before.
variables
Required ¶
- Type: {[ key: string ]: string}
isEqual
¶
isEqual
checks if this
object is equal to given object.
comparable
Required ¶
- Type: IBase
overrideAllowFailure
¶
Calling gcix.Job.assignAllowFailure()
to all jobs within this JobCollection overriding any previous set value.
allowFailure
Required ¶
- Type: boolean | number[]
overrideDependencies
¶
Calling gcix.Job.assignDependencies()
to all jobs within the first stage of this JobCollection and overriding any previously added dependencies to that jobs.
An empty parameter list means that jobs will get an empty dependency list and thus does not download artifacts.
dependencies
Required ¶
- Type: Job | JobCollection | Need[]
overrideImage
¶
Calling gcix.Job.assignImage()
to all jobs within this JobCollection overriding any previous set value.
image
Required ¶
- Type: string | Image
overrideNeeds
¶
Calling gcix.Job.assignNeeds()
to all jobs within the first stage of this JobCollection and overriding any previously added needs to that jobs.
An empty parameter list means that jobs will get an empty dependency list and thus does not depend on other jobs.
needs
Required ¶
- Type: Job | JobCollection | Need[]
overrideRules
¶
Calling gcix.Job.overrideRules()
to all jobs within this JobCollection and overriding any previously added rules to that jobs.
rules
Required ¶
- Type: Rule[]
overrideTags
¶
Calling gcix.Job.addTags([...])
to all jobs within this JobCollection and overriding any previously added tags to that jobs.
tags
Required ¶
- Type: string[]
overrideVariables
¶
Calling gcix.Job.addVariables({...})
to all jobs within this JobCollection and overriding any previously added variables to that jobs.
variables
Required ¶
- Type: {[ key: string ]: string}
prependRules
¶
rules
Required ¶
- Type: Rule[]
prependScripts
¶
scripts
Required ¶
- Type: string[]
render
¶
Returns a representation of any object which implements IBase
.
The rendered representation is used by the gcix
to dump it
in YAML format as part of the .gitlab-ci.yml
pipeline.
Properties ¶
Name | Type | Description |
---|---|---|
lastJobsExecuted |
Job[] |
This property returns all Jobs from the last stage of this JobCollection. |
nestedJobs |
Job[] |
No description. |
populatedJobs |
Job[] |
Returns a list with populated copies of all nested jobs of this JobCollection. |
children |
ChildDict[] |
No description. |
orderedTags |
OrderedStringSet |
No description. |
orderedTagsForInitialization |
OrderedStringSet |
No description. |
orderedTagsForReplacement |
OrderedStringSet |
No description. |
parents |
Job | JobCollection[] |
No description. |
allowFailureForInitialization |
string | boolean | number[] |
No description. |
allowFailureForReplacement |
string | boolean | number[] |
No description. |
artifacts |
Artifacts |
No description. |
artifactsForInitialization |
Artifacts |
No description. |
artifactsForReplacement |
Artifacts |
No description. |
cache |
Cache |
No description. |
cacheForInitialization |
Cache |
No description. |
dependencies |
Job | JobCollection | Need[] |
No description. |
dependenciesForInitialization |
Job | JobCollection | Need[] |
No description. |
dependenciesForReplacement |
Job | JobCollection | Need[] |
No description. |
imageForInitialization |
string | Image |
No description. |
imageForReplacement |
string | Image |
No description. |
needs |
Job | JobCollection | Need[] |
No description. |
needsForInitialization |
Job | JobCollection | Need[] |
No description. |
needsForReplacement |
Job | JobCollection | Need[] |
No description. |
rulesForInitialization |
Rule[] |
No description. |
rulesForReplacement |
Rule[] |
No description. |
rulesToAppend |
Rule[] |
No description. |
rulesToPrepend |
Rule[] |
No description. |
scriptsToAppend |
string[] |
No description. |
scriptsToPrepend |
string[] |
No description. |
variables |
{[ key: string ]: string} |
No description. |
variablesForInitialization |
{[ key: string ]: string} |
No description. |
variablesForReplacement |
{[ key: string ]: string} |
No description. |
lastJobsExecuted
Required ¶
- Type: Job[]
This property returns all Jobs from the last stage of this JobCollection.
This is typically be requested from a job which has setup this JobCollection as need, to determine all actual jobs of this JobCollection as need.
nestedJobs
Required ¶
- Type: Job[]
populatedJobs
Required ¶
- Type: Job[]
Returns a list with populated copies of all nested jobs of this JobCollection.
Populated means, that all attributes of a Job which depends on its context are resolved to their final values. The context is primarily the JobCollection within the jobs resides but also dependencies to other jobs and JobCollection's. Thus this JobCollection will apply its own configuration, like variables to add, tags to set, etc., to all its jobs and JobCollection's.
Copies means what it says, that the returned job are not the same job objects, originally added to this JobCollection, but copies of them.
Nested means, that also jobs from JobCollection's within this JobCollection, are returned, as well as jobs from JobCollection's within JobCollection's within this JobCollection and so on.
children
Required ¶
- Type: ChildDict[]
orderedTags
Required ¶
- Type: OrderedStringSet
orderedTagsForInitialization
Required ¶
- Type: OrderedStringSet
orderedTagsForReplacement
Required ¶
- Type: OrderedStringSet
parents
Required ¶
- Type: Job | JobCollection[]
allowFailureForInitialization
Optional ¶
- Type: string | boolean | number[]
allowFailureForReplacement
Optional ¶
- Type: string | boolean | number[]
artifacts
Optional ¶
- Type: Artifacts
artifactsForInitialization
Optional ¶
- Type: Artifacts
artifactsForReplacement
Optional ¶
- Type: Artifacts
cache
Optional ¶
- Type: Cache
cacheForInitialization
Optional ¶
- Type: Cache
dependencies
Optional ¶
- Type: Job | JobCollection | Need[]
dependenciesForInitialization
Optional ¶
- Type: Job | JobCollection | Need[]
dependenciesForReplacement
Optional ¶
- Type: Job | JobCollection | Need[]
imageForInitialization
Optional ¶
- Type: string | Image
imageForReplacement
Optional ¶
- Type: string | Image
needs
Optional ¶
- Type: Job | JobCollection | Need[]
needsForInitialization
Optional ¶
- Type: Job | JobCollection | Need[]
needsForReplacement
Optional ¶
- Type: Job | JobCollection | Need[]
rulesForInitialization
Optional ¶
- Type: Rule[]
rulesForReplacement
Optional ¶
- Type: Rule[]
rulesToAppend
Optional ¶
- Type: Rule[]
rulesToPrepend
Optional ¶
- Type: Rule[]
scriptsToAppend
Optional ¶
- Type: string[]
scriptsToPrepend
Optional ¶
- Type: string[]
variables
Optional ¶
- Type: {[ key: string ]: string}
variablesForInitialization
Optional ¶
- Type: {[ key: string ]: string}
variablesForReplacement
Optional ¶
- Type: {[ key: string ]: string}
Need ¶
- Implements: INeed
This class represents the Gitlab CI needs keyword. The needs
key-word adds a possibility to allow out-of-order Gitlab CI jobs. A job which needed another job runs directly after the other job as finished successfully.
Initializers ¶
Name | Type | Description |
---|---|---|
props |
NeedProps |
No description. |
props
Required ¶
- Type: NeedProps
Methods ¶
Name | Description |
---|---|
isEqual |
isEqual checks if this object is equal to given object. |
render |
Returns a representation of any object which implements IBase . |
isEqual
¶
isEqual
checks if this
object is equal to given object.
comparable
Required ¶
- Type: IBase
render
¶
Returns a representation of any object which implements IBase
.
The rendered representation is used by the gcix
to dump it
in YAML format as part of the .gitlab-ci.yml
pipeline.
Properties ¶
Name | Type | Description |
---|---|---|
artifacts |
boolean |
No description. |
job |
string |
No description. |
pipeline |
string |
No description. |
project |
string |
No description. |
ref |
string |
No description. |
artifacts
Optional ¶
- Type: boolean
job
Optional ¶
- Type: string
pipeline
Optional ¶
- Type: string
project
Optional ¶
- Type: string
ref
Optional ¶
- Type: string
OrderedStringSet ¶
Represents an ordered set of strings.
Initializers ¶
Name | Type | Description |
---|---|---|
values |
string[] |
An optional array of values to initialize the set. |
values
Optional ¶
- Type: string[]
An optional array of values to initialize the set.
Methods ¶
Name | Description |
---|---|
add |
Adds a value or an array of values to the set. |
clear |
Clears the set, removing all values. |
delete |
Deletes a value from the set. |
has |
Checks if the set contains a specific value. |
add
¶
Adds a value or an array of values to the set.
value
Required ¶
- Type: string | string[]
The value(s) to add.
clear
¶
Clears the set, removing all values.
delete
¶
Deletes a value from the set.
value
Required ¶
- Type: string
The value to delete.
has
¶
Checks if the set contains a specific value.
value
Required ¶
- Type: string
The value to check.
Properties ¶
Name | Type | Description |
---|---|---|
size |
number |
Returns the number of values in the set. |
values |
string[] |
Returns an array of values in the set. |
size
Required ¶
- Type: number
Returns the number of values in the set.
values
Required ¶
- Type: string[]
Returns an array of values in the set.
PagesJob ¶
- Implements: IPagesJob
This is a special kind of jobs which deploys Gitlab Pages.
This job has the static name pages
and the static artifacts path
./public
. Both preconfigurations can't be altered and are required for
deploying Gitlab Pages properly. All methods which would typically alter the
name, stage and artifacts of a job are overwritten with an empty
implementation.
This job is only for deploying Gitlab Pages artifacts within the ./public
artifacts path. To create the artifacts you have to run jobs, that generate
those artifacts within the same ./public
artifacts path, before this
PagesJob in the pipeline.
Because the name of the job can't be altered, this job may only exist once
in the generated pipeline output.
Typically you should add the PagesJob to the gcix.Pipeline
.
The PagesJob is also preconfigured with the stage pages
and the image
alpine:latest
. To change the stage of this job, use the assignStage()
method. Please mention to run this job in a stage after all jobs, that fill
the public
artifacts path with content.
Here a simple example how to use the GitlabPages job:
Initializers ¶
Name | Type | Description |
---|---|---|
Methods ¶
Name | Description |
---|---|
addDependencies |
No description. |
addNeeds |
No description. |
addParent |
This method is called by gcix.JobCollection s when the job is added to that JobCollection. |
addTags |
No description. |
addVariables |
No description. |
appendRules |
No description. |
appendScripts |
No description. |
assignAllowFailure |
No description. |
assignArtifacts |
No description. |
assignCache |
No description. |
assignDependencies |
No description. |
assignImage |
Sets the image of this job. |
assignNeeds |
No description. |
assignTags |
No description. |
copy |
Returns an independent, deep copy object of this job. |
extendName |
This method is used by gcix.JobCollection s to populate the jobs name. |
extendStage |
This method is used by gcix.JobCollection s to populate the jobs name and stage. |
extendStageValue |
This method is used by gcix.JobCollection s to populate the jobs stage. |
getAllInstanceNames |
Return all instance names from the given child. |
isEqual |
isEqual checks if this object is equal to given object. |
prependRules |
No description. |
prependScripts |
No description. |
render |
Returns a representation of any object which implements IBase . |
assignStage |
Set the name of this jobs stage to a value other than pages . |
addDependencies
¶
dependencies
Required ¶
- Type: Job | JobCollection | Need[]
addNeeds
¶
needs
Required ¶
- Type: Job | JobCollection | Need[]
addParent
¶
This method is called by gcix.JobCollection
s when the job is added to that JobCollection.
The job needs to know its parents when getAllInstanceNames()
is called.
parent
Required ¶
- Type: Job | JobCollection
addTags
¶
tags
Required ¶
- Type: string[]
addVariables
¶
variables
Required ¶
- Type: {[ key: string ]: string}
appendRules
¶
rules
Required ¶
- Type: Rule[]
appendScripts
¶
scripts
Required ¶
- Type: string[]
assignAllowFailure
¶
allowFailure
Required ¶
- Type: boolean | number[]
assignArtifacts
¶
artifacts
Required ¶
- Type: Artifacts
assignCache
¶
cache
Required ¶
- Type: Cache
assignDependencies
¶
dependencies
Required ¶
- Type: Job | JobCollection | Need[]
assignImage
¶
Sets the image of this job.
For a simple container image you can provide the origin of the image. If you want to set the entrypoint, you have to provide an Image object instead.
!! Any previous values will be overwritten.
image
Required ¶
- Type: string | Image
assignNeeds
¶
needs
Required ¶
- Type: Job | JobCollection | Need[]
assignTags
¶
tags
Required ¶
- Type: string[]
copy
¶
Returns an independent, deep copy object of this job.
extendName
¶
This method is used by gcix.JobCollection
s to populate the jobs name.
name
Required ¶
- Type: string
extendStage
¶
This method is used by gcix.JobCollection
s to populate the jobs name and stage.
name
Required ¶
- Type: string
extendStageValue
¶
This method is used by gcix.JobCollection
s to populate the jobs stage.
name
Required ¶
- Type: string
getAllInstanceNames
¶
Return all instance names from the given child.
That means all combinations of the childs name and stage within this sequence and all parent sequences.
child
Optional ¶
- Type: Job | JobCollection
isEqual
¶
isEqual
checks if this
object is equal to given object.
comparable
Required ¶
- Type: IBase
prependRules
¶
rules
Required ¶
- Type: Rule[]
prependScripts
¶
scripts
Required ¶
- Type: string[]
render
¶
Returns a representation of any object which implements IBase
.
The rendered representation is used by the gcix
to dump it
in YAML format as part of the .gitlab-ci.yml
pipeline.
assignStage
¶
Set the name of this jobs stage to a value other than pages
.
stage
Required ¶
- Type: string
Properties ¶
Name | Type | Description |
---|---|---|
tags |
string[] |
Getter method to receive added tags. |
allowFailure |
string | boolean | number[] |
No description. |
name |
string |
No description. |
orderedTags |
OrderedStringSet |
No description. |
parents |
Job | JobCollection[] |
No description. |
scripts |
string[] |
No description. |
stage |
string |
No description. |
artifacts |
Artifacts |
No description. |
cache |
Cache |
No description. |
dependencies |
Job | JobCollection | Need[] |
No description. |
image |
Image |
No description. |
needs |
Job | JobCollection | Need[] |
No description. |
original |
Job |
No description. |
rules |
Rule[] |
No description. |
variables |
{[ key: string ]: string} |
No description. |
tags
Required ¶
- Type: string[]
Getter method to receive added tags.
allowFailure
Required ¶
- Type: string | boolean | number[]
name
Required ¶
- Type: string
orderedTags
Required ¶
- Type: OrderedStringSet
parents
Required ¶
- Type: Job | JobCollection[]
scripts
Required ¶
- Type: string[]
stage
Required ¶
- Type: string
artifacts
Optional ¶
- Type: Artifacts
cache
Optional ¶
- Type: Cache
dependencies
Optional ¶
- Type: Job | JobCollection | Need[]
image
Optional ¶
- Type: Image
needs
Optional ¶
- Type: Job | JobCollection | Need[]
original
Optional ¶
- Type: Job
rules
Optional ¶
- Type: Rule[]
variables
Optional ¶
- Type: {[ key: string ]: string}
Pipeline ¶
- Implements: IPipeline
Initializers ¶
Name | Type | Description |
---|---|---|
props |
PipelineProps |
No description. |
props
Optional ¶
- Type: PipelineProps
Methods ¶
Name | Description |
---|---|
addChildren |
Add gcix.Job s or other gcix.JobCollection s to this JobCollection. |
addDependencies |
No description. |
addNeeds |
No description. |
addParent |
No description. |
addTags |
No description. |
addVariables |
No description. |
appendRules |
No description. |
appendScripts |
No description. |
assignArtifacts |
No description. |
assignCache |
No description. |
getAllInstanceNames |
Return all instance names from the given child. |
initializeAllowFailure |
Calling gcix.Job.assignAllowFailure() to all jobs within this JobCollection that haven't been set the allowFailure before. |
initializeArtifacts |
Sets gcix.Job.artifacts to all jobs within this JobCollection that haven't been set the artifacs before. |
initializeCache |
Calling gcix.Job.assigneCache() to all jobs within this JobCollection that haven't been set the cache before. |
initializeDependencies |
Calling gcix.Job.assignDependencies() to all jobs within the first stage of this JobCollection that haven't been added dependencies before. |
initializeImage |
Calling gcix.Job.assignImage() to all jobs within this JobCollection. |
initializeNeeds |
Calling gcix.Job.assignNeeds() to all jobs within the first stage of this JobCollection that haven't been added needs before. |
initializeRules |
Calling gcix.Job.append_rules() to all jobs within this JobCollection that haven't been added rules before. |
initializeTags |
Calling gcix.Job.addTags([...]) to all jobs within this JobCollection that haven't been added tags before. |
initializeVariables |
Calling gcix.Job.addVariables({...}) to all jobs within this JobCollection that haven't been added variables before. |
isEqual |
isEqual checks if this object is equal to given object. |
overrideAllowFailure |
Calling gcix.Job.assignAllowFailure() to all jobs within this JobCollection overriding any previous set value. |
overrideDependencies |
Calling gcix.Job.assignDependencies() to all jobs within the first stage of this JobCollection and overriding any previously added dependencies to that jobs. |
overrideImage |
Calling gcix.Job.assignImage() to all jobs within this JobCollection overriding any previous set value. |
overrideNeeds |
Calling gcix.Job.assignNeeds() to all jobs within the first stage of this JobCollection and overriding any previously added needs to that jobs. |
overrideRules |
Calling gcix.Job.overrideRules() to all jobs within this JobCollection and overriding any previously added rules to that jobs. |
overrideTags |
Calling gcix.Job.addTags([...]) to all jobs within this JobCollection and overriding any previously added tags to that jobs. |
overrideVariables |
Calling gcix.Job.addVariables({...}) to all jobs within this JobCollection and overriding any previously added variables to that jobs. |
prependRules |
No description. |
prependScripts |
No description. |
render |
Returns a representation of any object which implements IBase . |
addInclude |
Let you add global gcix.Include s to the pipeline. Gitlab CI Documentation: "Use include to include external YAML files in your CI/CD configuration.". |
addServices |
Add one or more gcix.Service s to the pipeline. |
writeYaml |
Create the Gitlab CI YAML file from this pipeline object. |
addChildren
¶
Add gcix.Job
s or other gcix.JobCollection
s to this JobCollection.
Adding a child creates a copy of that child. You should provide a name or stage when adding children, to make them different from other places where they will be used.
props
Required ¶
- Type: AddChildrenProps
addDependencies
¶
dependencies
Required ¶
- Type: Job | JobCollection | Need[]
addNeeds
¶
needs
Required ¶
- Type: Job | JobCollection | Need[]
addParent
¶
parent
Required ¶
- Type: JobCollection
addTags
¶
tags
Required ¶
- Type: string[]
addVariables
¶
variables
Required ¶
- Type: {[ key: string ]: string}
appendRules
¶
rules
Required ¶
- Type: Rule[]
appendScripts
¶
scripts
Required ¶
- Type: string[]
assignArtifacts
¶
artifacts
Required ¶
- Type: Artifacts
assignCache
¶
cache
Required ¶
- Type: Cache
getAllInstanceNames
¶
Return all instance names from the given child.
That means all combinations of the childs name and stage within this JobCollection and all parent JobCollection's.
child
Optional ¶
- Type: Job | JobCollection
initializeAllowFailure
¶
Calling gcix.Job.assignAllowFailure()
to all jobs within this JobCollection that haven't been set the allowFailure before.
allowFailure
Required ¶
- Type: boolean | number[]
initializeArtifacts
¶
Sets gcix.Job.artifacts
to all jobs within this JobCollection that haven't been set the artifacs before.
artifacts
Required ¶
- Type: Artifacts
initializeCache
¶
Calling gcix.Job.assigneCache()
to all jobs within this JobCollection that haven't been set the cache before.
cache
Required ¶
- Type: Cache
initializeDependencies
¶
Calling gcix.Job.assignDependencies()
to all jobs within the first stage of this JobCollection that haven't been added dependencies before.
An empty parameter list means that jobs will get an empty dependency list and thus does not download artifacts by default.
dependencies
Required ¶
- Type: Job | JobCollection | Need[]
initializeImage
¶
Calling gcix.Job.assignImage()
to all jobs within this JobCollection.
image
Required ¶
- Type: string | Image
initializeNeeds
¶
Calling gcix.Job.assignNeeds()
to all jobs within the first stage of this JobCollection that haven't been added needs before.
An empty parameter list means that jobs will get an empty dependency list and thus does not depend on other jobs by default.
needs
Required ¶
- Type: Job | JobCollection | Need[]
initializeRules
¶
Calling gcix.Job.append_rules()
to all jobs within this JobCollection that haven't been added rules before.
rules
Required ¶
- Type: Rule[]
initializeTags
¶
Calling gcix.Job.addTags([...])
to all jobs within this JobCollection that haven't been added tags before.
tags
Required ¶
- Type: string[]
initializeVariables
¶
Calling gcix.Job.addVariables({...})
to all jobs within this JobCollection that haven't been added variables before.
variables
Required ¶
- Type: {[ key: string ]: string}
isEqual
¶
isEqual
checks if this
object is equal to given object.
comparable
Required ¶
- Type: IBase
overrideAllowFailure
¶
Calling gcix.Job.assignAllowFailure()
to all jobs within this JobCollection overriding any previous set value.
allowFailure
Required ¶
- Type: boolean | number[]
overrideDependencies
¶
Calling gcix.Job.assignDependencies()
to all jobs within the first stage of this JobCollection and overriding any previously added dependencies to that jobs.
An empty parameter list means that jobs will get an empty dependency list and thus does not download artifacts.
dependencies
Required ¶
- Type: Job | JobCollection | Need[]
overrideImage
¶
Calling gcix.Job.assignImage()
to all jobs within this JobCollection overriding any previous set value.
image
Required ¶
- Type: string | Image
overrideNeeds
¶
Calling gcix.Job.assignNeeds()
to all jobs within the first stage of this JobCollection and overriding any previously added needs to that jobs.
An empty parameter list means that jobs will get an empty dependency list and thus does not depend on other jobs.
needs
Required ¶
- Type: Job | JobCollection | Need[]
overrideRules
¶
Calling gcix.Job.overrideRules()
to all jobs within this JobCollection and overriding any previously added rules to that jobs.
rules
Required ¶
- Type: Rule[]
overrideTags
¶
Calling gcix.Job.addTags([...])
to all jobs within this JobCollection and overriding any previously added tags to that jobs.
tags
Required ¶
- Type: string[]
overrideVariables
¶
Calling gcix.Job.addVariables({...})
to all jobs within this JobCollection and overriding any previously added variables to that jobs.
variables
Required ¶
- Type: {[ key: string ]: string}
prependRules
¶
rules
Required ¶
- Type: Rule[]
prependScripts
¶
scripts
Required ¶
- Type: string[]
render
¶
Returns a representation of any object which implements IBase
.
The rendered representation is used by the gcix
to dump it
in YAML format as part of the .gitlab-ci.yml
pipeline.
addInclude
¶
Let you add global gcix.Include
s to the pipeline. Gitlab CI Documentation: "Use include to include external YAML files in your CI/CD configuration.".
include
Required ¶
- Type: Include
addServices
¶
Add one or more gcix.Service
s to the pipeline.
Gitlab CI Documentation: "The services keyword defines a Docker image that runs during a job linked to the Docker image that the image keyword defines."
services
Required ¶
- Type: Service[]
writeYaml
¶
Create the Gitlab CI YAML file from this pipeline object.
Use that YAML file to trigger a child pipeline.
filename
Optional ¶
- Type: string
Properties ¶
Name | Type | Description |
---|---|---|
lastJobsExecuted |
Job[] |
This property returns all Jobs from the last stage of this JobCollection. |
nestedJobs |
Job[] |
No description. |
populatedJobs |
Job[] |
Returns a list with populated copies of all nested jobs of this JobCollection. |
children |
ChildDict[] |
No description. |
orderedTags |
OrderedStringSet |
No description. |
orderedTagsForInitialization |
OrderedStringSet |
No description. |
orderedTagsForReplacement |
OrderedStringSet |
No description. |
parents |
Job | JobCollection[] |
No description. |
allowFailureForInitialization |
string | boolean | number[] |
No description. |
allowFailureForReplacement |
string | boolean | number[] |
No description. |
artifacts |
Artifacts |
No description. |
artifactsForInitialization |
Artifacts |
No description. |
artifactsForReplacement |
Artifacts |
No description. |
cache |
Cache |
No description. |
cacheForInitialization |
Cache |
No description. |
dependencies |
Job | JobCollection | Need[] |
No description. |
dependenciesForInitialization |
Job | JobCollection | Need[] |
No description. |
dependenciesForReplacement |
Job | JobCollection | Need[] |
No description. |
imageForInitialization |
string | Image |
No description. |
imageForReplacement |
string | Image |
No description. |
needs |
Job | JobCollection | Need[] |
No description. |
needsForInitialization |
Job | JobCollection | Need[] |
No description. |
needsForReplacement |
Job | JobCollection | Need[] |
No description. |
rulesForInitialization |
Rule[] |
No description. |
rulesForReplacement |
Rule[] |
No description. |
rulesToAppend |
Rule[] |
No description. |
rulesToPrepend |
Rule[] |
No description. |
scriptsToAppend |
string[] |
No description. |
scriptsToPrepend |
string[] |
No description. |
variables |
{[ key: string ]: string} |
No description. |
variablesForInitialization |
{[ key: string ]: string} |
No description. |
variablesForReplacement |
{[ key: string ]: string} |
No description. |
includes |
Include[] |
No description. |
service |
Service[] |
No description. |
lastJobsExecuted
Required ¶
- Type: Job[]
This property returns all Jobs from the last stage of this JobCollection.
This is typically be requested from a job which has setup this JobCollection as need, to determine all actual jobs of this JobCollection as need.
nestedJobs
Required ¶
- Type: Job[]
populatedJobs
Required ¶
- Type: Job[]
Returns a list with populated copies of all nested jobs of this JobCollection.
Populated means, that all attributes of a Job which depends on its context are resolved to their final values. The context is primarily the JobCollection within the jobs resides but also dependencies to other jobs and JobCollection's. Thus this JobCollection will apply its own configuration, like variables to add, tags to set, etc., to all its jobs and JobCollection's.
Copies means what it says, that the returned job are not the same job objects, originally added to this JobCollection, but copies of them.
Nested means, that also jobs from JobCollection's within this JobCollection, are returned, as well as jobs from JobCollection's within JobCollection's within this JobCollection and so on.
children
Required ¶
- Type: ChildDict[]
orderedTags
Required ¶
- Type: OrderedStringSet
orderedTagsForInitialization
Required ¶
- Type: OrderedStringSet
orderedTagsForReplacement
Required ¶
- Type: OrderedStringSet
parents
Required ¶
- Type: Job | JobCollection[]
allowFailureForInitialization
Optional ¶
- Type: string | boolean | number[]
allowFailureForReplacement
Optional ¶
- Type: string | boolean | number[]
artifacts
Optional ¶
- Type: Artifacts
artifactsForInitialization
Optional ¶
- Type: Artifacts
artifactsForReplacement
Optional ¶
- Type: Artifacts
cache
Optional ¶
- Type: Cache
cacheForInitialization
Optional ¶
- Type: Cache
dependencies
Optional ¶
- Type: Job | JobCollection | Need[]
dependenciesForInitialization
Optional ¶
- Type: Job | JobCollection | Need[]
dependenciesForReplacement
Optional ¶
- Type: Job | JobCollection | Need[]
imageForInitialization
Optional ¶
- Type: string | Image
imageForReplacement
Optional ¶
- Type: string | Image
needs
Optional ¶
- Type: Job | JobCollection | Need[]
needsForInitialization
Optional ¶
- Type: Job | JobCollection | Need[]
needsForReplacement
Optional ¶
- Type: Job | JobCollection | Need[]
rulesForInitialization
Optional ¶
- Type: Rule[]
rulesForReplacement
Optional ¶
- Type: Rule[]
rulesToAppend
Optional ¶
- Type: Rule[]
rulesToPrepend
Optional ¶
- Type: Rule[]
scriptsToAppend
Optional ¶
- Type: string[]
scriptsToPrepend
Optional ¶
- Type: string[]
variables
Optional ¶
- Type: {[ key: string ]: string}
variablesForInitialization
Optional ¶
- Type: {[ key: string ]: string}
variablesForReplacement
Optional ¶
- Type: {[ key: string ]: string}
includes
Required ¶
- Type: Include[]
service
Required ¶
- Type: Service[]
PredefinedVariables ¶
This class contains constants for Gitlab CI predefined variables.
Initializers ¶
Name | Type | Description |
---|---|---|
Properties ¶
Name | Type | Description |
---|---|---|
chatChannel |
string |
Source chat channel which triggered the ChatOps command. |
chatInput |
string |
Additional arguments passed in the ChatOps command. |
ci |
string |
Mark that job is executed in CI environment. |
ciApiV4Url |
string |
The GitLab API v4 root URL. |
ciBuildsDir |
string |
Top-level directory where builds are executed. |
ciCommitBeforeSha |
string |
The previous latest commit present on a branch. Is always 0000000000000000000000000000000000000000 in pipelines for merge requests. |
ciCommitDescription |
string |
The description of the commit the message without first line, if the title is shorter than 100 characters; |
ciCommitMessage |
string |
The full commit message. |
ciCommitRefName |
string |
The branch or tag name for which project is built. |
ciCommitRefProtected |
string |
true if the job is running on a protected reference, false if not. |
ciCommitRefSlug |
string |
$CI_COMMIT_REF_NAME in lowercase, shortened to 63 bytes, and with everything except 0-9 and a-z replaced with -. |
ciCommitSha |
string |
The commit revision for which project is built. |
ciCommitShortSha |
string |
The first eight characters of CI_COMMIT_SHA. |
ciCommitTimestamp |
string |
The timestamp of the commit in the ISO 8601 format. |
ciCommitTitle |
string |
The title of the commit - the full first line of the message. |
ciConcurrentId |
string |
Unique ID of build execution in a single executor. |
ciConcurrentProjectId |
string |
Unique ID of build execution in a single executor and project. |
ciConfigPath |
string |
The path to CI configuration file. Defaults to .gitlab-ci.yml. |
ciDebugTrace |
string |
Whether debug logging (tracing) is enabled. |
ciDefaultBranch |
string |
The name of the default branch for the project. |
ciDependencyProxyGroupImagePrefix |
string |
The image prefix for pulling images through the Dependency Proxy. |
ciDependencyProxyPassword |
string |
The password to use to pull images through the Dependency Proxy. |
ciDependencyProxyServer |
string |
The server for logging in to the Dependency Proxy. This is equivalent to $CI_SERVER_HOST:$CI_SERVER_PORT. |
ciDependencyProxyUser |
string |
The username to use to pull images through the Dependency Proxy. |
ciDeployPassword |
string |
Authentication password of the GitLab Deploy Token, only present if the Project has one related. |
ciDeployUser |
string |
Authentication username of the GitLab Deploy Token, only present if the Project has one related. |
ciJobId |
string |
The unique ID of the current job that GitLab CI/CD uses internally. |
ciJobImage |
string |
The name of the image running the CI job. |
ciJobJwt |
string |
RS256 JSON web token that can be used for authenticating with third party systems that support JWT authentication, for example HashiCorp’s Vault. |
ciJobManual |
string |
The flag to indicate that job was manually started. |
ciJobName |
string |
The name of the job as defined in .gitlab-ci.yml. |
ciJobStage |
string |
The name of the stage as defined in .gitlab-ci.yml. |
ciJobStatus |
string |
The state of the job as each runner stage is executed. |
ciJobToken |
string |
Token used for authenticating with a few API endpoints and downloading dependent repositories. |
ciJobUrl |
string |
Job details URL. |
ciMergeRequestTargetBranchName |
string |
The target branch name of the merge request if the pipelines are for merge requests. |
ciMergeRequestTargetBranchSha |
string |
The HEAD SHA of the target branch of the merge request if the pipelines are for merge requests. |
ciNodeTotal |
string |
Total number of instances of this job running in parallel. |
ciPagesDomain |
string |
The configured domain that hosts GitLab Pages. |
ciPagesUrl |
string |
URL to GitLab Pages-built pages. Always belongs to a subdomain of CI_PAGES_DOMAIN. |
ciPipelineId |
string |
The instance-level ID of the current pipeline. This is a unique ID across all projects on GitLab. |
ciPipelineIid |
string |
The project-level IID (internal ID) of the current pipeline. This ID is unique for the current project. |
ciPipelineSource |
string |
Indicates how the pipeline was triggered. |
ciPipelineTriggered |
string |
The flag to indicate that job was triggered. |
ciPipelineUrl |
string |
Pipeline details URL. |
ciProjectConfigPath |
string |
The CI configuration path for the project. |
ciProjectDir |
string |
The full path where the repository is cloned and where the job is run. |
ciProjectId |
string |
The unique ID of the current project that GitLab CI/CD uses internally. |
ciProjectName |
string |
The name of the directory for the project that is being built. |
ciProjectNamespace |
string |
The project stage (username or group name) that is being built. |
ciProjectPath |
string |
The stage with project name. |
ciProjectPathSlug |
string |
$CI_PROJECT_PATH in lowercase and with everything except 0-9 and a-z replaced with -. Use in URLs and domain names. |
ciProjectRepositoryLanguages |
string |
Comma-separated, lowercase list of the languages used in the repository (for example ruby,javascript,html,css). |
ciProjectRootNamespace |
string |
The root project stage (username or group name) that is being built. |
ciProjectTitle |
string |
The human-readable project name as displayed in the GitLab web interface. |
ciProjectUrl |
string |
The HTTP(S) address to access project. |
ciProjectVisibility |
string |
The project visibility (internal, private, public). |
ciRegistryPassword |
string |
The password to use to push containers to the GitLab Container Registry, for the current project. |
ciRepositoryUrl |
string |
The URL to clone the Git repository. |
ciRunnerDescription |
string |
The description of the runner as saved in GitLab. |
ciRunnerExecutableArch |
string |
The OS/architecture of the GitLab Runner executable (note that this is not necessarily the same as the environment of the executor). |
ciRunnerId |
string |
The unique ID of runner being used. |
ciRunnerRevision |
string |
GitLab Runner revision that is executing the current job. |
ciRunnerShortToken |
string |
First eight characters of the runner’s token used to authenticate new job requests. Used as the runner’s unique ID. |
ciRunnerTags |
string |
The defined runner tags. |
ciRunnerVersion |
string |
GitLab Runner version that is executing the current job. |
ciServer |
string |
Mark that job is executed in CI environment. |
ciServerHost |
string |
Host component of the GitLab instance URL, without protocol and port (like gitlab.example.com). |
ciServerName |
string |
The name of CI server that is used to coordinate jobs. |
ciServerPort |
string |
Port component of the GitLab instance URL, without host and protocol (like 3000). |
ciServerProtocol |
string |
Protocol component of the GitLab instance URL, without host and port (like https). |
ciServerRevision |
string |
GitLab revision that is used to schedule jobs. |
ciServerUrl |
string |
The base URL of the GitLab instance, including protocol and port (like https://gitlab.example.com:8080). |
ciServerVersion |
string |
GitLab version that is used to schedule jobs. |
ciServerVersionMajor |
string |
GitLab version major component. |
ciServerVersionMinor |
string |
GitLab version minor component. |
ciServerVersionPatch |
string |
GitLab version patch component. |
gitlabCi |
string |
Mark that job is executed in GitLab CI/CD environment. |
gitlabFeatures |
string |
The comma separated list of licensed features available for your instance and plan. |
gitlabUserEmail |
string |
The email of the user who started the job. |
gitlabUserId |
string |
The ID of the user who started the job. |
gitlabUserLogin |
string |
The login username of the user who started the job. |
gitlabUserName |
string |
The real name of the user who started the job. |
ciCommitBranch |
string |
The commit branch name. |
ciCommitTag |
string |
The commit tag name. Present only when building tags. |
ciDeployFreeze |
string |
Included with the value true if the pipeline runs during a deploy freeze window. |
ciDisposableEnvironment |
string |
Marks that the job is executed in a disposable environment (something that is created only for this job and disposed of/destroyed after the execution - all executors except shell and ssh). |
ciEnvironmentName |
string |
The name of the environment for this job. Only present if environment:name is set. |
ciEnvironmentSlug |
string |
A simplified version of the environment name, suitable for inclusion in DNS, URLs, Kubernetes labels, and so on. |
ciEnvironmentUrl |
string |
The URL of the environment for this job. Only present if environment:url is set. |
ciExternalPullRequestIid |
string |
Pull Request ID from GitHub if the pipelines are for external pull requests. |
ciExternalPullRequestSourceBranchName |
string |
The source branch name of the pull request if the pipelines are for external pull requests. |
ciExternalPullRequestSourceBranchSha |
string |
The HEAD SHA of the source branch of the pull request if the pipelines are for external pull requests. |
ciExternalPullRequestSourceRepository |
string |
The source repository name of the pull request if the pipelines are for external pull requests. |
ciExternalPullRequestTargetBranchName |
string |
The target branch name of the pull request if the pipelines are for external pull requests. |
ciExternalPullRequestTargetBranchSha |
string |
The HEAD SHA of the target branch of the pull request if the pipelines are for external pull requests. |
ciExternalPullRequestTargetRepository |
string |
The target repository name of the pull request if the pipelines are for external pull requests. |
ciHasOpenRequirements |
string |
Included with the value true only if the pipeline’s project has any open requirements. |
ciKubernetesActive |
string |
Included with the value true only if the pipeline has a Kubernetes cluster available for deployments. |
ciMergeRequestAssignees |
string |
Comma-separated list of username(s) of assignee(s) for the merge request if the pipelines are for merge requests. |
ciMergeRequestDiffBaseSha |
string |
The base SHA of the merge request diff, if the pipelines are for merge requests. |
ciMergeRequestDiffId |
string |
The version of the merge request diff, if the pipelines are for merge requests. |
ciMergeRequestEventType |
string |
The event type of the merge request, if the pipelines are for merge requests. Can be detached, merged_result or merge_train. |
ciMergeRequestId |
string |
The instance-level ID of the merge request. |
ciMergeRequestIid |
string |
The project-level IID (internal ID) of the merge request. |
ciMergeRequestLabels |
string |
Comma-separated label names of the merge request if the pipelines are for merge requests. |
ciMergeRequestMilestone |
string |
The milestone title of the merge request if the pipelines are for merge requests. |
ciMergeRequestProjectId |
string |
The ID of the project of the merge request if the pipelines are for merge requests. |
ciMergeRequestProjectPath |
string |
The path of the project of the merge request if the pipelines are for merge requests (for example stage/awesome-project). |
ciMergeRequestProjectUrl |
string |
The URL of the project of the merge request if the pipelines are for merge requests (for example http://192.168.10.15:3000/stage/awesome-project). Available only if only [merge_requests] or rules syntax is used and the merge request is created. * Added in GitLab 11.6 Available in GitLab Runner all. |
ciMergeRequestRefPath |
string |
The ref path of the merge request if the pipelines are for merge requests. |
ciMergeRequestSourceBranchName |
string |
The source branch name of the merge request if the pipelines are for merge requests. |
ciMergeRequestSourceBranchSha |
string |
The HEAD SHA of the source branch of the merge request if the pipelines are for merge requests. |
ciMergeRequestSourceProjectId |
string |
The ID of the source project of the merge request if the pipelines are for merge requests. |
ciMergeRequestSourceProjectPath |
string |
The path of the source project of the merge request if the pipelines are for merge requests. |
ciMergeRequestSourceProjectUrl |
string |
The URL of the source project of the merge request if the pipelines are for merge requests. |
ciMergeRequestTitle |
string |
The title of the merge request if the pipelines are for merge requests. |
ciNodeIndex |
string |
Index of the job in the job set. If the job is not parallelized, this variable is not set. |
ciOpenMergeRequests |
string |
Available in branch and merge request pipelines. |
ciRegistry |
string |
GitLab Container Registry. This variable includes a :port value if one has been specified in the registry configuration. |
ciRegistryImage |
string |
the address of the registry tied to the specific project. |
ciRegistryUser |
string |
The username to use to push containers to the GitLab Container Registry, for the current project. |
ciSharedEnvironment |
string |
Marks that the job is executed in a shared environment (something that is persisted across CI invocations like shell or ssh executor). |
triggerPayload |
string |
This variable is available when a pipeline is triggered with a webhook. |
chatChannel
Required ¶
- Type: string
Source chat channel which triggered the ChatOps command.
Added in GitLab 10.6 Available in GitLab Runner all
chatInput
Required ¶
- Type: string
Additional arguments passed in the ChatOps command.
Added in GitLab 10.6 Available in GitLab Runner all
ci
Required ¶
- Type: string
Mark that job is executed in CI environment.
Added in GitLab all Available in GitLab Runner 0.4
ciApiV4Url
Required ¶
- Type: string
The GitLab API v4 root URL.
Added in GitLab 11.7 Available in GitLab Runner all
ciBuildsDir
Required ¶
- Type: string
Top-level directory where builds are executed.
Added in GitLab all Available in GitLab Runner 11.10
ciCommitBeforeSha
Required ¶
- Type: string
The previous latest commit present on a branch. Is always 0000000000000000000000000000000000000000 in pipelines for merge requests.
Added in GitLab 11.2 Available in GitLab Runner all
ciCommitDescription
Required ¶
- Type: string
The description of the commit the message without first line, if the title is shorter than 100 characters;
full message in other case.
Added in GitLab 10.8 Available in GitLab Runner all
ciCommitMessage
Required ¶
- Type: string
The full commit message.
Added in GitLab 10.8 Available in GitLab Runner all
ciCommitRefName
Required ¶
- Type: string
The branch or tag name for which project is built.
Added in GitLab 9.0 Available in GitLab Runner all
ciCommitRefProtected
Required ¶
- Type: string
true if the job is running on a protected reference, false if not.
Added in GitLab 11.11 Available in GitLab Runner all
ciCommitRefSlug
Required ¶
- Type: string
$CI_COMMIT_REF_NAME in lowercase, shortened to 63 bytes, and with everything except 0-9 and a-z replaced with -.
No leading / trailing -. Use in URLs, host names and domain names.
Added in GitLab 9.0 Available in GitLab Runner all
ciCommitSha
Required ¶
- Type: string
The commit revision for which project is built.
Added in GitLab 9.0 Available in GitLab Runner all
ciCommitShortSha
Required ¶
- Type: string
The first eight characters of CI_COMMIT_SHA.
Added in GitLab 11.7 Available in GitLab Runner all
ciCommitTimestamp
Required ¶
- Type: string
The timestamp of the commit in the ISO 8601 format.
Added in GitLab 13.4 Available in GitLab Runner all
ciCommitTitle
Required ¶
- Type: string
The title of the commit - the full first line of the message.
Added in GitLab 10.8 Available in GitLab Runner all
ciConcurrentId
Required ¶
- Type: string
Unique ID of build execution in a single executor.
Added in GitLab all Available in GitLab Runner 11.10
ciConcurrentProjectId
Required ¶
- Type: string
Unique ID of build execution in a single executor and project.
Added in GitLab all Available in GitLab Runner 11.10
ciConfigPath
Required ¶
- Type: string
The path to CI configuration file. Defaults to .gitlab-ci.yml.
Added in GitLab 9.4 Available in GitLab Runner 0.5
ciDebugTrace
Required ¶
- Type: string
Whether debug logging (tracing) is enabled.
Added in GitLab all Available in GitLab Runner 1.7
ciDefaultBranch
Required ¶
- Type: string
The name of the default branch for the project.
Added in GitLab 12.4 Available in GitLab Runner all
ciDependencyProxyGroupImagePrefix
Required ¶
- Type: string
The image prefix for pulling images through the Dependency Proxy.
Added in GitLab 13.7 Available in GitLab Runner all
ciDependencyProxyPassword
Required ¶
- Type: string
The password to use to pull images through the Dependency Proxy.
ATTENTION: Contrary to most other variables in this class, this variable is not resolved at rendering time. Instead the variable string is returned, which is then resolved during pipeline execution. This is because the value contains sensitive information.
Added in GitLab 13.7 Available in GitLab Runner all
ciDependencyProxyServer
Required ¶
- Type: string
The server for logging in to the Dependency Proxy. This is equivalent to $CI_SERVER_HOST:$CI_SERVER_PORT.
Added in GitLab 13.7 Available in GitLab Runner all
ciDependencyProxyUser
Required ¶
- Type: string
The username to use to pull images through the Dependency Proxy.
Added in GitLab 13.7 Available in GitLab Runner all
ciDeployPassword
Required ¶
- Type: string
Authentication password of the GitLab Deploy Token, only present if the Project has one related.
ATTENTION: Contrary to most other variables in this class, this variable is not resolved at rendering time. Instead the variable string is returned, which is then resolved during pipeline execution. This is because the value contains sensitive information.
Added in GitLab 10.8 Available in GitLab Runner all
ciDeployUser
Required ¶
- Type: string
Authentication username of the GitLab Deploy Token, only present if the Project has one related.
Added in GitLab 10.8 Available in GitLab Runner all
ciJobId
Required ¶
- Type: string
The unique ID of the current job that GitLab CI/CD uses internally.
Added in GitLab 9.0 Available in GitLab Runner all
ciJobImage
Required ¶
- Type: string
The name of the image running the CI job.
Added in GitLab 12.9 Available in GitLab Runner 12.9
ciJobJwt
Required ¶
- Type: string
RS256 JSON web token that can be used for authenticating with third party systems that support JWT authentication, for example HashiCorp’s Vault.
ATTENTION: Contrary to most other variables in this class, this variable is not resolved at rendering time. Instead the variable string is returned, which is then resolved during pipeline execution. This is because the value contains sensitive information.
Added in GitLab 12.10 Available in GitLab Runner all
ciJobManual
Required ¶
- Type: string
The flag to indicate that job was manually started.
Added in GitLab 8.12 Available in GitLab Runner all
ciJobName
Required ¶
- Type: string
The name of the job as defined in .gitlab-ci.yml.
Added in GitLab 9.0 Available in GitLab Runner 0.5
ciJobStage
Required ¶
- Type: string
The name of the stage as defined in .gitlab-ci.yml.
Added in GitLab 9.0 Available in GitLab Runner 0.5
ciJobStatus
Required ¶
- Type: string
The state of the job as each runner stage is executed.
Use with after_script where CI_JOB_STATUS can be either success, failed or canceled.
Added in GitLab all Available in GitLab Runner 13.5
ciJobToken
Required ¶
- Type: string
Token used for authenticating with a few API endpoints and downloading dependent repositories.
The token is valid as long as the job is running.
ATTENTION: Contrary to most other variables in this class, this variable is not resolved at rendering time. Instead the variable string is returned, which is then resolved during pipeline execution. This is because the value contains sensitive information.
Added in GitLab 9.0 Available in GitLab Runner 1.2
ciJobUrl
Required ¶
- Type: string
Job details URL.
Added in GitLab 11.1 Available in GitLab Runner 0.5
ciMergeRequestTargetBranchName
Required ¶
- Type: string
The target branch name of the merge request if the pipelines are for merge requests.
Available only if only [merge_requests] or rules syntax is used and the merge request is created.
Added in GitLab 11.6 Available in GitLab Runner all
ciMergeRequestTargetBranchSha
Required ¶
- Type: string
The HEAD SHA of the target branch of the merge request if the pipelines are for merge requests.
Available only if only [merge_requests] or rules syntax is used, the merge request is created, and the pipeline is a merged result pipeline.
Added in GitLab 11.9 Available in GitLab Runner all
ciNodeTotal
Required ¶
- Type: string
Total number of instances of this job running in parallel.
If the job is not parallelized, this variable is set to 1.
Added in GitLab 11.5 Available in GitLab Runner all
ciPagesDomain
Required ¶
- Type: string
The configured domain that hosts GitLab Pages.
Added in GitLab 11.8 Available in GitLab Runner all
ciPagesUrl
Required ¶
- Type: string
URL to GitLab Pages-built pages. Always belongs to a subdomain of CI_PAGES_DOMAIN.
Added in GitLab 11.8 Available in GitLab Runner all
ciPipelineId
Required ¶
- Type: string
The instance-level ID of the current pipeline. This is a unique ID across all projects on GitLab.
Added in GitLab 8.10 Available in GitLab Runner all
ciPipelineIid
Required ¶
- Type: string
The project-level IID (internal ID) of the current pipeline. This ID is unique for the current project.
Added in GitLab 11.0 Available in GitLab Runner all
ciPipelineSource
Required ¶
- Type: string
Indicates how the pipeline was triggered.
Possible options are push, web, schedule, api, external, chat, webide, merge_request_event, external_pull_request_event, parent_pipeline, trigger, or pipeline. For pipelines created before GitLab 9.5, this is displayed as unknown.
Added in GitLab 10.0 Available in GitLab Runner all
ciPipelineTriggered
Required ¶
- Type: string
The flag to indicate that job was triggered.
Added in GitLab all Available in GitLab Runner all
ciPipelineUrl
Required ¶
- Type: string
Pipeline details URL.
Added in GitLab 11.1 Available in GitLab Runner 0.5
ciProjectConfigPath
Required ¶
- Type: string
The CI configuration path for the project.
Added in GitLab 13.8 Available in GitLab Runner all
ciProjectDir
Required ¶
- Type: string
The full path where the repository is cloned and where the job is run.
If the GitLab Runner builds_dir parameter is set, this variable is set relative to the value of builds_dir. For more information, see Advanced configuration for GitLab Runner.
Added in GitLab all Available in GitLab Runner all
ciProjectId
Required ¶
- Type: string
The unique ID of the current project that GitLab CI/CD uses internally.
Added in GitLab all Available in GitLab Runner all
ciProjectName
Required ¶
- Type: string
The name of the directory for the project that is being built.
For example, if the project URL is gitlab.example.com/group-name/project-1, the CI_PROJECT_NAME would be project-1.
Added in GitLab 8.10 Available in GitLab Runner 0.5
ciProjectNamespace
Required ¶
- Type: string
The project stage (username or group name) that is being built.
Added in GitLab 8.10 Available in GitLab Runner 0.5
ciProjectPath
Required ¶
- Type: string
The stage with project name.
Added in GitLab 8.10 Available in GitLab Runner 0.5
ciProjectPathSlug
Required ¶
- Type: string
$CI_PROJECT_PATH in lowercase and with everything except 0-9 and a-z replaced with -. Use in URLs and domain names.
Added in GitLab 9.3 Available in GitLab Runner all
ciProjectRepositoryLanguages
Required ¶
- Type: string
Comma-separated, lowercase list of the languages used in the repository (for example ruby,javascript,html,css).
Added in GitLab 12.3 Available in GitLab Runner all
ciProjectRootNamespace
Required ¶
- Type: string
The root project stage (username or group name) that is being built.
For example, if CI_PROJECT_NAMESPACE is root-group/child-group/grandchild-group, CI_PROJECT_ROOT_NAMESPACE would be root-group.
Added in GitLab 13.2 Available in GitLab Runner 0.5
ciProjectTitle
Required ¶
- Type: string
The human-readable project name as displayed in the GitLab web interface.
Added in GitLab 12.4 Available in GitLab Runner all
ciProjectUrl
Required ¶
- Type: string
The HTTP(S) address to access project.
Added in GitLab 8.10 Available in GitLab Runner 0.5
ciProjectVisibility
Required ¶
- Type: string
The project visibility (internal, private, public).
Added in GitLab 10.3 Available in GitLab Runner all
ciRegistryPassword
Required ¶
- Type: string
The password to use to push containers to the GitLab Container Registry, for the current project.
ATTENTION: Contrary to most other variables in this class, this variable is not resolved at rendering time. Instead the variable string is returned, which is then resolved during pipeline execution. This is because the value contains sensitive information.
Added in GitLab 9.0 Available in GitLab Runner all
ciRepositoryUrl
Required ¶
- Type: string
The URL to clone the Git repository.
ATTENTION: Contrary to most other variables in this class, this variable is not resolved at rendering time. Instead the variable string is returned, which is then resolved during pipeline execution. This is because the value contains sensitive information.
Added in GitLab 9.0 Available in GitLab Runner all
ciRunnerDescription
Required ¶
- Type: string
The description of the runner as saved in GitLab.
Added in GitLab 8.10 Available in GitLab Runner 0.5
ciRunnerExecutableArch
Required ¶
- Type: string
The OS/architecture of the GitLab Runner executable (note that this is not necessarily the same as the environment of the executor).
Added in GitLab all Available in GitLab Runner 10.6
ciRunnerId
Required ¶
- Type: string
The unique ID of runner being used.
Added in GitLab 8.10 Available in GitLab Runner 0.5
ciRunnerRevision
Required ¶
- Type: string
GitLab Runner revision that is executing the current job.
Added in GitLab all Available in GitLab Runner 10.6
ciRunnerShortToken
Required ¶
- Type: string
First eight characters of the runner’s token used to authenticate new job requests. Used as the runner’s unique ID.
ATTENTION: Contrary to most other variables in this class, this variable is not resolved at rendering time. Instead the variable string is returned, which is then resolved during pipeline execution. This is because the value contains sensitive information.
Added in GitLab all Available in GitLab Runner 12.3
ciRunnerTags
Required ¶
- Type: string
The defined runner tags.
Added in GitLab 8.10 Available in GitLab Runner 0.5
ciRunnerVersion
Required ¶
- Type: string
GitLab Runner version that is executing the current job.
Added in GitLab all Available in GitLab Runner 10.6
ciServer
Required ¶
- Type: string
Mark that job is executed in CI environment.
Added in GitLab all Available in GitLab Runner all
ciServerHost
Required ¶
- Type: string
Host component of the GitLab instance URL, without protocol and port (like gitlab.example.com).
Added in GitLab 12.1 Available in GitLab Runner all
ciServerName
Required ¶
- Type: string
The name of CI server that is used to coordinate jobs.
Added in GitLab all Available in GitLab Runner all
ciServerPort
Required ¶
- Type: string
Port component of the GitLab instance URL, without host and protocol (like 3000).
Added in GitLab 12.8 Available in GitLab Runner all
ciServerProtocol
Required ¶
- Type: string
Protocol component of the GitLab instance URL, without host and port (like https).
Added in GitLab 12.8 Available in GitLab Runner all
ciServerRevision
Required ¶
- Type: string
GitLab revision that is used to schedule jobs.
Added in GitLab all Available in GitLab Runner all
ciServerUrl
Required ¶
- Type: string
The base URL of the GitLab instance, including protocol and port (like https://gitlab.example.com:8080).
Added in GitLab 12.7 Available in GitLab Runner all
ciServerVersion
Required ¶
- Type: string
GitLab version that is used to schedule jobs.
Added in GitLab all Available in GitLab Runner all
ciServerVersionMajor
Required ¶
- Type: string
GitLab version major component.
Added in GitLab 11.4 Available in GitLab Runner all
ciServerVersionMinor
Required ¶
- Type: string
GitLab version minor component.
Added in GitLab 11.4 Available in GitLab Runner all
ciServerVersionPatch
Required ¶
- Type: string
GitLab version patch component.
Added in GitLab 11.4 Available in GitLab Runner all
gitlabCi
Required ¶
- Type: string
Mark that job is executed in GitLab CI/CD environment.
Added in GitLab all Available in GitLab Runner all
gitlabFeatures
Required ¶
- Type: string
The comma separated list of licensed features available for your instance and plan.
Added in GitLab 10.6 Available in GitLab Runner all
gitlabUserEmail
Required ¶
- Type: string
The email of the user who started the job.
Added in GitLab 8.12 Available in GitLab Runner all
gitlabUserId
Required ¶
- Type: string
The ID of the user who started the job.
Added in GitLab 8.12 Available in GitLab Runner all
gitlabUserLogin
Required ¶
- Type: string
The login username of the user who started the job.
Added in GitLab 10.0 Available in GitLab Runner all
gitlabUserName
Required ¶
- Type: string
The real name of the user who started the job.
Added in GitLab 10.0 Available in GitLab Runner all
ciCommitBranch
Optional ¶
- Type: string
The commit branch name.
Present in branch pipelines, including pipelines for the default branch. Not present in merge request pipelines or tag pipelines.
Added in GitLab 12.6 Available in GitLab Runner 0.5
ciCommitTag
Optional ¶
- Type: string
The commit tag name. Present only when building tags.
Added in GitLab 9.0 Available in GitLab Runner 0.5
ciDeployFreeze
Optional ¶
- Type: string
Included with the value true if the pipeline runs during a deploy freeze window.
Added in GitLab 13.2 Available in GitLab Runner all
ciDisposableEnvironment
Optional ¶
- Type: string
Marks that the job is executed in a disposable environment (something that is created only for this job and disposed of/destroyed after the execution - all executors except shell and ssh).
If the environment is disposable, it is set to true, otherwise it is not defined at all.
Added in GitLab all Available in GitLab Runner 10.1
ciEnvironmentName
Optional ¶
- Type: string
The name of the environment for this job. Only present if environment:name is set.
Added in GitLab 8.15 Available in GitLab Runner all
ciEnvironmentSlug
Optional ¶
- Type: string
A simplified version of the environment name, suitable for inclusion in DNS, URLs, Kubernetes labels, and so on.
Only present if environment:name is set.
Added in GitLab 8.15 Available in GitLab Runner all
ciEnvironmentUrl
Optional ¶
- Type: string
The URL of the environment for this job. Only present if environment:url is set.
Added in GitLab 9.3 Available in GitLab Runner all
ciExternalPullRequestIid
Optional ¶
- Type: string
Pull Request ID from GitHub if the pipelines are for external pull requests.
Available only if only [external_pull_requests] or rules syntax is used and the pull request is open.
Added in GitLab 12.3 Available in GitLab Runner all
ciExternalPullRequestSourceBranchName
Optional ¶
- Type: string
The source branch name of the pull request if the pipelines are for external pull requests.
Available only if only [external_pull_requests] or rules syntax is used and the pull request is open.
Added in GitLab 12.3 Available in GitLab Runner all
ciExternalPullRequestSourceBranchSha
Optional ¶
- Type: string
The HEAD SHA of the source branch of the pull request if the pipelines are for external pull requests.
Available only if only [external_pull_requests] or rules syntax is used and the pull request is open.
Added in GitLab 12.3 Available in GitLab Runner all
ciExternalPullRequestSourceRepository
Optional ¶
- Type: string
The source repository name of the pull request if the pipelines are for external pull requests.
Available only if only [external_pull_requests] or rules syntax is used and the pull request is open.
Added in GitLab 13.3 Available in GitLab Runner all
ciExternalPullRequestTargetBranchName
Optional ¶
- Type: string
The target branch name of the pull request if the pipelines are for external pull requests.
Available only if only [external_pull_requests] or rules syntax is used and the pull request is open. * Added in GitLab 12.3 Available in GitLab Runner all
ciExternalPullRequestTargetBranchSha
Optional ¶
- Type: string
The HEAD SHA of the target branch of the pull request if the pipelines are for external pull requests.
Available only if only [external_pull_requests] or rules syntax is used and the pull request is open.
Added in GitLab 12.3 Available in GitLab Runner all
ciExternalPullRequestTargetRepository
Optional ¶
- Type: string
The target repository name of the pull request if the pipelines are for external pull requests.
Available only if only [external_pull_requests] or rules syntax is used and the pull request is open.
Added in GitLab 13.3 Available in GitLab Runner all
ciHasOpenRequirements
Optional ¶
- Type: string
Included with the value true only if the pipeline’s project has any open requirements.
Not included if there are no open requirements for the pipeline’s project.
Added in GitLab 13.1 Available in GitLab Runner all
ciKubernetesActive
Optional ¶
- Type: string
Included with the value true only if the pipeline has a Kubernetes cluster available for deployments.
Not included if no cluster is available. Can be used as an alternative to only:kubernetes/except:kubernetes with rules:if.
Added in GitLab 13.0 Available in GitLab Runner all
ciMergeRequestAssignees
Optional ¶
- Type: string
Comma-separated list of username(s) of assignee(s) for the merge request if the pipelines are for merge requests.
Available only if only [merge_requests] or rules syntax is used and the merge request is created.
Added in GitLab 11.9 Available in GitLab Runner all
ciMergeRequestDiffBaseSha
Optional ¶
- Type: string
The base SHA of the merge request diff, if the pipelines are for merge requests.
Added in GitLab 13.7 Available in GitLab Runner all
ciMergeRequestDiffId
Optional ¶
- Type: string
The version of the merge request diff, if the pipelines are for merge requests.
Added in GitLab 13.7 Available in GitLab Runner all
ciMergeRequestEventType
Optional ¶
- Type: string
The event type of the merge request, if the pipelines are for merge requests. Can be detached, merged_result or merge_train.
Added in GitLab 12.3 Available in GitLab Runner all
ciMergeRequestId
Optional ¶
- Type: string
The instance-level ID of the merge request.
Only available if the pipelines are for merge requests and the merge request is created. This is a unique ID across all projects on GitLab.
Added in GitLab 11.6 Available in GitLab Runner all
ciMergeRequestIid
Optional ¶
- Type: string
The project-level IID (internal ID) of the merge request.
Only available If the pipelines are for merge requests and the merge request is created. This ID is unique for the current project.
Added in GitLab 11.6 Available in GitLab Runner all
ciMergeRequestLabels
Optional ¶
- Type: string
Comma-separated label names of the merge request if the pipelines are for merge requests.
Available only if only [merge_requests] or rules syntax is used and the merge request is created.
Added in GitLab 11.9 Available in GitLab Runner all
ciMergeRequestMilestone
Optional ¶
- Type: string
The milestone title of the merge request if the pipelines are for merge requests.
Available only if only [merge_requests] or rules syntax is used and the merge request is created.
Added in GitLab 11.9 Available in GitLab Runner all
ciMergeRequestProjectId
Optional ¶
- Type: string
The ID of the project of the merge request if the pipelines are for merge requests.
Available only if only [merge_requests] or rules syntax is used and the merge request is created.
Added in GitLab 11.6 Available in GitLab Runner all
ciMergeRequestProjectPath
Optional ¶
- Type: string
The path of the project of the merge request if the pipelines are for merge requests (for example stage/awesome-project).
Available only if only [merge_requests] or rules syntax is used and the merge request is created.
Added in GitLab 11.6 Available in GitLab Runner all
ciMergeRequestProjectUrl
Optional ¶
- Type: string
The URL of the project of the merge request if the pipelines are for merge requests (for example http://192.168.10.15:3000/stage/awesome-project). Available only if only [merge_requests] or rules syntax is used and the merge request is created. * Added in GitLab 11.6 Available in GitLab Runner all.
ciMergeRequestRefPath
Optional ¶
- Type: string
The ref path of the merge request if the pipelines are for merge requests.
(for example refs/merge-requests/1/head). Available only if only [merge_requests] or rules syntax is used and the merge request is created.
Added in GitLab 11.6 Available in GitLab Runner all
ciMergeRequestSourceBranchName
Optional ¶
- Type: string
The source branch name of the merge request if the pipelines are for merge requests.
Available only if only [merge_requests] or rules syntax is used and the merge request is created.
Added in GitLab 11.6 Available in GitLab Runner all
ciMergeRequestSourceBranchSha
Optional ¶
- Type: string
The HEAD SHA of the source branch of the merge request if the pipelines are for merge requests.
Available only if only [merge_requests] or rules syntax is used, the merge request is created, and the pipeline is a merged result pipeline.
Added in GitLab 11.9 Available in GitLab Runner all
ciMergeRequestSourceProjectId
Optional ¶
- Type: string
The ID of the source project of the merge request if the pipelines are for merge requests.
Available only if only [merge_requests] or rules syntax is used and the merge request is created.
Added in GitLab 11.6 Available in GitLab Runner all
ciMergeRequestSourceProjectPath
Optional ¶
- Type: string
The path of the source project of the merge request if the pipelines are for merge requests.
Available only if only [merge_requests] or rules syntax is used and the merge request is created.
Added in GitLab 11.6 Available in GitLab Runner all
ciMergeRequestSourceProjectUrl
Optional ¶
- Type: string
The URL of the source project of the merge request if the pipelines are for merge requests.
Available only if only [merge_requests] or rules syntax is used and the merge request is created.
Added in GitLab 11.6 Available in GitLab Runner all
ciMergeRequestTitle
Optional ¶
- Type: string
The title of the merge request if the pipelines are for merge requests.
Available only if only [merge_requests] or rules syntax is used and the merge request is created.
Added in GitLab 11.9 Available in GitLab Runner all
ciNodeIndex
Optional ¶
- Type: string
Index of the job in the job set. If the job is not parallelized, this variable is not set.
Added in GitLab 11.5 Available in GitLab Runner all
ciOpenMergeRequests
Optional ¶
- Type: string
Available in branch and merge request pipelines.
Contains a comma-separated list of up to four merge requests that use the current branch and project as the merge request source. For example gitlab-org/gitlab!333,gitlab-org/gitlab-foss!11.
Added in GitLab 13.8 Available in GitLab Runner all
ciRegistry
Optional ¶
- Type: string
GitLab Container Registry. This variable includes a :port value if one has been specified in the registry configuration.
Added in GitLab 8.10 Available in GitLab Runner 0.5
ciRegistryImage
Optional ¶
- Type: string
the address of the registry tied to the specific project.
Added in GitLab 8.10 Available in GitLab Runner 0.5
ciRegistryUser
Optional ¶
- Type: string
The username to use to push containers to the GitLab Container Registry, for the current project.
Added in GitLab 9.0 Available in GitLab Runner all
ciSharedEnvironment
Optional ¶
- Type: string
Marks that the job is executed in a shared environment (something that is persisted across CI invocations like shell or ssh executor).
If the environment is shared, it is set to true, otherwise it is not defined at all.
Added in GitLab all Available in GitLab Runner 10.1
triggerPayload
Optional ¶
- Type: string
This variable is available when a pipeline is triggered with a webhook.
Added in GitLab 13.9 Available in GitLab Runner all
Rule ¶
- Implements: IRule
Initializers ¶
Name | Type | Description |
---|---|---|
props |
RuleProps |
No description. |
props
Required ¶
- Type: RuleProps
Methods ¶
Name | Description |
---|---|
addVariables |
Adds one or more variables, each as keyword argument, to the rule. |
isEqual |
isEqual checks if this object is equal to given object. |
never |
This method is intended to be used for predefined rules. |
render |
Returns a representation of any object which implements IBase . |
addVariables
¶
Adds one or more variables, each as keyword argument, to the rule.
variables
Required ¶
- Type: {[ key: string ]: string}
isEqual
¶
isEqual
checks if this
object is equal to given object.
comparable
Required ¶
- Type: IBase
never
¶
This method is intended to be used for predefined rules.
For instance you have defined an
often used rule on_master
whose if statement checks if the pipeline is executed on branch
master
. Then you can either run a job, if on master...
... or do not run a job if on master...
render
¶
Returns a representation of any object which implements IBase
.
The rendered representation is used by the gcix
to dump it
in YAML format as part of the .gitlab-ci.yml
pipeline.
Properties ¶
Name | Type | Description |
---|---|---|
variables |
{[ key: string ]: string} |
No description. |
allowFailure |
boolean |
No description. |
changes |
string[] |
No description. |
exists |
string[] |
No description. |
ifStatement |
string |
No description. |
when |
WhenStatement |
No description. |
variables
Required ¶
- Type: {[ key: string ]: string}
allowFailure
Optional ¶
- Type: boolean
changes
Optional ¶
- Type: string[]
exists
Optional ¶
- Type: string[]
ifStatement
Optional ¶
- Type: string
when
Optional ¶
- Type: WhenStatement
RuleLib ¶
Represents a library of static methods to create rules for GitLab CI/CD pipeline conditions.
Static Functions ¶
Name | Description |
---|---|
notOnBranch |
Creates a rule that evaluates to true if the CI/CD pipeline is NOT running on the specified branch. |
notOnMain |
Creates a rule that evaluates to true if the CI/CD pipeline is NOT running on the "main" branch. |
notOnMaster |
Creates a rule that evaluates to true if the CI/CD pipeline is NOT running on the "master" branch. |
onBranch |
Creates a rule that evaluates to true if the CI/CD pipeline is running on the specified branch. |
onMain |
Creates a rule that evaluates to true if the CI/CD pipeline is running on the "main" branch. |
onMaster |
Creates a rule that evaluates to true if the CI/CD pipeline is running on the "master" branch. |
onMergeRequestEvents |
Creates a rule that evaluates to true for merge request events in the CI/CD pipeline. |
onPipelineTrigger |
Creates a rule that evaluates to true for pipelines triggered by API or the trigger keyword. |
onSuccess |
Creates a rule that always evaluates to true (success). |
onTags |
Creates a rule that evaluates to true for CI/CD pipelines triggered by tags. |
notOnBranch
¶
Creates a rule that evaluates to true if the CI/CD pipeline is NOT running on the specified branch.
branchName
Required ¶
- Type: string
The name of the branch to check.
notOnMain
¶
Creates a rule that evaluates to true if the CI/CD pipeline is NOT running on the "main" branch.
notOnMaster
¶
Creates a rule that evaluates to true if the CI/CD pipeline is NOT running on the "master" branch.
onBranch
¶
Creates a rule that evaluates to true if the CI/CD pipeline is running on the specified branch.
branchName
Required ¶
- Type: string
The name of the branch to check.
onMain
¶
Creates a rule that evaluates to true if the CI/CD pipeline is running on the "main" branch.
onMaster
¶
Creates a rule that evaluates to true if the CI/CD pipeline is running on the "master" branch.
onMergeRequestEvents
¶
Creates a rule that evaluates to true for merge request events in the CI/CD pipeline.
onPipelineTrigger
¶
Creates a rule that evaluates to true for pipelines triggered by API or the trigger keyword.
onSuccess
¶
Creates a rule that always evaluates to true (success).
onTags
¶
Creates a rule that evaluates to true for CI/CD pipelines triggered by tags.
Service ¶
- Implements: IService
Initializers ¶
Name | Type | Description |
---|---|---|
props |
ServiceProps |
No description. |
props
Required ¶
- Type: ServiceProps
Methods ¶
Name | Description |
---|---|
isEqual |
isEqual checks if this object is equal to given object. |
render |
Returns a representation of any object which implements IBase . |
isEqual
¶
isEqual
checks if this
object is equal to given object.
comparable
Required ¶
- Type: IBase
render
¶
Returns a representation of any object which implements IBase
.
The rendered representation is used by the gcix
to dump it
in YAML format as part of the .gitlab-ci.yml
pipeline.
Properties ¶
Name | Type | Description |
---|---|---|
name |
string |
No description. |
name
Required ¶
- Type: string
TriggerJob ¶
- Implements: ITriggerJob
This class represents the trigger job.
Jobs with trigger can only use a
limited set of keywords.
For example, you can’t run commands with script
.
Simple example:
Initializers ¶
Name | Type | Description |
---|---|---|
props |
TriggerJobProps |
No description. |
props
Required ¶
- Type: TriggerJobProps
Methods ¶
Name | Description |
---|---|
addDependencies |
No description. |
addNeeds |
No description. |
addParent |
This method is called by gcix.JobCollection s when the job is added to that JobCollection. |
addTags |
No description. |
addVariables |
No description. |
appendRules |
No description. |
appendScripts |
No description. |
assignAllowFailure |
No description. |
assignArtifacts |
No description. |
assignCache |
No description. |
assignDependencies |
No description. |
assignImage |
Sets the image of this job. |
assignNeeds |
No description. |
assignTags |
No description. |
copy |
Returns an independent, deep copy object of this job. |
extendName |
This method is used by gcix.JobCollection s to populate the jobs name. |
extendStage |
This method is used by gcix.JobCollection s to populate the jobs name and stage. |
extendStageValue |
This method is used by gcix.JobCollection s to populate the jobs stage. |
getAllInstanceNames |
Return all instance names from the given child. |
isEqual |
isEqual checks if this object is equal to given object. |
prependRules |
No description. |
prependScripts |
No description. |
render |
Returns a representation of any object which implements IBase . |
addDependencies
¶
dependencies
Required ¶
- Type: Job | JobCollection | Need[]
addNeeds
¶
needs
Required ¶
- Type: Job | JobCollection | Need[]
addParent
¶
This method is called by gcix.JobCollection
s when the job is added to that JobCollection.
The job needs to know its parents when getAllInstanceNames()
is called.
parent
Required ¶
- Type: Job | JobCollection
addTags
¶
tags
Required ¶
- Type: string[]
addVariables
¶
variables
Required ¶
- Type: {[ key: string ]: string}
appendRules
¶
rules
Required ¶
- Type: Rule[]
appendScripts
¶
scripts
Required ¶
- Type: string[]
assignAllowFailure
¶
allowFailure
Required ¶
- Type: boolean | number[]
assignArtifacts
¶
artifacts
Required ¶
- Type: Artifacts
assignCache
¶
cache
Required ¶
- Type: Cache
assignDependencies
¶
dependencies
Required ¶
- Type: Job | JobCollection | Need[]
assignImage
¶
Sets the image of this job.
For a simple container image you can provide the origin of the image. If you want to set the entrypoint, you have to provide an Image object instead.
!! Any previous values will be overwritten.
image
Required ¶
- Type: string | Image
assignNeeds
¶
needs
Required ¶
- Type: Job | JobCollection | Need[]
assignTags
¶
tags
Required ¶
- Type: string[]
copy
¶
Returns an independent, deep copy object of this job.
extendName
¶
This method is used by gcix.JobCollection
s to populate the jobs name.
name
Required ¶
- Type: string
extendStage
¶
This method is used by gcix.JobCollection
s to populate the jobs name and stage.
stage
Required ¶
- Type: string
extendStageValue
¶
This method is used by gcix.JobCollection
s to populate the jobs stage.
stage
Required ¶
- Type: string
getAllInstanceNames
¶
Return all instance names from the given child.
That means all combinations of the childs name and stage within this sequence and all parent sequences.
child
Optional ¶
- Type: Job | JobCollection
isEqual
¶
isEqual
checks if this
object is equal to given object.
comparable
Required ¶
- Type: IBase
prependRules
¶
rules
Required ¶
- Type: Rule[]
prependScripts
¶
scripts
Required ¶
- Type: string[]
render
¶
Returns a representation of any object which implements IBase
.
The rendered representation is used by the gcix
to dump it
in YAML format as part of the .gitlab-ci.yml
pipeline.
Properties ¶
Name | Type | Description |
---|---|---|
tags |
string[] |
Getter method to receive added tags. |
allowFailure |
string | boolean | number[] |
No description. |
name |
string |
No description. |
orderedTags |
OrderedStringSet |
No description. |
parents |
Job | JobCollection[] |
No description. |
scripts |
string[] |
No description. |
stage |
string |
No description. |
artifacts |
Artifacts |
No description. |
cache |
Cache |
No description. |
dependencies |
Job | JobCollection | Need[] |
No description. |
image |
Image |
No description. |
needs |
Job | JobCollection | Need[] |
No description. |
original |
Job |
No description. |
rules |
Rule[] |
No description. |
variables |
{[ key: string ]: string} |
No description. |
branch |
string |
The branch of project the pipeline should be triggered of. |
includes |
IncludeLocal | IncludeFile | IncludeRemote | IncludeTemplate | IncludeArtifact[] |
Include a pipeline to trigger (Parent-child pipeline trigger) Mutually exclusiv with project . |
project |
string |
The full name of another Gitlab project to trigger (multi-project pipeline trigger). |
strategy |
string |
Determines if the result of this pipeline depends on the triggered downstream pipeline (use TriggerStrategy.DEPEND ) or if just "fire and forget" the downstream pipeline (use None ). |
tags
Required ¶
- Type: string[]
Getter method to receive added tags.
allowFailure
Required ¶
- Type: string | boolean | number[]
name
Required ¶
- Type: string
orderedTags
Required ¶
- Type: OrderedStringSet
parents
Required ¶
- Type: Job | JobCollection[]
scripts
Required ¶
- Type: string[]
stage
Required ¶
- Type: string
artifacts
Optional ¶
- Type: Artifacts
cache
Optional ¶
- Type: Cache
dependencies
Optional ¶
- Type: Job | JobCollection | Need[]
image
Optional ¶
- Type: Image
needs
Optional ¶
- Type: Job | JobCollection | Need[]
original
Optional ¶
- Type: Job
rules
Optional ¶
- Type: Rule[]
variables
Optional ¶
- Type: {[ key: string ]: string}
branch
Optional ¶
- Type: string
The branch of project
the pipeline should be triggered of.
includes
Optional ¶
- Type: IncludeLocal | IncludeFile | IncludeRemote | IncludeTemplate | IncludeArtifact[]
Include a pipeline to trigger (Parent-child pipeline trigger) Mutually exclusiv with project
.
project
Optional ¶
- Type: string
The full name of another Gitlab project to trigger (multi-project pipeline trigger).
Mutually exclusive with includes
.
strategy
Optional ¶
- Type: string
Determines if the result of this pipeline depends on the triggered downstream pipeline (use TriggerStrategy.DEPEND
) or if just "fire and forget" the downstream pipeline (use None
).
Protocols ¶
IArtifacts ¶
-
Extends: IBase
-
Implemented By: Artifacts, IArtifacts
Methods ¶
Name | Description |
---|---|
addExcludes |
No description. |
addPaths |
No description. |
addExcludes
¶
excludes
Required ¶
- Type: string[]
addPaths
¶
paths
Required ¶
- Type: string[]
Properties ¶
Name | Type | Description |
---|---|---|
excludes |
string[] |
No description. |
paths |
string[] |
No description. |
expireIn |
string |
No description. |
exposeAs |
string |
No description. |
name |
string |
No description. |
public |
boolean |
No description. |
reports |
ArtifactsReport[] |
No description. |
untracked |
boolean |
No description. |
when |
WhenStatement |
No description. |
excludes
Required ¶
- Type: string[]
paths
Required ¶
- Type: string[]
expireIn
Optional ¶
- Type: string
exposeAs
Optional ¶
- Type: string
name
Optional ¶
- Type: string
public
Optional ¶
- Type: boolean
reports
Optional ¶
- Type: ArtifactsReport[]
untracked
Optional ¶
- Type: boolean
when
Optional ¶
- Type: WhenStatement
IBase ¶
- Implemented By: @gcix/gcix.aws.CdkBootstrap, @gcix/gcix.aws.CdkDeploy, @gcix/gcix.aws.CdkDiff, @gcix/gcix.aws.CdkDiffDeploy, @gcix/gcix.aws.CdkMirrorToCodecommit, @gcix/gcix.container.BuildContainerCollection, @gcix/gcix.container.BuildGitlabContainerCollection, @gcix/gcix.container.CopyContainerCollection, @gcix/gcix.container.CraneCopy, @gcix/gcix.container.CranePull, @gcix/gcix.container.CranePush, @gcix/gcix.container.DiveScan, @gcix/gcix.container.DockerBuild, @gcix/gcix.container.DockerPush, @gcix/gcix.container.KanikoExecute, @gcix/gcix.container.TrivyIgnoreFileCheck, @gcix/gcix.container.TrivyScanLocalImage, @gcix/gcix.git.GitMirror, @gcix/gcix.gitlab.PagesAsciiDoctor, @gcix/gcix.python.PagesPdoc3, @gcix/gcix.python.PagesSphinx, @gcix/gcix.python.PythonBuildBdistWheel, @gcix/gcix.python.PythonDeployTwineUpload, @gcix/gcix.python.PythonFullStack, @gcix/gcix.python.PythonLintFlake8, @gcix/gcix.python.PythonLintIsort, @gcix/gcix.python.PythonLintMyPy, @gcix/gcix.python.PythonTestEvaluateGitTagPep440Conformity, @gcix/gcix.python.PythonTestPytest, Artifacts, Cache, CacheKey, Image, Include, IncludeArtifact, IncludeFile, IncludeLocal, IncludeRemote, IncludeTemplate, Job, JobCollection, Need, PagesJob, Pipeline, Rule, Service, TriggerJob, IArtifacts, IBase, ICache, ICacheKey, IInclude, IIncludeArtifact, IIncludeFile, IIncludeLocal, IIncludeRemote, IIncludeTemplate, IJob, IJobBase, IJobCollection, IJobCollectionBase, INeed, IRule, IService
Methods ¶
Name | Description |
---|---|
isEqual |
isEqual checks if this object is equal to given object. |
render |
Returns a representation of any object which implements IBase . |
isEqual
¶
isEqual
checks if this
object is equal to given object.
comparable
Required ¶
- Type: IBase
An arbitrary object to compare to.
render
¶
Returns a representation of any object which implements IBase
.
The rendered representation is used by the gcix
to dump it
in YAML format as part of the .gitlab-ci.yml
pipeline.
ICache ¶
ICacheKey ¶
IImage ¶
Methods ¶
Name | Description |
---|---|
withEntrypoint |
No description. |
withTag |
No description. |
withEntrypoint
¶
entrypoint
Required ¶
- Type: string[]
withTag
¶
tag
Required ¶
- Type: string
IInclude ¶
-
Extends: IBase
-
Implemented By: Include, IncludeArtifact, IncludeFile, IncludeLocal, IncludeRemote, IncludeTemplate, IInclude, IIncludeArtifact, IIncludeFile, IIncludeLocal, IIncludeRemote, IIncludeTemplate
This module represents the Gitlab CI Include keyword.
Use include to include external YAML files in your CI/CD configuration.
include:local example:
include:remote example:
include:template example:
Special type of include: Use a gcix.TriggerJob
with IncludeArtifact
to run a child pipeline with a generated configuration file from a previous job:
IIncludeArtifact ¶
-
Extends: IInclude
-
Implemented By: IncludeArtifact, IIncludeArtifact
IIncludeFile ¶
-
Extends: IInclude
-
Implemented By: IncludeFile, IIncludeFile
IIncludeLocal ¶
-
Extends: IInclude
-
Implemented By: IncludeLocal, IIncludeLocal
IIncludeRemote ¶
-
Extends: IInclude
-
Implemented By: IncludeRemote, IIncludeRemote
IIncludeTemplate ¶
-
Extends: IInclude
-
Implemented By: IncludeTemplate, IIncludeTemplate
IJob ¶
-
Extends: IJobBase
-
Implemented By: @gcix/gcix.aws.CdkBootstrap, @gcix/gcix.aws.CdkDeploy, @gcix/gcix.aws.CdkDiff, @gcix/gcix.aws.CdkMirrorToCodecommit, @gcix/gcix.container.CraneCopy, @gcix/gcix.container.CranePull, @gcix/gcix.container.CranePush, @gcix/gcix.container.DiveScan, @gcix/gcix.container.DockerBuild, @gcix/gcix.container.DockerPush, @gcix/gcix.container.KanikoExecute, @gcix/gcix.container.TrivyIgnoreFileCheck, @gcix/gcix.container.TrivyScanLocalImage, @gcix/gcix.git.GitMirror, @gcix/gcix.gitlab.PagesAsciiDoctor, @gcix/gcix.python.PagesPdoc3, @gcix/gcix.python.PagesSphinx, @gcix/gcix.python.PythonBuildBdistWheel, @gcix/gcix.python.PythonDeployTwineUpload, @gcix/gcix.python.PythonLintFlake8, @gcix/gcix.python.PythonLintIsort, @gcix/gcix.python.PythonLintMyPy, @gcix/gcix.python.PythonTestEvaluateGitTagPep440Conformity, @gcix/gcix.python.PythonTestPytest, Job, PagesJob, TriggerJob, IJob
Methods ¶
Name | Description |
---|---|
addParent |
This method is called by gcix.JobCollection s when the job is added to that JobCollection. |
assignAllowFailure |
No description. |
assignDependencies |
No description. |
assignImage |
Sets the image of this job. |
assignNeeds |
No description. |
assignTags |
No description. |
copy |
Returns an independent, deep copy object of this job. |
extendName |
This method is used by gcix.JobCollection s to populate the jobs name. |
extendStage |
This method is used by gcix.JobCollection s to populate the jobs name and stage. |
extendStageValue |
This method is used by gcix.JobCollection s to populate the jobs stage. |
addParent
¶
This method is called by gcix.JobCollection
s when the job is added to that JobCollection.
The job needs to know its parents when getAllInstanceNames()
is called.
parent
Required ¶
- Type: Job | JobCollection
any type of Job or JobCollection.
assignAllowFailure
¶
allowFailure
Required ¶
- Type: boolean | number[]
assignDependencies
¶
dependencies
Required ¶
- Type: Job | JobCollection | Need[]
assignImage
¶
Sets the image of this job.
For a simple container image you can provide the origin of the image. If you want to set the entrypoint, you have to provide an Image object instead.
!! Any previous values will be overwritten.
image
Required ¶
- Type: string | Image
assignNeeds
¶
needs
Required ¶
- Type: Job | JobCollection | Need[]
assignTags
¶
tags
Required ¶
- Type: string[]
copy
¶
Returns an independent, deep copy object of this job.
extendName
¶
This method is used by gcix.JobCollection
s to populate the jobs name.
name
Required ¶
- Type: string
to append to the current name.
extendStage
¶
This method is used by gcix.JobCollection
s to populate the jobs name and stage.
stage
Required ¶
- Type: string
name to extend the stage and the name.
extendStageValue
¶
This method is used by gcix.JobCollection
s to populate the jobs stage.
stage
Required ¶
- Type: string
name to extend the stage.
Properties ¶
Name | Type | Description |
---|---|---|
tags |
string[] |
Getter method to receive added tags. |
original |
Job |
No description. |
tags
Required ¶
- Type: string[]
Getter method to receive added tags.
original
Optional ¶
- Type: Job
IJobBase ¶
-
Extends: IBase
-
Implemented By: @gcix/gcix.aws.CdkBootstrap, @gcix/gcix.aws.CdkDeploy, @gcix/gcix.aws.CdkDiff, @gcix/gcix.aws.CdkMirrorToCodecommit, @gcix/gcix.container.CraneCopy, @gcix/gcix.container.CranePull, @gcix/gcix.container.CranePush, @gcix/gcix.container.DiveScan, @gcix/gcix.container.DockerBuild, @gcix/gcix.container.DockerPush, @gcix/gcix.container.KanikoExecute, @gcix/gcix.container.TrivyIgnoreFileCheck, @gcix/gcix.container.TrivyScanLocalImage, @gcix/gcix.git.GitMirror, @gcix/gcix.gitlab.PagesAsciiDoctor, @gcix/gcix.python.PagesPdoc3, @gcix/gcix.python.PagesSphinx, @gcix/gcix.python.PythonBuildBdistWheel, @gcix/gcix.python.PythonDeployTwineUpload, @gcix/gcix.python.PythonLintFlake8, @gcix/gcix.python.PythonLintIsort, @gcix/gcix.python.PythonLintMyPy, @gcix/gcix.python.PythonTestEvaluateGitTagPep440Conformity, @gcix/gcix.python.PythonTestPytest, Job, PagesJob, TriggerJob, IJob, IJobBase
Methods ¶
Name | Description |
---|---|
addDependencies |
No description. |
addNeeds |
No description. |
addTags |
No description. |
addVariables |
No description. |
appendRules |
No description. |
appendScripts |
No description. |
assignArtifacts |
No description. |
assignCache |
No description. |
getAllInstanceNames |
Return all instance names from the given child. |
prependRules |
No description. |
prependScripts |
No description. |
addDependencies
¶
dependencies
Required ¶
- Type: Job | JobCollection | Need[]
addNeeds
¶
needs
Required ¶
- Type: Job | JobCollection | Need[]
addTags
¶
tags
Required ¶
- Type: string[]
addVariables
¶
variables
Required ¶
- Type: {[ key: string ]: string}
appendRules
¶
rules
Required ¶
- Type: Rule[]
appendScripts
¶
scripts
Required ¶
- Type: string[]
assignArtifacts
¶
artifacts
Required ¶
- Type: Artifacts
assignCache
¶
cache
Required ¶
- Type: Cache
getAllInstanceNames
¶
Return all instance names from the given child.
That means all combinations of the childs name and stage within this sequence and all parent sequences.
child
Optional ¶
- Type: Job | JobCollection
prependRules
¶
rules
Required ¶
- Type: Rule[]
prependScripts
¶
scripts
Required ¶
- Type: string[]
Properties ¶
Name | Type | Description |
---|---|---|
tags |
string[] |
Getter method to receive added tags. |
tags
Required ¶
- Type: string[]
Getter method to receive added tags.
IJobCollection ¶
-
Extends: IJobCollectionBase
-
Implemented By: @gcix/gcix.aws.CdkDiffDeploy, @gcix/gcix.container.BuildContainerCollection, @gcix/gcix.container.BuildGitlabContainerCollection, @gcix/gcix.container.CopyContainerCollection, @gcix/gcix.python.PythonFullStack, JobCollection, Pipeline, IJobCollection
Methods ¶
Name | Description |
---|---|
addChildren |
Add gcix.Job s or other gcix.JobCollection s to this JobCollection. |
addParent |
No description. |
initializeAllowFailure |
Calling gcix.Job.assignAllowFailure() to all jobs within this JobCollection that haven't been set the allowFailure before. |
initializeArtifacts |
Sets gcix.Job.artifacts to all jobs within this JobCollection that haven't been set the artifacs before. |
initializeCache |
Calling gcix.Job.assigneCache() to all jobs within this JobCollection that haven't been set the cache before. |
initializeDependencies |
Calling gcix.Job.assignDependencies() to all jobs within the first stage of this JobCollection that haven't been added dependencies before. |
initializeImage |
Calling gcix.Job.assignImage() to all jobs within this JobCollection. |
initializeNeeds |
Calling gcix.Job.assignNeeds() to all jobs within the first stage of this JobCollection that haven't been added needs before. |
initializeRules |
Calling gcix.Job.append_rules() to all jobs within this JobCollection that haven't been added rules before. |
initializeTags |
Calling gcix.Job.addTags([...]) to all jobs within this JobCollection that haven't been added tags before. |
initializeVariables |
Calling gcix.Job.addVariables({...}) to all jobs within this JobCollection that haven't been added variables before. |
overrideAllowFailure |
Calling gcix.Job.assignAllowFailure() to all jobs within this JobCollection overriding any previous set value. |
overrideDependencies |
Calling gcix.Job.assignDependencies() to all jobs within the first stage of this JobCollection and overriding any previously added dependencies to that jobs. |
overrideImage |
Calling gcix.Job.assignImage() to all jobs within this JobCollection overriding any previous set value. |
overrideNeeds |
Calling gcix.Job.assignNeeds() to all jobs within the first stage of this JobCollection and overriding any previously added needs to that jobs. |
overrideRules |
Calling gcix.Job.overrideRules() to all jobs within this JobCollection and overriding any previously added rules to that jobs. |
overrideTags |
Calling gcix.Job.addTags([...]) to all jobs within this JobCollection and overriding any previously added tags to that jobs. |
overrideVariables |
Calling gcix.Job.addVariables({...}) to all jobs within this JobCollection and overriding any previously added variables to that jobs. |
addChildren
¶
Add gcix.Job
s or other gcix.JobCollection
s to this JobCollection.
Adding a child creates a copy of that child. You should provide a name or stage when adding children, to make them different from other places where they will be used.
props
Required ¶
- Type: AddChildrenProps
addParent
¶
parent
Required ¶
- Type: JobCollection
initializeAllowFailure
¶
Calling gcix.Job.assignAllowFailure()
to all jobs within this JobCollection that haven't been set the allowFailure before.
allowFailure
Required ¶
- Type: boolean | number[]
???
initializeArtifacts
¶
Sets gcix.Job.artifacts
to all jobs within this JobCollection that haven't been set the artifacs before.
artifacts
Required ¶
- Type: Artifacts
???
initializeCache
¶
Calling gcix.Job.assigneCache()
to all jobs within this JobCollection that haven't been set the cache before.
cache
Required ¶
- Type: Cache
???
initializeDependencies
¶
Calling gcix.Job.assignDependencies()
to all jobs within the first stage of this JobCollection that haven't been added dependencies before.
An empty parameter list means that jobs will get an empty dependency list and thus does not download artifacts by default.
dependencies
Required ¶
- Type: Job | JobCollection | Need[]
???
initializeImage
¶
Calling gcix.Job.assignImage()
to all jobs within this JobCollection.
image
Required ¶
- Type: string | Image
???
initializeNeeds
¶
Calling gcix.Job.assignNeeds()
to all jobs within the first stage of this JobCollection that haven't been added needs before.
An empty parameter list means that jobs will get an empty dependency list and thus does not depend on other jobs by default.
needs
Required ¶
- Type: Job | JobCollection | Need[]
???
initializeRules
¶
Calling gcix.Job.append_rules()
to all jobs within this JobCollection that haven't been added rules before.
rules
Required ¶
- Type: Rule[]
???
initializeTags
¶
Calling gcix.Job.addTags([...])
to all jobs within this JobCollection that haven't been added tags before.
tags
Required ¶
- Type: string[]
???
initializeVariables
¶
Calling gcix.Job.addVariables({...})
to all jobs within this JobCollection that haven't been added variables before.
variables
Required ¶
- Type: {[ key: string ]: string}
???
overrideAllowFailure
¶
Calling gcix.Job.assignAllowFailure()
to all jobs within this JobCollection overriding any previous set value.
allowFailure
Required ¶
- Type: boolean | number[]
???
overrideDependencies
¶
Calling gcix.Job.assignDependencies()
to all jobs within the first stage of this JobCollection and overriding any previously added dependencies to that jobs.
An empty parameter list means that jobs will get an empty dependency list and thus does not download artifacts.
dependencies
Required ¶
- Type: Job | JobCollection | Need[]
???
overrideImage
¶
Calling gcix.Job.assignImage()
to all jobs within this JobCollection overriding any previous set value.
image
Required ¶
- Type: string | Image
???
overrideNeeds
¶
Calling gcix.Job.assignNeeds()
to all jobs within the first stage of this JobCollection and overriding any previously added needs to that jobs.
An empty parameter list means that jobs will get an empty dependency list and thus does not depend on other jobs.
needs
Required ¶
- Type: Job | JobCollection | Need[]
???
overrideRules
¶
Calling gcix.Job.overrideRules()
to all jobs within this JobCollection and overriding any previously added rules to that jobs.
rules
Required ¶
- Type: Rule[]
???
overrideTags
¶
Calling gcix.Job.addTags([...])
to all jobs within this JobCollection and overriding any previously added tags to that jobs.
tags
Required ¶
- Type: string[]
???
overrideVariables
¶
Calling gcix.Job.addVariables({...})
to all jobs within this JobCollection and overriding any previously added variables to that jobs.
variables
Required ¶
- Type: {[ key: string ]: string}
???
Properties ¶
Name | Type | Description |
---|---|---|
lastJobsExecuted |
Job[] |
This property returns all Jobs from the last stage of this JobCollection. |
nestedJobs |
Job[] |
No description. |
populatedJobs |
Job[] |
Returns a list with populated copies of all nested jobs of this JobCollection. |
children |
ChildDict[] |
No description. |
orderedTags |
OrderedStringSet |
No description. |
orderedTagsForInitialization |
OrderedStringSet |
No description. |
orderedTagsForReplacement |
OrderedStringSet |
No description. |
parents |
Job | JobCollection[] |
No description. |
allowFailureForInitialization |
string | boolean | number[] |
No description. |
allowFailureForReplacement |
string | boolean | number[] |
No description. |
artifacts |
Artifacts |
No description. |
artifactsForInitialization |
Artifacts |
No description. |
artifactsForReplacement |
Artifacts |
No description. |
cache |
Cache |
No description. |
cacheForInitialization |
Cache |
No description. |
dependencies |
Job | JobCollection | Need[] |
No description. |
dependenciesForInitialization |
Job | JobCollection | Need[] |
No description. |
dependenciesForReplacement |
Job | JobCollection | Need[] |
No description. |
imageForInitialization |
string | Image |
No description. |
imageForReplacement |
string | Image |
No description. |
needs |
Job | JobCollection | Need[] |
No description. |
needsForInitialization |
Job | JobCollection | Need[] |
No description. |
needsForReplacement |
Job | JobCollection | Need[] |
No description. |
rulesForInitialization |
Rule[] |
No description. |
rulesForReplacement |
Rule[] |
No description. |
rulesToAppend |
Rule[] |
No description. |
rulesToPrepend |
Rule[] |
No description. |
scriptsToAppend |
string[] |
No description. |
scriptsToPrepend |
string[] |
No description. |
variables |
{[ key: string ]: string} |
No description. |
variablesForInitialization |
{[ key: string ]: string} |
No description. |
variablesForReplacement |
{[ key: string ]: string} |
No description. |
lastJobsExecuted
Required ¶
- Type: Job[]
This property returns all Jobs from the last stage of this JobCollection.
This is typically be requested from a job which has setup this JobCollection as need, to determine all actual jobs of this JobCollection as need.
nestedJobs
Required ¶
- Type: Job[]
populatedJobs
Required ¶
- Type: Job[]
Returns a list with populated copies of all nested jobs of this JobCollection.
Populated means, that all attributes of a Job which depends on its context are resolved to their final values. The context is primarily the JobCollection within the jobs resides but also dependencies to other jobs and JobCollection's. Thus this JobCollection will apply its own configuration, like variables to add, tags to set, etc., to all its jobs and JobCollection's.
Copies means what it says, that the returned job are not the same job objects, originally added to this JobCollection, but copies of them.
Nested means, that also jobs from JobCollection's within this JobCollection, are returned, as well as jobs from JobCollection's within JobCollection's within this JobCollection and so on.
children
Required ¶
- Type: ChildDict[]
orderedTags
Required ¶
- Type: OrderedStringSet
orderedTagsForInitialization
Required ¶
- Type: OrderedStringSet
orderedTagsForReplacement
Required ¶
- Type: OrderedStringSet
parents
Required ¶
- Type: Job | JobCollection[]
allowFailureForInitialization
Optional ¶
- Type: string | boolean | number[]
allowFailureForReplacement
Optional ¶
- Type: string | boolean | number[]
artifacts
Optional ¶
- Type: Artifacts
artifactsForInitialization
Optional ¶
- Type: Artifacts
artifactsForReplacement
Optional ¶
- Type: Artifacts
cache
Optional ¶
- Type: Cache
cacheForInitialization
Optional ¶
- Type: Cache
dependencies
Optional ¶
- Type: Job | JobCollection | Need[]
dependenciesForInitialization
Optional ¶
- Type: Job | JobCollection | Need[]
dependenciesForReplacement
Optional ¶
- Type: Job | JobCollection | Need[]
imageForInitialization
Optional ¶
- Type: string | Image
imageForReplacement
Optional ¶
- Type: string | Image
needs
Optional ¶
- Type: Job | JobCollection | Need[]
needsForInitialization
Optional ¶
- Type: Job | JobCollection | Need[]
needsForReplacement
Optional ¶
- Type: Job | JobCollection | Need[]
rulesForInitialization
Optional ¶
- Type: Rule[]
rulesForReplacement
Optional ¶
- Type: Rule[]
rulesToAppend
Optional ¶
- Type: Rule[]
rulesToPrepend
Optional ¶
- Type: Rule[]
scriptsToAppend
Optional ¶
- Type: string[]
scriptsToPrepend
Optional ¶
- Type: string[]
variables
Optional ¶
- Type: {[ key: string ]: string}
variablesForInitialization
Optional ¶
- Type: {[ key: string ]: string}
variablesForReplacement
Optional ¶
- Type: {[ key: string ]: string}
IJobCollectionBase ¶
-
Extends: IBase
-
Implemented By: @gcix/gcix.aws.CdkDiffDeploy, @gcix/gcix.container.BuildContainerCollection, @gcix/gcix.container.BuildGitlabContainerCollection, @gcix/gcix.container.CopyContainerCollection, @gcix/gcix.python.PythonFullStack, JobCollection, Pipeline, IJobCollection, IJobCollectionBase
Methods ¶
Name | Description |
---|---|
addDependencies |
No description. |
addNeeds |
No description. |
addTags |
No description. |
addVariables |
No description. |
appendRules |
No description. |
appendScripts |
No description. |
assignArtifacts |
No description. |
assignCache |
No description. |
getAllInstanceNames |
Return all instance names from the given child. |
prependRules |
No description. |
prependScripts |
No description. |
addDependencies
¶
dependencies
Required ¶
- Type: Job | JobCollection | Need[]
addNeeds
¶
needs
Required ¶
- Type: Job | JobCollection | Need[]
addTags
¶
tags
Required ¶
- Type: string[]
addVariables
¶
variables
Required ¶
- Type: {[ key: string ]: string}
appendRules
¶
rules
Required ¶
- Type: Rule[]
appendScripts
¶
scripts
Required ¶
- Type: string[]
assignArtifacts
¶
artifacts
Required ¶
- Type: Artifacts
assignCache
¶
cache
Required ¶
- Type: Cache
getAllInstanceNames
¶
Return all instance names from the given child.
That means all combinations of the childs name and stage within this JobCollection and all parent JobCollection's.
child
Optional ¶
- Type: Job | JobCollection
prependRules
¶
rules
Required ¶
- Type: Rule[]
prependScripts
¶
scripts
Required ¶
- Type: string[]
INeed ¶
IPagesJob ¶
Methods ¶
Name | Description |
---|---|
assignStage |
Set the name of this jobs stage to a value other than pages . |
copy |
There should be only one instance of this job, that is why this method does not return a copy of this job but the job itself. |
extendName |
The jobs name pages is fixed and can't be altered. |
extendStage |
The stage name can't be altered from parent sequences. |
extendStageValue |
Extending the name of the stage is not allowed on this Job. |
assignStage
¶
Set the name of this jobs stage to a value other than pages
.
stage
Required ¶
- Type: string
A valid Gitlab CI Job stage name.
copy
¶
There should be only one instance of this job, that is why this method does not return a copy of this job but the job itself.
extendName
¶
The jobs name pages
is fixed and can't be altered.
name
Required ¶
- Type: string
extendStage
¶
The stage name can't be altered from parent sequences.
name
Required ¶
- Type: string
extendStageValue
¶
Extending the name of the stage is not allowed on this Job.
name
Required ¶
- Type: string
IPipeline ¶
Methods ¶
Name | Description |
---|---|
addInclude |
Let you add global gcix.Include s to the pipeline. Gitlab CI Documentation: "Use include to include external YAML files in your CI/CD configuration.". |
addServices |
Add one or more gcix.Service s to the pipeline. |
writeYaml |
Create the Gitlab CI YAML file from this pipeline object. |
addInclude
¶
Let you add global gcix.Include
s to the pipeline. Gitlab CI Documentation: "Use include to include external YAML files in your CI/CD configuration.".
include
Required ¶
- Type: Include
addServices
¶
Add one or more gcix.Service
s to the pipeline.
Gitlab CI Documentation: "The services keyword defines a Docker image that runs during a job linked to the Docker image that the image keyword defines."
services
Required ¶
- Type: Service[]
simply use strings to name the services to link to the pipeline.
Use objects of the gcix.Service
class for
more complex service configurations.
writeYaml
¶
Create the Gitlab CI YAML file from this pipeline object.
Use that YAML file to trigger a child pipeline.
filename
Optional ¶
- Type: string
the file name of the created yaml file.
Properties ¶
Name | Type | Description |
---|---|---|
includes |
Include[] |
No description. |
service |
Service[] |
No description. |
includes
Required ¶
- Type: Include[]
service
Required ¶
- Type: Service[]
IRule ¶
Methods ¶
Name | Description |
---|---|
addVariables |
Adds one or more variables, each as keyword argument, to the rule. |
never |
This method is intended to be used for predefined rules. |
addVariables
¶
Adds one or more variables, each as keyword argument, to the rule.
variables
Required ¶
- Type: {[ key: string ]: string}
Each variable would be provided as keyword argument:.
never
¶
This method is intended to be used for predefined rules.
For instance you have defined an
often used rule on_master
whose if statement checks if the pipeline is executed on branch
master
. Then you can either run a job, if on master...
... or do not run a job if on master...
IService ¶
Properties ¶
Name | Type | Description |
---|---|---|
name |
string |
No description. |
name
Required ¶
- Type: string
ITriggerJob ¶
- Implemented By: TriggerJob, ITriggerJob
Properties ¶
Name | Type | Description |
---|---|---|
branch |
string |
The branch of project the pipeline should be triggered of. |
includes |
IncludeLocal | IncludeFile | IncludeRemote | IncludeTemplate | IncludeArtifact[] |
Include a pipeline to trigger (Parent-child pipeline trigger) Mutually exclusiv with project . |
project |
string |
The full name of another Gitlab project to trigger (multi-project pipeline trigger). |
strategy |
string |
Determines if the result of this pipeline depends on the triggered downstream pipeline (use TriggerStrategy.DEPEND ) or if just "fire and forget" the downstream pipeline (use None ). |
branch
Optional ¶
- Type: string
The branch of project
the pipeline should be triggered of.
includes
Optional ¶
- Type: IncludeLocal | IncludeFile | IncludeRemote | IncludeTemplate | IncludeArtifact[]
Include a pipeline to trigger (Parent-child pipeline trigger) Mutually exclusiv with project
.
project
Optional ¶
- Type: string
The full name of another Gitlab project to trigger (multi-project pipeline trigger).
Mutually exclusive with includes
.
strategy
Optional ¶
- Type: string
Determines if the result of this pipeline depends on the triggered downstream pipeline (use TriggerStrategy.DEPEND
) or if just "fire and forget" the downstream pipeline (use None
).
Enums ¶
CachePolicy ¶
This enum represents the cache:policy keyword. The policy determines if a Job can modify the cache or read him only.
Members ¶
Name | Description |
---|---|
PULLPUSH |
The default behavior of a caching job is to download the files at the start of execution and re-upload them at the end. |
PULL |
If you are certain that the job does not modify the cached files, you can specify this policy to skip the upload step. |
PULLPUSH
¶
The default behavior of a caching job is to download the files at the start of execution and re-upload them at the end.
This behavior ensures that any changes made by the job are persisted for future runs.
PULL
¶
If you are certain that the job does not modify the cached files, you can specify this policy to skip the upload step.
By setting this policy, the job will only download the cached files at the start of execution without re-uploading them at the end.
WhenStatement ¶
This enum holds different when statements for Rule
s.
Members ¶
Name | Description |
---|---|
ALWAYS |
No description. |
DELAYED |
No description. |
MANUAL |
No description. |
NEVER |
No description. |
ONFAILURE |
No description. |
ONSUCCESS |
No description. |