container
Submodule ¶
Structs ¶
AWSRegistryProps ¶
Initializer ¶
Properties ¶
Name | Type | Description |
---|---|---|
accountId |
string |
AWS account id. |
region |
string |
AWS region where the ECR repository lives in. |
accountId
Optional ¶
- Type: string
- Default: AWSAccount.awsAccountId()
AWS account id.
region
Optional ¶
- Type: string
- Default: AWSAccount.awsRegion()
AWS region where the ECR repository lives in.
BuildContainerCollectionProps ¶
Initializer ¶
Properties ¶
Name | Type | Description |
---|---|---|
dockerClientConfig |
DockerClientConfig |
Creates the Docker configuration file base on objects settings, to authenticate against given registries. |
doCranePush |
boolean |
Set to false to skip the Crane push job. |
doDiveScan |
boolean |
Set to false to skip the Dive scan job. |
doTrivyignoreCheck |
boolean |
Set to false to skip the existance check of the .trivyignore file. |
doTrivyScan |
boolean |
Set to false to skip the Trivy scan job. |
imageName |
string |
Image name with stage in the registry. |
imageTag |
string |
Image tag. |
jobName |
string |
The name of the Bootstrap job. |
jobStage |
string |
The stage of the Bootstrap job. |
registry |
string | Registry |
Container registry to push the image to. |
dockerClientConfig
Optional ¶
- Type: DockerClientConfig
- Default: DockerClientConfig with login to the official Docker Hub and expecting credentials given as environment variables
REGISTRY_USER
andREGISTRY_LOGIN
.
Creates the Docker configuration file base on objects settings, to authenticate against given registries.
doCranePush
Optional ¶
- Type: boolean
- Default: true
Set to false
to skip the Crane push job.
doDiveScan
Optional ¶
- Type: boolean
- Default: true
Set to false
to skip the Dive scan job.
doTrivyignoreCheck
Optional ¶
- Type: boolean
- Default: true
Set to false
to skip the existance check of the .trivyignore
file.
doTrivyScan
Optional ¶
- Type: boolean
- Default: true
Set to false
to skip the Trivy scan job.
imageName
Optional ¶
- Type: string
- Default: PredefinedVariables.ciProjectName
Image name with stage in the registry.
e.g. username/imageName.
imageTag
Optional ¶
- Type: string
- Default: PredefinedVariables.ciCommitRefName
Image tag.
Depending of the build it defaults either to the git tag or to the actual branch name.
jobName
Optional ¶
- Type: string
The name of the Bootstrap job.
jobStage
Optional ¶
- Type: string
The stage of the Bootstrap job.
registry
Optional ¶
- Type: string | Registry
- Default: Registry.DOCKER
Container registry to push the image to.
If the container registry
needs authentication, you have to provide a DockerClientConfig
object
with credentials.
CopyContainerCollectionProps ¶
Initializer ¶
Properties ¶
Name | Type | Description |
---|---|---|
imageName |
string |
Image name with stage in the registry. |
imageTag |
string |
Container image tag to pull from srcRegistry and push to dstRegistry . |
dockerClientConfig |
DockerClientConfig |
Creates the Docker configuration file base on objects settings, to authenticate against given registries. |
doDiveScan |
boolean |
Set to false to skip the Dive scan job. |
doTrivyignoreCheck |
boolean |
Set to false to skip the existance check of the .trivyignore file. |
doTrivyScan |
boolean |
Set to false to skip the Trivy scan job. |
dstRegistry |
string | Registry |
Container registry to push the image to. |
jobName |
string |
The name of the Bootstrap job. |
jobStage |
string |
The stage of the Bootstrap job. |
srcRegistry |
string | Registry |
Container registry to pull the image from. |
imageName
Required ¶
- Type: string
Image name with stage in the registry.
e.g. username/image_name.
imageTag
Required ¶
- Type: string
Container image tag to pull from srcRegistry
and push to dstRegistry
.
dockerClientConfig
Optional ¶
- Type: DockerClientConfig
- Default: DockerClientConfig with login to the official Docker Hub and expecting credentials given as environment variables
REGISTRY_USER
andREGISTRY_LOGIN
.
Creates the Docker configuration file base on objects settings, to authenticate against given registries.
doDiveScan
Optional ¶
- Type: boolean
- Default: true
Set to false
to skip the Dive scan job.
doTrivyignoreCheck
Optional ¶
- Type: boolean
- Default: true
Set to false
to skip the existance check of the .trivyignore
file.
doTrivyScan
Optional ¶
- Type: boolean
- Default: true
Set to false
to skip the Trivy scan job.
dstRegistry
Optional ¶
- Type: string | Registry
- Default: Registry.DOCKER
Container registry to push the image to.
If the container registry needs
authentication, you have to provide a DockerClientConfig
object with
credentials.
jobName
Optional ¶
- Type: string
The name of the Bootstrap job.
jobStage
Optional ¶
- Type: string
The stage of the Bootstrap job.
srcRegistry
Optional ¶
- Type: string | Registry
- Default: Registry.DOCKER
Container registry to pull the image from.
If the container registry needs
authentication, you have to provide a DockerClientConfig
object with
credentials.
CraneCopyProps ¶
Initializer ¶
Properties ¶
Name | Type | Description |
---|---|---|
dstRegistry |
string | Registry |
Registry URL to copy container image to. |
srcRegistry |
string | Registry |
Registry URL to copy container image from. |
dockerClientConfig |
DockerClientConfig |
Creates the Docker configuration file base on objects settings, used by crane to authenticate against given registries. |
jobName |
string |
The name of the Bootstrap job. |
jobStage |
string |
The stage of the Bootstrap job. |
dstRegistry
Required ¶
- Type: string | Registry
Registry URL to copy container image to.
srcRegistry
Required ¶
- Type: string | Registry
Registry URL to copy container image from.
dockerClientConfig
Optional ¶
- Type: DockerClientConfig
Creates the Docker configuration file base on objects settings, used by crane to authenticate against given registries.
jobName
Optional ¶
- Type: string
The name of the Bootstrap job.
jobStage
Optional ¶
- Type: string
The stage of the Bootstrap job.
CranePullProps ¶
Initializer ¶
Properties ¶
Name | Type | Description |
---|---|---|
srcRegistry |
string | Registry |
Registry URL to pull container image from. |
dockerClientConfig |
DockerClientConfig |
Creates the Docker configuration file base on objects settings, to authenticate against given registries. |
imageName |
string |
Container image with namespace to pull from srcRegistry . |
imageTag |
string |
Tag of the image which will be pulled. |
jobName |
string |
The name of the Bootstrap job. |
jobStage |
string |
The stage of the Bootstrap job. |
tarPath |
string |
Path where to save the container image tarball. |
srcRegistry
Required ¶
- Type: string | Registry
Registry URL to pull container image from.
dockerClientConfig
Optional ¶
- Type: DockerClientConfig
- Default: DockerClientConfig with login to the official Docker Hub and expecting credentials given as environment variables
REGISTRY_USER
andREGISTRY_LOGIN
.
Creates the Docker configuration file base on objects settings, to authenticate against given registries.
imageName
Optional ¶
- Type: string
- Default: PredefinedVariables.ciProjectName
Container image with namespace to pull from srcRegistry
.
imageTag
Optional ¶
- Type: string
- Default: latest
Tag of the image which will be pulled.
jobName
Optional ¶
- Type: string
The name of the Bootstrap job.
jobStage
Optional ¶
- Type: string
The stage of the Bootstrap job.
tarPath
Optional ¶
- Type: string
- Default: PredefinedVariables.ciProjectDir
Path where to save the container image tarball.
CranePushProps ¶
Initializer ¶
Properties ¶
Name | Type | Description |
---|---|---|
dstRegistry |
string | Registry |
Registry URL to copy container image to. |
dockerClientConfig |
DockerClientConfig |
Creates the Docker configuration file base on objects settings, to authenticate against given registries. |
imageName |
string |
Container image name, searched for in imagePath and gets .tar appended. |
imageTag |
string |
The tag the image will be tagged with. |
jobName |
string |
The name of the Bootstrap job. |
jobStage |
string |
The stage of the Bootstrap job. |
tarPath |
string |
Path where to find the container image tarball. |
dstRegistry
Required ¶
- Type: string | Registry
Registry URL to copy container image to.
dockerClientConfig
Optional ¶
- Type: DockerClientConfig
Creates the Docker configuration file base on objects settings, to authenticate against given registries.
Defaults to a DockerClientConfig
with login to the official Docker Hub and expecting credentials given as
environment variables REGISTRY_USER
and REGISTRY_LOGIN
.
imageName
Optional ¶
- Type: string
- Default: PredefinedVariables.ciProjectName
Container image name, searched for in imagePath
and gets .tar
appended.
imageTag
Optional ¶
- Type: string
- Default: PredefinedVariables.ciCommitTag
The tag the image will be tagged with.
jobName
Optional ¶
- Type: string
The name of the Bootstrap job.
jobStage
Optional ¶
- Type: string
The stage of the Bootstrap job.
tarPath
Optional ¶
- Type: string
- Default: PredefinedVariables.ciProjectDir
Path where to find the container image tarball.
DiveScanProps ¶
Initializer ¶
Properties ¶
Name | Type | Description |
---|---|---|
highestUserWastedPercent |
number |
Highest allowable percentage of bytes wasted (as a ratio between 0-1), otherwise CI validation will fail. |
highestWastedBytes |
number |
Highest allowable bytes wasted, otherwise CI validation will fail. |
ignoreErrors |
boolean |
Ignore image parsing errors and run the analysis anyway. |
imageName |
string |
Name of the container image to scan, if source is docker-archive argument gets prefix .tar . |
imagePath |
string |
Path to the image can be either a remote container registry, as well as a local path to an image. |
imageTag |
string |
The tag the image will be tagged with. |
jobName |
string |
The name of the Bootstrap job. |
jobStage |
string |
The stage of the Bootstrap job. |
lowestEfficiency |
number |
Lowest allowable image efficiency (as a ratio between 0-1), otherwise CI validation will fail. |
source |
string |
The container engine to fetch the image from. |
highestUserWastedPercent
Optional ¶
- Type: number
- Default: 0.1
Highest allowable percentage of bytes wasted (as a ratio between 0-1), otherwise CI validation will fail.
highestWastedBytes
Optional ¶
- Type: number
Highest allowable bytes wasted, otherwise CI validation will fail.
ignoreErrors
Optional ¶
- Type: boolean
- Default: false
Ignore image parsing errors and run the analysis anyway.
imageName
Optional ¶
- Type: string
- Default: PredefinedVariables.ciProjectName
Name of the container image to scan, if source
is docker-archive
argument gets prefix .tar
.
imagePath
Optional ¶
- Type: string
- Default: PredefinedVariables.ciProjectPath
Path to the image can be either a remote container registry, as well as a local path to an image.
imageTag
Optional ¶
- Type: string
- Default: PredefinedVariables.ciCommitTag
The tag the image will be tagged with.
jobName
Optional ¶
- Type: string
The name of the Bootstrap job.
jobStage
Optional ¶
- Type: string
The stage of the Bootstrap job.
lowestEfficiency
Optional ¶
- Type: number
- Default: 0.9
Lowest allowable image efficiency (as a ratio between 0-1), otherwise CI validation will fail.
source
Optional ¶
- Type: string
- Default: "docker-archive
The container engine to fetch the image from.
Allowed values: docker, podman, docker-archive
DockerBuildProps ¶
Initializer ¶
Properties ¶
Name | Type | Description |
---|---|---|
repository |
string |
The Docker repository name ([<registry>/]<image>) . |
context |
string |
The Docker build context (the directory containing the Dockerfile). |
jobName |
string |
The name of the Bootstrap job. |
jobStage |
string |
The stage of the Bootstrap job. |
tag |
string |
A Docker image tag applied to the image. |
repository
Required ¶
- Type: string
The Docker repository name ([<registry>/]<image>)
.
context
Optional ¶
- Type: string
- Default:
.
The Docker build context (the directory containing the Dockerfile).
jobName
Optional ¶
- Type: string
The name of the Bootstrap job.
jobStage
Optional ¶
- Type: string
The stage of the Bootstrap job.
tag
Optional ¶
- Type: string
A Docker image tag applied to the image.
If not set docker uses latest
DockerClientConfigProps ¶
Initializer ¶
Properties ¶
Name | Type | Description |
---|---|---|
configFilePath |
string |
Docker client config path. |
configFilePath
Optional ¶
- Type: string
- Default: $HOME/.docker/config.json
Docker client config path.
DockerPushProps ¶
Initializer ¶
Properties ¶
Name | Type | Description |
---|---|---|
containerImage |
string |
The name of the Docker image to push to the registry . |
jobName |
string |
The name of the Bootstrap job. |
jobStage |
string |
The stage of the Bootstrap job. |
loginEnvVar |
string |
If you have to login to the registry before the push, you have to provide the name of the environment variable, which contains the password or token, here. |
registry |
string |
The Docker registry the image should be pushed to. |
tag |
string |
The Docker image tag that should be pushed to the registry . |
userEnvVar |
string |
If you have to login to the registry before the push, you have to provide the name of the environment variable, which contains the username value, here. |
containerImage
Required ¶
- Type: string
The name of the Docker image to push to the registry
.
jobName
Optional ¶
- Type: string
The name of the Bootstrap job.
jobStage
Optional ¶
- Type: string
The stage of the Bootstrap job.
loginEnvVar
Optional ¶
- Type: string
If you have to login to the registry before the push, you have to provide the name of the environment variable, which contains the password or token, here.
DO NOT PROVIDE THE LOGIN VALUE ITSELF! This would be a security issue!
registry
Optional ¶
- Type: string
- Default: index.docker.io/v1
The Docker registry the image should be pushed to.
tag
Optional ¶
- Type: string
- Default:
latest
The Docker image tag that should be pushed to the registry
.
userEnvVar
Optional ¶
- Type: string
If you have to login to the registry before the push, you have to provide the name of the environment variable, which contains the username value, here.
DO NOT PROVIDE THE USERNAME VALUE ITSELF! This would be a security issue!
KanikoExecuteProps ¶
Initializer ¶
Properties ¶
Name | Type | Description |
---|---|---|
buildArgs |
{[ key: string ]: any} |
Container build arguments, used to instrument the container image build. |
buildTarget |
string |
For container multistage builds name of the build stage you want to create. |
context |
string |
Context which will be send to kaniko. |
dockerClientConfig |
DockerClientConfig |
Creates the Docker configuration file base on objects settings, to authenticate against given registries. |
dockerfile |
string |
Name of the dockerfile to use. |
enablePush |
boolean |
Enable push to container registry, disabled to allow subsequent jobs to. |
imageName |
string |
Image name which will be created. |
imageTag |
string |
The tag the image will be tagged with. |
jobName |
string |
The name of the Bootstrap job. |
jobStage |
string |
The stage of the Bootstrap job. |
registries |
string[] | Registry[] |
List of container registries to push created image to. |
tarPath |
string |
Container images created by kaniko are tarball files. |
verbosity |
string |
Verbosity of kaniko logging. |
buildArgs
Optional ¶
- Type: {[ key: string ]: any}
Container build arguments, used to instrument the container image build.
buildTarget
Optional ¶
- Type: string
For container multistage builds name of the build stage you want to create.
Image tag will be appended with the build_target. e.g. latest-buildtarget.
context
Optional ¶
- Type: string
Context which will be send to kaniko.
Defaults to None
which implies
the local directory is the context.
dockerClientConfig
Optional ¶
- Type: DockerClientConfig
Creates the Docker configuration file base on objects settings, to authenticate against given registries.
Defaults to a DockerClientConfig
with login to the official Docker Hub and expecting credentials given as
environment variables REGISTRY_USER
and REGISTRY_LOGIN
.
dockerfile
Optional ¶
- Type: string
- Default: "Dockerfile"
Name of the dockerfile to use.
File is relative to context.
enablePush
Optional ¶
- Type: boolean
- Default: false act on container tarball.
Enable push to container registry, disabled to allow subsequent jobs to.
imageName
Optional ¶
- Type: string
- Default: PredefinedVariables.CI_PROJECT_NAME.
Image name which will be created.
imageTag
Optional ¶
- Type: string
- Default: PredefinedVariables.CI_COMMIT_TAG
The tag the image will be tagged with.
jobName
Optional ¶
- Type: string
The name of the Bootstrap job.
jobStage
Optional ¶
- Type: string
The stage of the Bootstrap job.
registries
Optional ¶
- Type: string[] | Registry[]
List of container registries to push created image to.
tarPath
Optional ¶
- Type: string
Container images created by kaniko are tarball files.
This is the path where to store the image, will be named with suffix .tar
.
This path will be created if not present.
verbosity
Optional ¶
- Type: string
- Default: "info"
Verbosity of kaniko logging.
TrivyIgnoreFileCheckProps ¶
Initializer ¶
Properties ¶
Name | Type | Description |
---|---|---|
jobName |
string |
The name of the Bootstrap job. |
jobStage |
string |
The stage of the Bootstrap job. |
trivyignorePath |
string |
Path to the .trivyignore file. |
jobName
Optional ¶
- Type: string
The name of the Bootstrap job.
jobStage
Optional ¶
- Type: string
The stage of the Bootstrap job.
trivyignorePath
Optional ¶
- Type: string
- Default: PredefinedVariables.ciProjectDir/.trivyignore
Path to the .trivyignore
file.
TrivyScanLocalImageProps ¶
Initializer ¶
Properties ¶
Name | Type | Description |
---|---|---|
debug |
boolean |
If trivy should run in debug mode. |
exitIfVulnerable |
boolean |
Exit code when vulnerabilities were found. |
imageName |
string |
Container image name, searched for in imagePath and gets .tar appended. |
imagePath |
string |
Path where to find the container image. |
imageTag |
string |
The tag the image will be tagged with. |
jobName |
string |
The name of the Bootstrap job. |
jobStage |
string |
The stage of the Bootstrap job. |
outputFormat |
string |
Scan output format, possible values (table, json). |
severity |
string |
Severities of vulnerabilities to be displayed (comma separated). |
trivyConfig |
string |
Additional options to pass to trivy binary. |
vulnerabilityTypes |
string |
List of vulnerability types (comma separated). |
debug
Optional ¶
- Type: boolean
- Default: false
If trivy should run in debug mode.
exitIfVulnerable
Optional ¶
- Type: boolean
- Default: true
Exit code when vulnerabilities were found.
If true exit code is 1 else 0.
imageName
Optional ¶
- Type: string
- Default: PredefinedVariables.CI_PROJECT_NAME
Container image name, searched for in imagePath
and gets .tar
appended.
imagePath
Optional ¶
- Type: string
- Default: PredefinedVariables.CI_PROJECT_DIR
Path where to find the container image.
imageTag
Optional ¶
- Type: string
- Default: PredefinedVariables.CI_COMMIT_TAG
The tag the image will be tagged with.
jobName
Optional ¶
- Type: string
The name of the Bootstrap job.
jobStage
Optional ¶
- Type: string
The stage of the Bootstrap job.
outputFormat
Optional ¶
- Type: string
- Default: "table"
Scan output format, possible values (table, json).
severity
Optional ¶
- Type: string
- Default: "UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL"
Severities of vulnerabilities to be displayed (comma separated).
trivyConfig
Optional ¶
- Type: string
Additional options to pass to trivy
binary.
vulnerabilityTypes
Optional ¶
- Type: string
- Default: "os,library"
List of vulnerability types (comma separated).
Classes ¶
BuildContainerCollection ¶
- Implements: IBuildContainerCollection
Creates a gcip.Sequence
to build, scan and push a container image.
The build step is executed by KanikoExecute
, it will build the container
image an outputs it to a tarball. There are two scan's, optimization scan
with DiveScan
to scan storage wasting in container image and a
vulnerability scan with TrivyScanLocalImage
. Both outputs are uploaded
as an artifact to the GitLab instance. The container image is uploaded
with CranePush
.
Initializers ¶
Name | Type | Description |
---|---|---|
props |
BuildContainerCollectionProps |
No description. |
props
Required ¶
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: @gcix/gcix.AddChildrenProps
addDependencies
¶
dependencies
Required ¶
- Type: @gcix/gcix.Job | @gcix/gcix.JobCollection | @gcix/gcix.Need[]
addNeeds
¶
needs
Required ¶
- Type: @gcix/gcix.Job | @gcix/gcix.JobCollection | @gcix/gcix.Need[]
addParent
¶
parent
Required ¶
- Type: @gcix/gcix.JobCollection
addTags
¶
tags
Required ¶
- Type: string[]
addVariables
¶
variables
Required ¶
- Type: {[ key: string ]: string}
appendRules
¶
rules
Required ¶
- Type: @gcix/gcix.Rule[]
appendScripts
¶
scripts
Required ¶
- Type: string[]
assignArtifacts
¶
artifacts
Required ¶
- Type: @gcix/gcix.Artifacts
assignCache
¶
cache
Required ¶
- Type: @gcix/gcix.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: @gcix/gcix.Job | @gcix/gcix.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: @gcix/gcix.Artifacts
initializeCache
¶
Calling gcix.Job.assigneCache()
to all jobs within this JobCollection that haven't been set the cache before.
cache
Required ¶
- Type: @gcix/gcix.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: @gcix/gcix.Job | @gcix/gcix.JobCollection | @gcix/gcix.Need[]
initializeImage
¶
Calling gcix.Job.assignImage()
to all jobs within this JobCollection.
image
Required ¶
- Type: string | @gcix/gcix.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: @gcix/gcix.Job | @gcix/gcix.JobCollection | @gcix/gcix.Need[]
initializeRules
¶
Calling gcix.Job.append_rules()
to all jobs within this JobCollection that haven't been added rules before.
rules
Required ¶
- Type: @gcix/gcix.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: @gcix/gcix.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: @gcix/gcix.Job | @gcix/gcix.JobCollection | @gcix/gcix.Need[]
overrideImage
¶
Calling gcix.Job.assignImage()
to all jobs within this JobCollection overriding any previous set value.
image
Required ¶
- Type: string | @gcix/gcix.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: @gcix/gcix.Job | @gcix/gcix.JobCollection | @gcix/gcix.Need[]
overrideRules
¶
Calling gcix.Job.overrideRules()
to all jobs within this JobCollection and overriding any previously added rules to that jobs.
rules
Required ¶
- Type: @gcix/gcix.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: @gcix/gcix.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 |
@gcix/gcix.Job[] |
This property returns all Jobs from the last stage of this JobCollection. |
nestedJobs |
@gcix/gcix.Job[] |
No description. |
populatedJobs |
@gcix/gcix.Job[] |
Returns a list with populated copies of all nested jobs of this JobCollection. |
children |
@gcix/gcix.ChildDict[] |
No description. |
orderedTags |
@gcix/gcix.OrderedStringSet |
No description. |
orderedTagsForInitialization |
@gcix/gcix.OrderedStringSet |
No description. |
orderedTagsForReplacement |
@gcix/gcix.OrderedStringSet |
No description. |
parents |
@gcix/gcix.Job | @gcix/gcix.JobCollection[] |
No description. |
allowFailureForInitialization |
string | boolean | number[] |
No description. |
allowFailureForReplacement |
string | boolean | number[] |
No description. |
artifacts |
@gcix/gcix.Artifacts |
No description. |
artifactsForInitialization |
@gcix/gcix.Artifacts |
No description. |
artifactsForReplacement |
@gcix/gcix.Artifacts |
No description. |
cache |
@gcix/gcix.Cache |
No description. |
cacheForInitialization |
@gcix/gcix.Cache |
No description. |
dependencies |
@gcix/gcix.Job | @gcix/gcix.JobCollection | @gcix/gcix.Need[] |
No description. |
dependenciesForInitialization |
@gcix/gcix.Job | @gcix/gcix.JobCollection | @gcix/gcix.Need[] |
No description. |
dependenciesForReplacement |
@gcix/gcix.Job | @gcix/gcix.JobCollection | @gcix/gcix.Need[] |
No description. |
imageForInitialization |
string | @gcix/gcix.Image |
No description. |
imageForReplacement |
string | @gcix/gcix.Image |
No description. |
needs |
@gcix/gcix.Job | @gcix/gcix.JobCollection | @gcix/gcix.Need[] |
No description. |
needsForInitialization |
@gcix/gcix.Job | @gcix/gcix.JobCollection | @gcix/gcix.Need[] |
No description. |
needsForReplacement |
@gcix/gcix.Job | @gcix/gcix.JobCollection | @gcix/gcix.Need[] |
No description. |
rulesForInitialization |
@gcix/gcix.Rule[] |
No description. |
rulesForReplacement |
@gcix/gcix.Rule[] |
No description. |
rulesToAppend |
@gcix/gcix.Rule[] |
No description. |
rulesToPrepend |
@gcix/gcix.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. |
cranePushJob |
CranePush |
Crane push job. |
diveScanJob |
DiveScan |
Dive scan job. |
dockerClientConfig |
DockerClientConfig |
Creates the Docker configuration file base on objects settings, to authenticate against given registries. |
doCranePush |
boolean |
Set to false to skip the Crane push job. |
doDiveScan |
boolean |
Set to false to skip the Dive scan job. |
doTrivyignoreCheck |
boolean |
Set to false to skip the existance check of the .trivyignore file. |
doTrivyScan |
boolean |
Set to false to skip the Trivy scan job. |
imageName |
string |
Image name with stage in the registry. |
imageTag |
string |
Image tag. |
kanikoExecuteJob |
KanikoExecute |
Kaniko execute job. |
registry |
string | Registry |
Container registry to push the image to. |
trivyIgnoreFileCheckJob |
TrivyIgnoreFileCheck |
Trivy ignore file check job. |
trivyScanLocalImageJob |
TrivyScanLocalImage |
Trivy scan local image job. |
lastJobsExecuted
Required ¶
- Type: @gcix/gcix.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: @gcix/gcix.Job[]
populatedJobs
Required ¶
- Type: @gcix/gcix.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: @gcix/gcix.ChildDict[]
orderedTags
Required ¶
- Type: @gcix/gcix.OrderedStringSet
orderedTagsForInitialization
Required ¶
- Type: @gcix/gcix.OrderedStringSet
orderedTagsForReplacement
Required ¶
- Type: @gcix/gcix.OrderedStringSet
parents
Required ¶
- Type: @gcix/gcix.Job | @gcix/gcix.JobCollection[]
allowFailureForInitialization
Optional ¶
- Type: string | boolean | number[]
allowFailureForReplacement
Optional ¶
- Type: string | boolean | number[]
artifacts
Optional ¶
- Type: @gcix/gcix.Artifacts
artifactsForInitialization
Optional ¶
- Type: @gcix/gcix.Artifacts
artifactsForReplacement
Optional ¶
- Type: @gcix/gcix.Artifacts
cache
Optional ¶
- Type: @gcix/gcix.Cache
cacheForInitialization
Optional ¶
- Type: @gcix/gcix.Cache
dependencies
Optional ¶
- Type: @gcix/gcix.Job | @gcix/gcix.JobCollection | @gcix/gcix.Need[]
dependenciesForInitialization
Optional ¶
- Type: @gcix/gcix.Job | @gcix/gcix.JobCollection | @gcix/gcix.Need[]
dependenciesForReplacement
Optional ¶
- Type: @gcix/gcix.Job | @gcix/gcix.JobCollection | @gcix/gcix.Need[]
imageForInitialization
Optional ¶
- Type: string | @gcix/gcix.Image
imageForReplacement
Optional ¶
- Type: string | @gcix/gcix.Image
needs
Optional ¶
- Type: @gcix/gcix.Job | @gcix/gcix.JobCollection | @gcix/gcix.Need[]
needsForInitialization
Optional ¶
- Type: @gcix/gcix.Job | @gcix/gcix.JobCollection | @gcix/gcix.Need[]
needsForReplacement
Optional ¶
- Type: @gcix/gcix.Job | @gcix/gcix.JobCollection | @gcix/gcix.Need[]
rulesForInitialization
Optional ¶
- Type: @gcix/gcix.Rule[]
rulesForReplacement
Optional ¶
- Type: @gcix/gcix.Rule[]
rulesToAppend
Optional ¶
- Type: @gcix/gcix.Rule[]
rulesToPrepend
Optional ¶
- Type: @gcix/gcix.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}
cranePushJob
Required ¶
- Type: CranePush
Crane push job.
diveScanJob
Required ¶
- Type: DiveScan
Dive scan job.
dockerClientConfig
Required ¶
- Type: DockerClientConfig
Creates the Docker configuration file base on objects settings, to authenticate against given registries.
doCranePush
Required ¶
- Type: boolean
Set to false
to skip the Crane push job.
doDiveScan
Required ¶
- Type: boolean
Set to false
to skip the Dive scan job.
doTrivyignoreCheck
Required ¶
- Type: boolean
Set to false
to skip the existance check of the .trivyignore
file.
doTrivyScan
Required ¶
- Type: boolean
Set to false
to skip the Trivy scan job.
imageName
Required ¶
- Type: string
Image name with stage in the registry.
e.g. username/imageName.
imageTag
Required ¶
- Type: string
Image tag.
Depending of the build it defaults either to the git tag or to the actual branch name.
kanikoExecuteJob
Required ¶
- Type: KanikoExecute
Kaniko execute job.
registry
Required ¶
- Type: string | Registry
Container registry to push the image to.
If the container registry
needs authentication, you have to provide a DockerClientConfig
object
with credentials.
trivyIgnoreFileCheckJob
Required ¶
- Type: TrivyIgnoreFileCheck
Trivy ignore file check job.
trivyScanLocalImageJob
Required ¶
- Type: TrivyScanLocalImage
Trivy scan local image job.
BuildGitlabContainerCollection ¶
BuildGitlabContainerCollection class.
Orchestrates a GitLab-specific CI/CD pipeline for building, scanning, and pushing container images. Extends the BuildContainerCollection class. Handles GitLab-specific configurations, such as image name, registry, and Docker client authentication.
Initializers ¶
Name | Type | Description |
---|---|---|
props |
BuildContainerCollectionProps |
- Configuration properties for the collection. |
props
Required ¶
Configuration properties for the collection.
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: @gcix/gcix.AddChildrenProps
addDependencies
¶
dependencies
Required ¶
- Type: @gcix/gcix.Job | @gcix/gcix.JobCollection | @gcix/gcix.Need[]
addNeeds
¶
needs
Required ¶
- Type: @gcix/gcix.Job | @gcix/gcix.JobCollection | @gcix/gcix.Need[]
addParent
¶
parent
Required ¶
- Type: @gcix/gcix.JobCollection
addTags
¶
tags
Required ¶
- Type: string[]
addVariables
¶
variables
Required ¶
- Type: {[ key: string ]: string}
appendRules
¶
rules
Required ¶
- Type: @gcix/gcix.Rule[]
appendScripts
¶
scripts
Required ¶
- Type: string[]
assignArtifacts
¶
artifacts
Required ¶
- Type: @gcix/gcix.Artifacts
assignCache
¶
cache
Required ¶
- Type: @gcix/gcix.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: @gcix/gcix.Job | @gcix/gcix.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: @gcix/gcix.Artifacts
initializeCache
¶
Calling gcix.Job.assigneCache()
to all jobs within this JobCollection that haven't been set the cache before.
cache
Required ¶
- Type: @gcix/gcix.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: @gcix/gcix.Job | @gcix/gcix.JobCollection | @gcix/gcix.Need[]
initializeImage
¶
Calling gcix.Job.assignImage()
to all jobs within this JobCollection.
image
Required ¶
- Type: string | @gcix/gcix.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: @gcix/gcix.Job | @gcix/gcix.JobCollection | @gcix/gcix.Need[]
initializeRules
¶
Calling gcix.Job.append_rules()
to all jobs within this JobCollection that haven't been added rules before.
rules
Required ¶
- Type: @gcix/gcix.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: @gcix/gcix.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: @gcix/gcix.Job | @gcix/gcix.JobCollection | @gcix/gcix.Need[]
overrideImage
¶
Calling gcix.Job.assignImage()
to all jobs within this JobCollection overriding any previous set value.
image
Required ¶
- Type: string | @gcix/gcix.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: @gcix/gcix.Job | @gcix/gcix.JobCollection | @gcix/gcix.Need[]
overrideRules
¶
Calling gcix.Job.overrideRules()
to all jobs within this JobCollection and overriding any previously added rules to that jobs.
rules
Required ¶
- Type: @gcix/gcix.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: @gcix/gcix.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 |
@gcix/gcix.Job[] |
This property returns all Jobs from the last stage of this JobCollection. |
nestedJobs |
@gcix/gcix.Job[] |
No description. |
populatedJobs |
@gcix/gcix.Job[] |
Returns a list with populated copies of all nested jobs of this JobCollection. |
children |
@gcix/gcix.ChildDict[] |
No description. |
orderedTags |
@gcix/gcix.OrderedStringSet |
No description. |
orderedTagsForInitialization |
@gcix/gcix.OrderedStringSet |
No description. |
orderedTagsForReplacement |
@gcix/gcix.OrderedStringSet |
No description. |
parents |
@gcix/gcix.Job | @gcix/gcix.JobCollection[] |
No description. |
allowFailureForInitialization |
string | boolean | number[] |
No description. |
allowFailureForReplacement |
string | boolean | number[] |
No description. |
artifacts |
@gcix/gcix.Artifacts |
No description. |
artifactsForInitialization |
@gcix/gcix.Artifacts |
No description. |
artifactsForReplacement |
@gcix/gcix.Artifacts |
No description. |
cache |
@gcix/gcix.Cache |
No description. |
cacheForInitialization |
@gcix/gcix.Cache |
No description. |
dependencies |
@gcix/gcix.Job | @gcix/gcix.JobCollection | @gcix/gcix.Need[] |
No description. |
dependenciesForInitialization |
@gcix/gcix.Job | @gcix/gcix.JobCollection | @gcix/gcix.Need[] |
No description. |
dependenciesForReplacement |
@gcix/gcix.Job | @gcix/gcix.JobCollection | @gcix/gcix.Need[] |
No description. |
imageForInitialization |
string | @gcix/gcix.Image |
No description. |
imageForReplacement |
string | @gcix/gcix.Image |
No description. |
needs |
@gcix/gcix.Job | @gcix/gcix.JobCollection | @gcix/gcix.Need[] |
No description. |
needsForInitialization |
@gcix/gcix.Job | @gcix/gcix.JobCollection | @gcix/gcix.Need[] |
No description. |
needsForReplacement |
@gcix/gcix.Job | @gcix/gcix.JobCollection | @gcix/gcix.Need[] |
No description. |
rulesForInitialization |
@gcix/gcix.Rule[] |
No description. |
rulesForReplacement |
@gcix/gcix.Rule[] |
No description. |
rulesToAppend |
@gcix/gcix.Rule[] |
No description. |
rulesToPrepend |
@gcix/gcix.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. |
cranePushJob |
CranePush |
Crane push job. |
diveScanJob |
DiveScan |
Dive scan job. |
dockerClientConfig |
DockerClientConfig |
Creates the Docker configuration file base on objects settings, to authenticate against given registries. |
doCranePush |
boolean |
Set to false to skip the Crane push job. |
doDiveScan |
boolean |
Set to false to skip the Dive scan job. |
doTrivyignoreCheck |
boolean |
Set to false to skip the existance check of the .trivyignore file. |
doTrivyScan |
boolean |
Set to false to skip the Trivy scan job. |
imageName |
string |
Image name with stage in the registry. |
imageTag |
string |
Image tag. |
kanikoExecuteJob |
KanikoExecute |
Kaniko execute job. |
registry |
string | Registry |
Container registry to push the image to. |
trivyIgnoreFileCheckJob |
TrivyIgnoreFileCheck |
Trivy ignore file check job. |
trivyScanLocalImageJob |
TrivyScanLocalImage |
Trivy scan local image job. |
lastJobsExecuted
Required ¶
- Type: @gcix/gcix.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: @gcix/gcix.Job[]
populatedJobs
Required ¶
- Type: @gcix/gcix.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: @gcix/gcix.ChildDict[]
orderedTags
Required ¶
- Type: @gcix/gcix.OrderedStringSet
orderedTagsForInitialization
Required ¶
- Type: @gcix/gcix.OrderedStringSet
orderedTagsForReplacement
Required ¶
- Type: @gcix/gcix.OrderedStringSet
parents
Required ¶
- Type: @gcix/gcix.Job | @gcix/gcix.JobCollection[]
allowFailureForInitialization
Optional ¶
- Type: string | boolean | number[]
allowFailureForReplacement
Optional ¶
- Type: string | boolean | number[]
artifacts
Optional ¶
- Type: @gcix/gcix.Artifacts
artifactsForInitialization
Optional ¶
- Type: @gcix/gcix.Artifacts
artifactsForReplacement
Optional ¶
- Type: @gcix/gcix.Artifacts
cache
Optional ¶
- Type: @gcix/gcix.Cache
cacheForInitialization
Optional ¶
- Type: @gcix/gcix.Cache
dependencies
Optional ¶
- Type: @gcix/gcix.Job | @gcix/gcix.JobCollection | @gcix/gcix.Need[]
dependenciesForInitialization
Optional ¶
- Type: @gcix/gcix.Job | @gcix/gcix.JobCollection | @gcix/gcix.Need[]
dependenciesForReplacement
Optional ¶
- Type: @gcix/gcix.Job | @gcix/gcix.JobCollection | @gcix/gcix.Need[]
imageForInitialization
Optional ¶
- Type: string | @gcix/gcix.Image
imageForReplacement
Optional ¶
- Type: string | @gcix/gcix.Image
needs
Optional ¶
- Type: @gcix/gcix.Job | @gcix/gcix.JobCollection | @gcix/gcix.Need[]
needsForInitialization
Optional ¶
- Type: @gcix/gcix.Job | @gcix/gcix.JobCollection | @gcix/gcix.Need[]
needsForReplacement
Optional ¶
- Type: @gcix/gcix.Job | @gcix/gcix.JobCollection | @gcix/gcix.Need[]
rulesForInitialization
Optional ¶
- Type: @gcix/gcix.Rule[]
rulesForReplacement
Optional ¶
- Type: @gcix/gcix.Rule[]
rulesToAppend
Optional ¶
- Type: @gcix/gcix.Rule[]
rulesToPrepend
Optional ¶
- Type: @gcix/gcix.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}
cranePushJob
Required ¶
- Type: CranePush
Crane push job.
diveScanJob
Required ¶
- Type: DiveScan
Dive scan job.
dockerClientConfig
Required ¶
- Type: DockerClientConfig
Creates the Docker configuration file base on objects settings, to authenticate against given registries.
doCranePush
Required ¶
- Type: boolean
Set to false
to skip the Crane push job.
doDiveScan
Required ¶
- Type: boolean
Set to false
to skip the Dive scan job.
doTrivyignoreCheck
Required ¶
- Type: boolean
Set to false
to skip the existance check of the .trivyignore
file.
doTrivyScan
Required ¶
- Type: boolean
Set to false
to skip the Trivy scan job.
imageName
Required ¶
- Type: string
Image name with stage in the registry.
e.g. username/imageName.
imageTag
Required ¶
- Type: string
Image tag.
Depending of the build it defaults either to the git tag or to the actual branch name.
kanikoExecuteJob
Required ¶
- Type: KanikoExecute
Kaniko execute job.
registry
Required ¶
- Type: string | Registry
Container registry to push the image to.
If the container registry
needs authentication, you have to provide a DockerClientConfig
object
with credentials.
trivyIgnoreFileCheckJob
Required ¶
- Type: TrivyIgnoreFileCheck
Trivy ignore file check job.
trivyScanLocalImageJob
Required ¶
- Type: TrivyScanLocalImage
Trivy scan local image job.
CopyContainerCollection ¶
- Implements: ICopyContainerCollection
Creates a gcip.Sequence
to pull, scan and push a container image.
The pull step is executed by CranePull
, it will pull the container image
and outputs it to a tarball. There are two scan's, optimization scan with
DiveScan
to scan storage wasting in container image and a vulnerability
scan with TrivyScanLocalImage
. Both outputs are uploaded as an artifact
to the GitLab instance. Built container image is uploaded with CranePush
.
NOTE: We decided to use caches instead of artifacts to pass the Docker image tar archive from one job to another. This is because those tar archives could become very large - especially larger then the maximum artifact size limit. This limit can just be adjusted by the admin of the gitlab instance, so your pipeline would never work, your Gitlab provider would not adjust this limit for you. For caches on the other hand you can define storage backends at the base of your Gitlab runners.
Furthermore we set the cache key to the pipeline ID. This is because the name and tag of the image does not ensure that the downloaded tar is unique, as the image behind the image tag could be overridden. So we ensure uniqueness by downloading the image once per pipeline.
Initializers ¶
Name | Type | Description |
---|---|---|
props |
CopyContainerCollectionProps |
No description. |
props
Required ¶
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: @gcix/gcix.AddChildrenProps
addDependencies
¶
dependencies
Required ¶
- Type: @gcix/gcix.Job | @gcix/gcix.JobCollection | @gcix/gcix.Need[]
addNeeds
¶
needs
Required ¶
- Type: @gcix/gcix.Job | @gcix/gcix.JobCollection | @gcix/gcix.Need[]
addParent
¶
parent
Required ¶
- Type: @gcix/gcix.JobCollection
addTags
¶
tags
Required ¶
- Type: string[]
addVariables
¶
variables
Required ¶
- Type: {[ key: string ]: string}
appendRules
¶
rules
Required ¶
- Type: @gcix/gcix.Rule[]
appendScripts
¶
scripts
Required ¶
- Type: string[]
assignArtifacts
¶
artifacts
Required ¶
- Type: @gcix/gcix.Artifacts
assignCache
¶
cache
Required ¶
- Type: @gcix/gcix.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: @gcix/gcix.Job | @gcix/gcix.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: @gcix/gcix.Artifacts
initializeCache
¶
Calling gcix.Job.assigneCache()
to all jobs within this JobCollection that haven't been set the cache before.
cache
Required ¶
- Type: @gcix/gcix.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: @gcix/gcix.Job | @gcix/gcix.JobCollection | @gcix/gcix.Need[]
initializeImage
¶
Calling gcix.Job.assignImage()
to all jobs within this JobCollection.
image
Required ¶
- Type: string | @gcix/gcix.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: @gcix/gcix.Job | @gcix/gcix.JobCollection | @gcix/gcix.Need[]
initializeRules
¶
Calling gcix.Job.append_rules()
to all jobs within this JobCollection that haven't been added rules before.
rules
Required ¶
- Type: @gcix/gcix.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: @gcix/gcix.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: @gcix/gcix.Job | @gcix/gcix.JobCollection | @gcix/gcix.Need[]
overrideImage
¶
Calling gcix.Job.assignImage()
to all jobs within this JobCollection overriding any previous set value.
image
Required ¶
- Type: string | @gcix/gcix.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: @gcix/gcix.Job | @gcix/gcix.JobCollection | @gcix/gcix.Need[]
overrideRules
¶
Calling gcix.Job.overrideRules()
to all jobs within this JobCollection and overriding any previously added rules to that jobs.
rules
Required ¶
- Type: @gcix/gcix.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: @gcix/gcix.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 |
@gcix/gcix.Job[] |
This property returns all Jobs from the last stage of this JobCollection. |
nestedJobs |
@gcix/gcix.Job[] |
No description. |
populatedJobs |
@gcix/gcix.Job[] |
Returns a list with populated copies of all nested jobs of this JobCollection. |
children |
@gcix/gcix.ChildDict[] |
No description. |
orderedTags |
@gcix/gcix.OrderedStringSet |
No description. |
orderedTagsForInitialization |
@gcix/gcix.OrderedStringSet |
No description. |
orderedTagsForReplacement |
@gcix/gcix.OrderedStringSet |
No description. |
parents |
@gcix/gcix.Job | @gcix/gcix.JobCollection[] |
No description. |
allowFailureForInitialization |
string | boolean | number[] |
No description. |
allowFailureForReplacement |
string | boolean | number[] |
No description. |
artifacts |
@gcix/gcix.Artifacts |
No description. |
artifactsForInitialization |
@gcix/gcix.Artifacts |
No description. |
artifactsForReplacement |
@gcix/gcix.Artifacts |
No description. |
cache |
@gcix/gcix.Cache |
No description. |
cacheForInitialization |
@gcix/gcix.Cache |
No description. |
dependencies |
@gcix/gcix.Job | @gcix/gcix.JobCollection | @gcix/gcix.Need[] |
No description. |
dependenciesForInitialization |
@gcix/gcix.Job | @gcix/gcix.JobCollection | @gcix/gcix.Need[] |
No description. |
dependenciesForReplacement |
@gcix/gcix.Job | @gcix/gcix.JobCollection | @gcix/gcix.Need[] |
No description. |
imageForInitialization |
string | @gcix/gcix.Image |
No description. |
imageForReplacement |
string | @gcix/gcix.Image |
No description. |
needs |
@gcix/gcix.Job | @gcix/gcix.JobCollection | @gcix/gcix.Need[] |
No description. |
needsForInitialization |
@gcix/gcix.Job | @gcix/gcix.JobCollection | @gcix/gcix.Need[] |
No description. |
needsForReplacement |
@gcix/gcix.Job | @gcix/gcix.JobCollection | @gcix/gcix.Need[] |
No description. |
rulesForInitialization |
@gcix/gcix.Rule[] |
No description. |
rulesForReplacement |
@gcix/gcix.Rule[] |
No description. |
rulesToAppend |
@gcix/gcix.Rule[] |
No description. |
rulesToPrepend |
@gcix/gcix.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. |
cranePullJob |
CranePull |
CranPull job. |
cranePushJob |
CranePush |
No description. |
dockerClientConfig |
DockerClientConfig |
Creates the Docker configuration file base on objects settings, to authenticate against given registries. |
doDiveScan |
boolean |
Set to false to skip the Dive scan job. |
doTrivyignoreCheck |
boolean |
Set to false to skip the existance check of the .trivyignore file. |
doTrivyScan |
boolean |
Set to false to skip the Trivy scan job. |
dstRegistry |
string | Registry |
Container registry to push the image to. |
imageName |
string |
Image name with stage in the registry. |
imageTag |
string |
Container image tag to pull from srcRegistry and push to dstRegistry . |
srcRegistry |
string | Registry |
Container registry to pull the image from. |
diveScanJob |
DiveScan |
Dive scan job. |
trivyIgnoreFileCheckJob |
TrivyIgnoreFileCheck |
Trivy ignore file check job. |
trivyScanLocalImageJob |
TrivyScanLocalImage |
Trivy scan local image job. |
lastJobsExecuted
Required ¶
- Type: @gcix/gcix.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: @gcix/gcix.Job[]
populatedJobs
Required ¶
- Type: @gcix/gcix.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: @gcix/gcix.ChildDict[]
orderedTags
Required ¶
- Type: @gcix/gcix.OrderedStringSet
orderedTagsForInitialization
Required ¶
- Type: @gcix/gcix.OrderedStringSet
orderedTagsForReplacement
Required ¶
- Type: @gcix/gcix.OrderedStringSet
parents
Required ¶
- Type: @gcix/gcix.Job | @gcix/gcix.JobCollection[]
allowFailureForInitialization
Optional ¶
- Type: string | boolean | number[]
allowFailureForReplacement
Optional ¶
- Type: string | boolean | number[]
artifacts
Optional ¶
- Type: @gcix/gcix.Artifacts
artifactsForInitialization
Optional ¶
- Type: @gcix/gcix.Artifacts
artifactsForReplacement
Optional ¶
- Type: @gcix/gcix.Artifacts
cache
Optional ¶
- Type: @gcix/gcix.Cache
cacheForInitialization
Optional ¶
- Type: @gcix/gcix.Cache
dependencies
Optional ¶
- Type: @gcix/gcix.Job | @gcix/gcix.JobCollection | @gcix/gcix.Need[]
dependenciesForInitialization
Optional ¶
- Type: @gcix/gcix.Job | @gcix/gcix.JobCollection | @gcix/gcix.Need[]
dependenciesForReplacement
Optional ¶
- Type: @gcix/gcix.Job | @gcix/gcix.JobCollection | @gcix/gcix.Need[]
imageForInitialization
Optional ¶
- Type: string | @gcix/gcix.Image
imageForReplacement
Optional ¶
- Type: string | @gcix/gcix.Image
needs
Optional ¶
- Type: @gcix/gcix.Job | @gcix/gcix.JobCollection | @gcix/gcix.Need[]
needsForInitialization
Optional ¶
- Type: @gcix/gcix.Job | @gcix/gcix.JobCollection | @gcix/gcix.Need[]
needsForReplacement
Optional ¶
- Type: @gcix/gcix.Job | @gcix/gcix.JobCollection | @gcix/gcix.Need[]
rulesForInitialization
Optional ¶
- Type: @gcix/gcix.Rule[]
rulesForReplacement
Optional ¶
- Type: @gcix/gcix.Rule[]
rulesToAppend
Optional ¶
- Type: @gcix/gcix.Rule[]
rulesToPrepend
Optional ¶
- Type: @gcix/gcix.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}
cranePullJob
Required ¶
- Type: CranePull
CranPull job.
cranePushJob
Required ¶
- Type: CranePush
dockerClientConfig
Required ¶
- Type: DockerClientConfig
Creates the Docker configuration file base on objects settings, to authenticate against given registries.
doDiveScan
Required ¶
- Type: boolean
Set to false
to skip the Dive scan job.
doTrivyignoreCheck
Required ¶
- Type: boolean
Set to false
to skip the existance check of the .trivyignore
file.
doTrivyScan
Required ¶
- Type: boolean
Set to false
to skip the Trivy scan job.
dstRegistry
Required ¶
- Type: string | Registry
Container registry to push the image to.
If the container registry needs
authentication, you have to provide a DockerClientConfig
object with
credentials.
imageName
Required ¶
- Type: string
Image name with stage in the registry.
e.g. username/image_name.
imageTag
Required ¶
- Type: string
Container image tag to pull from srcRegistry
and push to dstRegistry
.
srcRegistry
Required ¶
- Type: string | Registry
Container registry to pull the image from.
If the container registry needs
authentication, you have to provide a DockerClientConfig
object with
credentials.
diveScanJob
Optional ¶
- Type: DiveScan
Dive scan job.
trivyIgnoreFileCheckJob
Optional ¶
- Type: TrivyIgnoreFileCheck
Trivy ignore file check job.
trivyScanLocalImageJob
Optional ¶
- Type: TrivyScanLocalImage
Trivy scan local image job.
CraneCopy ¶
- Implements: ICraneCopy
Creates a job to copy container images with crane
. See crane
.
Copying an image is useful, if you want to have container images as close as possible to your cluster or servers.
This subclass of Job
will configure following defaults for the superclass:
- name: crane-copy
- stage: deploy
- image: PredefinedImages.CRANE
Initializers ¶
Name | Type | Description |
---|---|---|
props |
CraneCopyProps |
No description. |
props
Required ¶
- Type: CraneCopyProps
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: @gcix/gcix.Job | @gcix/gcix.JobCollection | @gcix/gcix.Need[]
addNeeds
¶
needs
Required ¶
- Type: @gcix/gcix.Job | @gcix/gcix.JobCollection | @gcix/gcix.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: @gcix/gcix.Job | @gcix/gcix.JobCollection
addTags
¶
tags
Required ¶
- Type: string[]
addVariables
¶
variables
Required ¶
- Type: {[ key: string ]: string}
appendRules
¶
rules
Required ¶
- Type: @gcix/gcix.Rule[]
appendScripts
¶
scripts
Required ¶
- Type: string[]
assignAllowFailure
¶
allowFailure
Required ¶
- Type: boolean | number[]
assignArtifacts
¶
artifacts
Required ¶
- Type: @gcix/gcix.Artifacts
assignCache
¶
cache
Required ¶
- Type: @gcix/gcix.Cache
assignDependencies
¶
dependencies
Required ¶
- Type: @gcix/gcix.Job | @gcix/gcix.JobCollection | @gcix/gcix.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 | @gcix/gcix.Image
assignNeeds
¶
needs
Required ¶
- Type: @gcix/gcix.Job | @gcix/gcix.JobCollection | @gcix/gcix.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: @gcix/gcix.Job | @gcix/gcix.JobCollection
isEqual
¶
isEqual
checks if this
object is equal to given object.
comparable
Required ¶
- Type: @gcix/gcix.IBase
prependRules
¶
rules
Required ¶
- Type: @gcix/gcix.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 |
@gcix/gcix.OrderedStringSet |
No description. |
parents |
@gcix/gcix.Job | @gcix/gcix.JobCollection[] |
No description. |
scripts |
string[] |
No description. |
stage |
string |
No description. |
artifacts |
@gcix/gcix.Artifacts |
No description. |
cache |
@gcix/gcix.Cache |
No description. |
dependencies |
@gcix/gcix.Job | @gcix/gcix.JobCollection | @gcix/gcix.Need[] |
No description. |
image |
@gcix/gcix.Image |
No description. |
needs |
@gcix/gcix.Job | @gcix/gcix.JobCollection | @gcix/gcix.Need[] |
No description. |
original |
@gcix/gcix.Job |
No description. |
rules |
@gcix/gcix.Rule[] |
No description. |
variables |
{[ key: string ]: string} |
No description. |
dstRegistry |
string | Registry |
Registry URL to copy container image to. |
srcRegistry |
string | Registry |
Registry URL to copy container image from. |
dockerClientConfig |
DockerClientConfig |
Creates the Docker configuration file base on objects settings, used by crane to authenticate against given registries. |
tags
Required ¶
- Type: string[]
Getter method to receive added tags.
allowFailure
Required ¶
- Type: string | boolean | number[]
name
Required ¶
- Type: string
orderedTags
Required ¶
- Type: @gcix/gcix.OrderedStringSet
parents
Required ¶
- Type: @gcix/gcix.Job | @gcix/gcix.JobCollection[]
scripts
Required ¶
- Type: string[]
stage
Required ¶
- Type: string
artifacts
Optional ¶
- Type: @gcix/gcix.Artifacts
cache
Optional ¶
- Type: @gcix/gcix.Cache
dependencies
Optional ¶
- Type: @gcix/gcix.Job | @gcix/gcix.JobCollection | @gcix/gcix.Need[]
image
Optional ¶
- Type: @gcix/gcix.Image
needs
Optional ¶
- Type: @gcix/gcix.Job | @gcix/gcix.JobCollection | @gcix/gcix.Need[]
original
Optional ¶
- Type: @gcix/gcix.Job
rules
Optional ¶
- Type: @gcix/gcix.Rule[]
variables
Optional ¶
- Type: {[ key: string ]: string}
dstRegistry
Required ¶
- Type: string | Registry
Registry URL to copy container image to.
srcRegistry
Required ¶
- Type: string | Registry
Registry URL to copy container image from.
dockerClientConfig
Optional ¶
- Type: DockerClientConfig
Creates the Docker configuration file base on objects settings, used by crane to authenticate against given registries.
CranePull ¶
- Implements: ICranePull
Creates a job to pull container image from remote container registry with crane
.
This subclass of Job
will configure following defaults for the superclass:
- name: crane
- stage: pull
- image: PredefinedImages.CRANE
Initializers ¶
Name | Type | Description |
---|---|---|
props |
CranePullProps |
No description. |
props
Required ¶
- Type: CranePullProps
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: @gcix/gcix.Job | @gcix/gcix.JobCollection | @gcix/gcix.Need[]
addNeeds
¶
needs
Required ¶
- Type: @gcix/gcix.Job | @gcix/gcix.JobCollection | @gcix/gcix.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: @gcix/gcix.Job | @gcix/gcix.JobCollection
addTags
¶
tags
Required ¶
- Type: string[]
addVariables
¶
variables
Required ¶
- Type: {[ key: string ]: string}
appendRules
¶
rules
Required ¶
- Type: @gcix/gcix.Rule[]
appendScripts
¶
scripts
Required ¶
- Type: string[]
assignAllowFailure
¶
allowFailure
Required ¶
- Type: boolean | number[]
assignArtifacts
¶
artifacts
Required ¶
- Type: @gcix/gcix.Artifacts
assignCache
¶
cache
Required ¶
- Type: @gcix/gcix.Cache
assignDependencies
¶
dependencies
Required ¶
- Type: @gcix/gcix.Job | @gcix/gcix.JobCollection | @gcix/gcix.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 | @gcix/gcix.Image
assignNeeds
¶
needs
Required ¶
- Type: @gcix/gcix.Job | @gcix/gcix.JobCollection | @gcix/gcix.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: @gcix/gcix.Job | @gcix/gcix.JobCollection
isEqual
¶
isEqual
checks if this
object is equal to given object.
comparable
Required ¶
- Type: @gcix/gcix.IBase
prependRules
¶
rules
Required ¶
- Type: @gcix/gcix.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 |
@gcix/gcix.OrderedStringSet |
No description. |
parents |
@gcix/gcix.Job | @gcix/gcix.JobCollection[] |
No description. |
scripts |
string[] |
No description. |
stage |
string |
No description. |
artifacts |
@gcix/gcix.Artifacts |
No description. |
cache |
@gcix/gcix.Cache |
No description. |
dependencies |
@gcix/gcix.Job | @gcix/gcix.JobCollection | @gcix/gcix.Need[] |
No description. |
image |
@gcix/gcix.Image |
No description. |
needs |
@gcix/gcix.Job | @gcix/gcix.JobCollection | @gcix/gcix.Need[] |
No description. |
original |
@gcix/gcix.Job |
No description. |
rules |
@gcix/gcix.Rule[] |
No description. |
variables |
{[ key: string ]: string} |
No description. |
dockerClientConfig |
DockerClientConfig |
Creates the Docker configuration file base on objects settings, to authenticate against given registries. |
imageName |
string |
Container image with namespace to pull from srcRegistry . |
imageTag |
string |
Tag of the image which will be pulled. |
srcRegistry |
string | Registry |
Registry URL to pull container image from. |
tarPath |
string |
Path where to save the container image tarball. |
tags
Required ¶
- Type: string[]
Getter method to receive added tags.
allowFailure
Required ¶
- Type: string | boolean | number[]
name
Required ¶
- Type: string
orderedTags
Required ¶
- Type: @gcix/gcix.OrderedStringSet
parents
Required ¶
- Type: @gcix/gcix.Job | @gcix/gcix.JobCollection[]
scripts
Required ¶
- Type: string[]
stage
Required ¶
- Type: string
artifacts
Optional ¶
- Type: @gcix/gcix.Artifacts
cache
Optional ¶
- Type: @gcix/gcix.Cache
dependencies
Optional ¶
- Type: @gcix/gcix.Job | @gcix/gcix.JobCollection | @gcix/gcix.Need[]
image
Optional ¶
- Type: @gcix/gcix.Image
needs
Optional ¶
- Type: @gcix/gcix.Job | @gcix/gcix.JobCollection | @gcix/gcix.Need[]
original
Optional ¶
- Type: @gcix/gcix.Job
rules
Optional ¶
- Type: @gcix/gcix.Rule[]
variables
Optional ¶
- Type: {[ key: string ]: string}
dockerClientConfig
Required ¶
- Type: DockerClientConfig
Creates the Docker configuration file base on objects settings, to authenticate against given registries.
imageName
Required ¶
- Type: string
Container image with namespace to pull from srcRegistry
.
imageTag
Required ¶
- Type: string
Tag of the image which will be pulled.
srcRegistry
Required ¶
- Type: string | Registry
Registry URL to pull container image from.
tarPath
Required ¶
- Type: string
Path where to save the container image tarball.
CranePush ¶
- Implements: ICranePush
Creates a job to push container image to remote container registry with crane
.
The image to copy must be in a tarball
format. It gets validated with crane
and is pushed to dst_registry
destination registry.
This subclass of Job
will configure following defaults for the superclass:
- name: crane-push
- stage: deploy
- image: PredefinedImages.CRANE
Initializers ¶
Name | Type | Description |
---|---|---|
props |
CranePushProps |
No description. |
props
Required ¶
- Type: CranePushProps
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: @gcix/gcix.Job | @gcix/gcix.JobCollection | @gcix/gcix.Need[]
addNeeds
¶
needs
Required ¶
- Type: @gcix/gcix.Job | @gcix/gcix.JobCollection | @gcix/gcix.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: @gcix/gcix.Job | @gcix/gcix.JobCollection
addTags
¶
tags
Required ¶
- Type: string[]
addVariables
¶
variables
Required ¶
- Type: {[ key: string ]: string}
appendRules
¶
rules
Required ¶
- Type: @gcix/gcix.Rule[]
appendScripts
¶
scripts
Required ¶
- Type: string[]
assignAllowFailure
¶
allowFailure
Required ¶
- Type: boolean | number[]
assignArtifacts
¶
artifacts
Required ¶
- Type: @gcix/gcix.Artifacts
assignCache
¶
cache
Required ¶
- Type: @gcix/gcix.Cache
assignDependencies
¶
dependencies
Required ¶
- Type: @gcix/gcix.Job | @gcix/gcix.JobCollection | @gcix/gcix.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 | @gcix/gcix.Image
assignNeeds
¶
needs
Required ¶
- Type: @gcix/gcix.Job | @gcix/gcix.JobCollection | @gcix/gcix.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: @gcix/gcix.Job | @gcix/gcix.JobCollection
isEqual
¶
isEqual
checks if this
object is equal to given object.
comparable
Required ¶
- Type: @gcix/gcix.IBase
prependRules
¶
rules
Required ¶
- Type: @gcix/gcix.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 |
@gcix/gcix.OrderedStringSet |
No description. |
parents |
@gcix/gcix.Job | @gcix/gcix.JobCollection[] |
No description. |
scripts |
string[] |
No description. |
stage |
string |
No description. |
artifacts |
@gcix/gcix.Artifacts |
No description. |
cache |
@gcix/gcix.Cache |
No description. |
dependencies |
@gcix/gcix.Job | @gcix/gcix.JobCollection | @gcix/gcix.Need[] |
No description. |
image |
@gcix/gcix.Image |
No description. |
needs |
@gcix/gcix.Job | @gcix/gcix.JobCollection | @gcix/gcix.Need[] |
No description. |
original |
@gcix/gcix.Job |
No description. |
rules |
@gcix/gcix.Rule[] |
No description. |
variables |
{[ key: string ]: string} |
No description. |
dockerClientConfig |
DockerClientConfig |
Creates the Docker configuration file base on objects settings, to authenticate against given registries. |
dstRegistry |
string | Registry |
Registry URL to copy container image to. |
imageName |
string |
Container image name, searched for in imagePath and gets .tar appended. |
imageTag |
string |
The tag the image will be tagged with. |
tarPath |
string |
Path where to find the container image tarball. |
tags
Required ¶
- Type: string[]
Getter method to receive added tags.
allowFailure
Required ¶
- Type: string | boolean | number[]
name
Required ¶
- Type: string
orderedTags
Required ¶
- Type: @gcix/gcix.OrderedStringSet
parents
Required ¶
- Type: @gcix/gcix.Job | @gcix/gcix.JobCollection[]
scripts
Required ¶
- Type: string[]
stage
Required ¶
- Type: string
artifacts
Optional ¶
- Type: @gcix/gcix.Artifacts
cache
Optional ¶
- Type: @gcix/gcix.Cache
dependencies
Optional ¶
- Type: @gcix/gcix.Job | @gcix/gcix.JobCollection | @gcix/gcix.Need[]
image
Optional ¶
- Type: @gcix/gcix.Image
needs
Optional ¶
- Type: @gcix/gcix.Job | @gcix/gcix.JobCollection | @gcix/gcix.Need[]
original
Optional ¶
- Type: @gcix/gcix.Job
rules
Optional ¶
- Type: @gcix/gcix.Rule[]
variables
Optional ¶
- Type: {[ key: string ]: string}
dockerClientConfig
Required ¶
- Type: DockerClientConfig
Creates the Docker configuration file base on objects settings, to authenticate against given registries.
Defaults to a DockerClientConfig
with login to the official Docker Hub and expecting credentials given as
environment variables REGISTRY_USER
and REGISTRY_LOGIN
.
dstRegistry
Required ¶
- Type: string | Registry
Registry URL to copy container image to.
imageName
Required ¶
- Type: string
Container image name, searched for in imagePath
and gets .tar
appended.
imageTag
Required ¶
- Type: string
The tag the image will be tagged with.
tarPath
Required ¶
- Type: string
Path where to find the container image tarball.
DiveScan ¶
- Implements: IDiveScan
Scan your images with wagoodman/dive.
dive
will scan your container image layers and will output the efficency
of each layer. You can see which layer and which file is consuming the most
storage and optimize the layers if possible. It prevents container images
and its layers beeing polluted with files like apt or yum cache's.
The output produced by dive
is uploaded as an artifact to the
GitLab instance.
This subclass of Job
will configure following defaults for the superclass:
- name: dive
- stage: check
- image: PredefinedImages.DIVE
- artifacts: Path 'dive.txt'
Initializers ¶
Name | Type | Description |
---|---|---|
props |
DiveScanProps |
No description. |
props
Required ¶
- Type: DiveScanProps
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: @gcix/gcix.Job | @gcix/gcix.JobCollection | @gcix/gcix.Need[]
addNeeds
¶
needs
Required ¶
- Type: @gcix/gcix.Job | @gcix/gcix.JobCollection | @gcix/gcix.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: @gcix/gcix.Job | @gcix/gcix.JobCollection
addTags
¶
tags
Required ¶
- Type: string[]
addVariables
¶
variables
Required ¶
- Type: {[ key: string ]: string}
appendRules
¶
rules
Required ¶
- Type: @gcix/gcix.Rule[]
appendScripts
¶
scripts
Required ¶
- Type: string[]
assignAllowFailure
¶
allowFailure
Required ¶
- Type: boolean | number[]
assignArtifacts
¶
artifacts
Required ¶
- Type: @gcix/gcix.Artifacts
assignCache
¶
cache
Required ¶
- Type: @gcix/gcix.Cache
assignDependencies
¶
dependencies
Required ¶
- Type: @gcix/gcix.Job | @gcix/gcix.JobCollection | @gcix/gcix.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 | @gcix/gcix.Image
assignNeeds
¶
needs
Required ¶
- Type: @gcix/gcix.Job | @gcix/gcix.JobCollection | @gcix/gcix.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: @gcix/gcix.Job | @gcix/gcix.JobCollection
isEqual
¶
isEqual
checks if this
object is equal to given object.
comparable
Required ¶
- Type: @gcix/gcix.IBase
prependRules
¶
rules
Required ¶
- Type: @gcix/gcix.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 |
@gcix/gcix.OrderedStringSet |
No description. |
parents |
@gcix/gcix.Job | @gcix/gcix.JobCollection[] |
No description. |
scripts |
string[] |
No description. |
stage |
string |
No description. |
artifacts |
@gcix/gcix.Artifacts |
No description. |
cache |
@gcix/gcix.Cache |
No description. |
dependencies |
@gcix/gcix.Job | @gcix/gcix.JobCollection | @gcix/gcix.Need[] |
No description. |
image |
@gcix/gcix.Image |
No description. |
needs |
@gcix/gcix.Job | @gcix/gcix.JobCollection | @gcix/gcix.Need[] |
No description. |
original |
@gcix/gcix.Job |
No description. |
rules |
@gcix/gcix.Rule[] |
No description. |
variables |
{[ key: string ]: string} |
No description. |
highestUserWastedPercent |
number |
Highest allowable percentage of bytes wasted (as a ratio between 0-1), otherwise CI validation will fail. |
ignoreErrors |
boolean |
Ignore image parsing errors and run the analysis anyway. |
imageName |
string |
Name of the container image to scan, if source is docker-archive argument gets prefix .tar . |
imagePath |
string |
Path to the image can be either a remote container registry, as well as a local path to an image. |
imageTag |
string |
The tag the image will be tagged with. |
lowestEfficiency |
number |
Lowest allowable image efficiency (as a ratio between 0-1), otherwise CI validation will fail. |
source |
string |
The container engine to fetch the image from. |
highestWastedBytes |
number |
Highest allowable bytes wasted, otherwise CI validation will fail. |
tags
Required ¶
- Type: string[]
Getter method to receive added tags.
allowFailure
Required ¶
- Type: string | boolean | number[]
name
Required ¶
- Type: string
orderedTags
Required ¶
- Type: @gcix/gcix.OrderedStringSet
parents
Required ¶
- Type: @gcix/gcix.Job | @gcix/gcix.JobCollection[]
scripts
Required ¶
- Type: string[]
stage
Required ¶
- Type: string
artifacts
Optional ¶
- Type: @gcix/gcix.Artifacts
cache
Optional ¶
- Type: @gcix/gcix.Cache
dependencies
Optional ¶
- Type: @gcix/gcix.Job | @gcix/gcix.JobCollection | @gcix/gcix.Need[]
image
Optional ¶
- Type: @gcix/gcix.Image
needs
Optional ¶
- Type: @gcix/gcix.Job | @gcix/gcix.JobCollection | @gcix/gcix.Need[]
original
Optional ¶
- Type: @gcix/gcix.Job
rules
Optional ¶
- Type: @gcix/gcix.Rule[]
variables
Optional ¶
- Type: {[ key: string ]: string}
highestUserWastedPercent
Required ¶
- Type: number
Highest allowable percentage of bytes wasted (as a ratio between 0-1), otherwise CI validation will fail.
ignoreErrors
Required ¶
- Type: boolean
Ignore image parsing errors and run the analysis anyway.
imageName
Required ¶
- Type: string
Name of the container image to scan, if source
is docker-archive
argument gets prefix .tar
.
imagePath
Required ¶
- Type: string
Path to the image can be either a remote container registry, as well as a local path to an image.
imageTag
Required ¶
- Type: string
The tag the image will be tagged with.
lowestEfficiency
Required ¶
- Type: number
Lowest allowable image efficiency (as a ratio between 0-1), otherwise CI validation will fail.
source
Required ¶
- Type: string
The container engine to fetch the image from.
Allowed values: docker, podman, docker-archive
highestWastedBytes
Optional ¶
- Type: number
Highest allowable bytes wasted, otherwise CI validation will fail.
DockerBuild ¶
- Implements: IDockerBuild
Runs docker build
.
Example:
This subclass of Job
will configure following defaults for the superclass:
- name: docker
- stage: build
Initializers ¶
Name | Type | Description |
---|---|---|
props |
DockerBuildProps |
No description. |
props
Required ¶
- Type: DockerBuildProps
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: @gcix/gcix.Job | @gcix/gcix.JobCollection | @gcix/gcix.Need[]
addNeeds
¶
needs
Required ¶
- Type: @gcix/gcix.Job | @gcix/gcix.JobCollection | @gcix/gcix.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: @gcix/gcix.Job | @gcix/gcix.JobCollection
addTags
¶
tags
Required ¶
- Type: string[]
addVariables
¶
variables
Required ¶
- Type: {[ key: string ]: string}
appendRules
¶
rules
Required ¶
- Type: @gcix/gcix.Rule[]
appendScripts
¶
scripts
Required ¶
- Type: string[]
assignAllowFailure
¶
allowFailure
Required ¶
- Type: boolean | number[]
assignArtifacts
¶
artifacts
Required ¶
- Type: @gcix/gcix.Artifacts
assignCache
¶
cache
Required ¶
- Type: @gcix/gcix.Cache
assignDependencies
¶
dependencies
Required ¶
- Type: @gcix/gcix.Job | @gcix/gcix.JobCollection | @gcix/gcix.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 | @gcix/gcix.Image
assignNeeds
¶
needs
Required ¶
- Type: @gcix/gcix.Job | @gcix/gcix.JobCollection | @gcix/gcix.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: @gcix/gcix.Job | @gcix/gcix.JobCollection
isEqual
¶
isEqual
checks if this
object is equal to given object.
comparable
Required ¶
- Type: @gcix/gcix.IBase
prependRules
¶
rules
Required ¶
- Type: @gcix/gcix.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 |
@gcix/gcix.OrderedStringSet |
No description. |
parents |
@gcix/gcix.Job | @gcix/gcix.JobCollection[] |
No description. |
scripts |
string[] |
No description. |
stage |
string |
No description. |
artifacts |
@gcix/gcix.Artifacts |
No description. |
cache |
@gcix/gcix.Cache |
No description. |
dependencies |
@gcix/gcix.Job | @gcix/gcix.JobCollection | @gcix/gcix.Need[] |
No description. |
image |
@gcix/gcix.Image |
No description. |
needs |
@gcix/gcix.Job | @gcix/gcix.JobCollection | @gcix/gcix.Need[] |
No description. |
original |
@gcix/gcix.Job |
No description. |
rules |
@gcix/gcix.Rule[] |
No description. |
variables |
{[ key: string ]: string} |
No description. |
context |
string |
The Docker build context (the directory containing the Dockerfile). |
repository |
string |
The Docker repository name ([<registry>/]<image>) . |
tag |
string |
A Docker image tag applied to the image. |
tags
Required ¶
- Type: string[]
Getter method to receive added tags.
allowFailure
Required ¶
- Type: string | boolean | number[]
name
Required ¶
- Type: string
orderedTags
Required ¶
- Type: @gcix/gcix.OrderedStringSet
parents
Required ¶
- Type: @gcix/gcix.Job | @gcix/gcix.JobCollection[]
scripts
Required ¶
- Type: string[]
stage
Required ¶
- Type: string
artifacts
Optional ¶
- Type: @gcix/gcix.Artifacts
cache
Optional ¶
- Type: @gcix/gcix.Cache
dependencies
Optional ¶
- Type: @gcix/gcix.Job | @gcix/gcix.JobCollection | @gcix/gcix.Need[]
image
Optional ¶
- Type: @gcix/gcix.Image
needs
Optional ¶
- Type: @gcix/gcix.Job | @gcix/gcix.JobCollection | @gcix/gcix.Need[]
original
Optional ¶
- Type: @gcix/gcix.Job
rules
Optional ¶
- Type: @gcix/gcix.Rule[]
variables
Optional ¶
- Type: {[ key: string ]: string}
context
Required ¶
- Type: string
The Docker build context (the directory containing the Dockerfile).
repository
Required ¶
- Type: string
The Docker repository name ([<registry>/]<image>)
.
tag
Required ¶
- Type: string
A Docker image tag applied to the image.
DockerClientConfig ¶
- Implements: IDockerClientConfig
Class which represents a docker client configuration.
After creating an instance of this class you can add new credential helper, basic authentication settings or default credential store.
Initializers ¶
Name | Type | Description |
---|---|---|
props |
DockerClientConfigProps |
No description. |
props
Optional ¶
- Type: DockerClientConfigProps
Methods ¶
Name | Description |
---|---|
addAuth |
Adds basic authentication auths setting to the configuration. |
addCredHelper |
Adds a Credentials helper credHelpers for a registry. |
addRaw |
Adds arbitrary settings to configuration. |
assignCredsStore |
Sets the credsStore setting for clients. See docker login#credentials-store. |
shellCommand |
Renders the shell command for creating the docker client config. |
addAuth
¶
Adds basic authentication auths
setting to the configuration.
This method acts a little special, because of some security aspects.
The method, takse three arguments, registry
, username_env_var
and password_env_var
.
Arguments ending wit *_env_var, are ment to be available as a gcip.Job
variable.
registry
Required ¶
- Type: string
Name of the container registry to set creds_helper
for.
usernameEnvVar
Optional ¶
- Type: string
Name of the environment variable which as the registry username stored.
passwordEnvVar
Optional ¶
- Type: string
Name of the environment variable which as the registry password stored.
addCredHelper
¶
Adds a Credentials helper credHelpers
for a registry.
See docker login#credential-helpers
registry
Required ¶
- Type: string
Name of the container registry to set creds_helper
for.
credHelper
Required ¶
- Type: string
Name of the credential helper to use together with the registry
.
addRaw
¶
Adds arbitrary settings to configuration.
Be aware and warned! You can overwrite any predefined settings with this method. This method is intendet to be used, if non suitable method is available and you have to set a configuration setting.
rawInput
Required ¶
- Type: {[ key: string ]: any}
Dictionary of non-available settings to be set.
assignCredsStore
¶
Sets the credsStore
setting for clients. See docker login#credentials-store.
Be aware, that if you set the credsStore
and add creds_helper or
username and password authentication, those authentication methods
are not used.
Clients which can authenticate against a registry can handle the credential
store itself, mostly you do not want to set the credsStore
.
Use credsHelpers
instead.
credsStore
Required ¶
- Type: string
Should be the suffix of the program to use (i.e. everything after docker-credential-). osxkeychain
, to use docker-credential-osxkeychain or ecr-login
, to use docker-crendential-ecr-login.
shellCommand
¶
Renders the shell command for creating the docker client config.
The render method uses json.dumps()
to dump the configuration as a json
string and escapes it for the shell. In Jobs which needed the
configuration the rendered output should be redirected to the appropriate
destination e.g. ~/.docker/config.json. This ensures, that environment
variables are substituted.
Properties ¶
Name | Type | Description |
---|---|---|
config |
IDockerClientConfigType |
Docker client configuration. |
configFilePath |
string |
Docker client config path. |
config
Required ¶
- Type: IDockerClientConfigType
Docker client configuration.
configFilePath
Required ¶
- Type: string
Docker client config path.
DockerPush ¶
- Implements: IDockerPush
Runs docker push
and optionally docker login
before.
Example:
The userEnvVar
and loginEnvVar
should be created as
protected and masked custom environment variable configured in the UI.
This subclass of Job
will configure following defaults for the superclass:
- name: docker
- stage: deploy
Initializers ¶
Name | Type | Description |
---|---|---|
props |
DockerPushProps |
No description. |
props
Required ¶
- Type: DockerPushProps
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: @gcix/gcix.Job | @gcix/gcix.JobCollection | @gcix/gcix.Need[]
addNeeds
¶
needs
Required ¶
- Type: @gcix/gcix.Job | @gcix/gcix.JobCollection | @gcix/gcix.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: @gcix/gcix.Job | @gcix/gcix.JobCollection
addTags
¶
tags
Required ¶
- Type: string[]
addVariables
¶
variables
Required ¶
- Type: {[ key: string ]: string}
appendRules
¶
rules
Required ¶
- Type: @gcix/gcix.Rule[]
appendScripts
¶
scripts
Required ¶
- Type: string[]
assignAllowFailure
¶
allowFailure
Required ¶
- Type: boolean | number[]
assignArtifacts
¶
artifacts
Required ¶
- Type: @gcix/gcix.Artifacts
assignCache
¶
cache
Required ¶
- Type: @gcix/gcix.Cache
assignDependencies
¶
dependencies
Required ¶
- Type: @gcix/gcix.Job | @gcix/gcix.JobCollection | @gcix/gcix.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 | @gcix/gcix.Image
assignNeeds
¶
needs
Required ¶
- Type: @gcix/gcix.Job | @gcix/gcix.JobCollection | @gcix/gcix.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: @gcix/gcix.Job | @gcix/gcix.JobCollection
isEqual
¶
isEqual
checks if this
object is equal to given object.
comparable
Required ¶
- Type: @gcix/gcix.IBase
prependRules
¶
rules
Required ¶
- Type: @gcix/gcix.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 |
@gcix/gcix.OrderedStringSet |
No description. |
parents |
@gcix/gcix.Job | @gcix/gcix.JobCollection[] |
No description. |
scripts |
string[] |
No description. |
stage |
string |
No description. |
artifacts |
@gcix/gcix.Artifacts |
No description. |
cache |
@gcix/gcix.Cache |
No description. |
dependencies |
@gcix/gcix.Job | @gcix/gcix.JobCollection | @gcix/gcix.Need[] |
No description. |
image |
@gcix/gcix.Image |
No description. |
needs |
@gcix/gcix.Job | @gcix/gcix.JobCollection | @gcix/gcix.Need[] |
No description. |
original |
@gcix/gcix.Job |
No description. |
rules |
@gcix/gcix.Rule[] |
No description. |
variables |
{[ key: string ]: string} |
No description. |
containerImage |
string |
The name of the Docker image to push to the registry . |
registry |
string |
The Docker registry the image should be pushed to. |
tag |
string |
The Docker image tag that should be pushed to the registry . |
loginEnvVar |
string |
If you have to login to the registry before the push, you have to provide the name of the environment variable, which contains the password or token, here. |
userEnvVar |
string |
If you have to login to the registry before the push, you have to provide the name of the environment variable, which contains the username value, here. |
tags
Required ¶
- Type: string[]
Getter method to receive added tags.
allowFailure
Required ¶
- Type: string | boolean | number[]
name
Required ¶
- Type: string
orderedTags
Required ¶
- Type: @gcix/gcix.OrderedStringSet
parents
Required ¶
- Type: @gcix/gcix.Job | @gcix/gcix.JobCollection[]
scripts
Required ¶
- Type: string[]
stage
Required ¶
- Type: string
artifacts
Optional ¶
- Type: @gcix/gcix.Artifacts
cache
Optional ¶
- Type: @gcix/gcix.Cache
dependencies
Optional ¶
- Type: @gcix/gcix.Job | @gcix/gcix.JobCollection | @gcix/gcix.Need[]
image
Optional ¶
- Type: @gcix/gcix.Image
needs
Optional ¶
- Type: @gcix/gcix.Job | @gcix/gcix.JobCollection | @gcix/gcix.Need[]
original
Optional ¶
- Type: @gcix/gcix.Job
rules
Optional ¶
- Type: @gcix/gcix.Rule[]
variables
Optional ¶
- Type: {[ key: string ]: string}
containerImage
Required ¶
- Type: string
The name of the Docker image to push to the registry
.
registry
Required ¶
- Type: string
The Docker registry the image should be pushed to.
tag
Required ¶
- Type: string
The Docker image tag that should be pushed to the registry
.
loginEnvVar
Optional ¶
- Type: string
If you have to login to the registry before the push, you have to provide the name of the environment variable, which contains the password or token, here.
DO NOT PROVIDE THE LOGIN VALUE ITSELF! This would be a security issue!
userEnvVar
Optional ¶
- Type: string
If you have to login to the registry before the push, you have to provide the name of the environment variable, which contains the username value, here.
DO NOT PROVIDE THE USERNAME VALUE ITSELF! This would be a security issue!
KanikoExecute ¶
- Implements: IKanikoExecute
Creates a job which builds container images.
This job creates images depending on git branches.
e.g If the branch which gets pushed to the remote is named
my_awsome_feature
the image will be tagged with my-awsome-feature
.
This subclass of Job
will configure following defaults for the superclass:
- name: kaniko
- stage: build
- image: PredefinedImages.KANIKO
Initializers ¶
Name | Type | Description |
---|---|---|
props |
KanikoExecuteProps |
No description. |
props
Required ¶
- Type: KanikoExecuteProps
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: @gcix/gcix.Job | @gcix/gcix.JobCollection | @gcix/gcix.Need[]
addNeeds
¶
needs
Required ¶
- Type: @gcix/gcix.Job | @gcix/gcix.JobCollection | @gcix/gcix.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: @gcix/gcix.Job | @gcix/gcix.JobCollection
addTags
¶
tags
Required ¶
- Type: string[]
addVariables
¶
variables
Required ¶
- Type: {[ key: string ]: string}
appendRules
¶
rules
Required ¶
- Type: @gcix/gcix.Rule[]
appendScripts
¶
scripts
Required ¶
- Type: string[]
assignAllowFailure
¶
allowFailure
Required ¶
- Type: boolean | number[]
assignArtifacts
¶
artifacts
Required ¶
- Type: @gcix/gcix.Artifacts
assignCache
¶
cache
Required ¶
- Type: @gcix/gcix.Cache
assignDependencies
¶
dependencies
Required ¶
- Type: @gcix/gcix.Job | @gcix/gcix.JobCollection | @gcix/gcix.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 | @gcix/gcix.Image
assignNeeds
¶
needs
Required ¶
- Type: @gcix/gcix.Job | @gcix/gcix.JobCollection | @gcix/gcix.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: @gcix/gcix.Job | @gcix/gcix.JobCollection
isEqual
¶
isEqual
checks if this
object is equal to given object.
comparable
Required ¶
- Type: @gcix/gcix.IBase
prependRules
¶
rules
Required ¶
- Type: @gcix/gcix.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 |
@gcix/gcix.OrderedStringSet |
No description. |
parents |
@gcix/gcix.Job | @gcix/gcix.JobCollection[] |
No description. |
scripts |
string[] |
No description. |
stage |
string |
No description. |
artifacts |
@gcix/gcix.Artifacts |
No description. |
cache |
@gcix/gcix.Cache |
No description. |
dependencies |
@gcix/gcix.Job | @gcix/gcix.JobCollection | @gcix/gcix.Need[] |
No description. |
image |
@gcix/gcix.Image |
No description. |
needs |
@gcix/gcix.Job | @gcix/gcix.JobCollection | @gcix/gcix.Need[] |
No description. |
original |
@gcix/gcix.Job |
No description. |
rules |
@gcix/gcix.Rule[] |
No description. |
variables |
{[ key: string ]: string} |
No description. |
context |
string |
Context which will be send to kaniko. |
dockerClientConfig |
DockerClientConfig |
Creates the Docker configuration file base on objects settings, to authenticate against given registries. |
dockerfile |
string |
Name of the dockerfile to use. |
enablePush |
boolean |
Enable push to container registry, disabled to allow subsequent jobs to act on container tarball. |
imageName |
string |
Image name which will be created. |
imageTag |
string |
The tag the image will be tagged with. |
verbosity |
string |
Verbosity of kaniko logging. |
buildArgs |
{[ key: string ]: any} |
Container build arguments, used to instrument the container image build. |
buildTarget |
string |
For container multistage builds name of the build stage you want to create. |
registries |
string[] | Registry[] |
List of container registries to push created image to. |
tarPath |
string |
Container images created by kaniko are tarball files. |
tags
Required ¶
- Type: string[]
Getter method to receive added tags.
allowFailure
Required ¶
- Type: string | boolean | number[]
name
Required ¶
- Type: string
orderedTags
Required ¶
- Type: @gcix/gcix.OrderedStringSet
parents
Required ¶
- Type: @gcix/gcix.Job | @gcix/gcix.JobCollection[]
scripts
Required ¶
- Type: string[]
stage
Required ¶
- Type: string
artifacts
Optional ¶
- Type: @gcix/gcix.Artifacts
cache
Optional ¶
- Type: @gcix/gcix.Cache
dependencies
Optional ¶
- Type: @gcix/gcix.Job | @gcix/gcix.JobCollection | @gcix/gcix.Need[]
image
Optional ¶
- Type: @gcix/gcix.Image
needs
Optional ¶
- Type: @gcix/gcix.Job | @gcix/gcix.JobCollection | @gcix/gcix.Need[]
original
Optional ¶
- Type: @gcix/gcix.Job
rules
Optional ¶
- Type: @gcix/gcix.Rule[]
variables
Optional ¶
- Type: {[ key: string ]: string}
context
Required ¶
- Type: string
Context which will be send to kaniko.
dockerClientConfig
Required ¶
- Type: DockerClientConfig
Creates the Docker configuration file base on objects settings, to authenticate against given registries.
Defaults to a DockerClientConfig
with login to the official Docker Hub and expecting credentials given as
environment variables REGISTRY_USER
and REGISTRY_LOGIN
.
dockerfile
Required ¶
- Type: string
Name of the dockerfile to use.
File is relative to context.
enablePush
Required ¶
- Type: boolean
Enable push to container registry, disabled to allow subsequent jobs to act on container tarball.
imageName
Required ¶
- Type: string
Image name which will be created.
imageTag
Required ¶
- Type: string
The tag the image will be tagged with.
verbosity
Required ¶
- Type: string
Verbosity of kaniko logging.
buildArgs
Optional ¶
- Type: {[ key: string ]: any}
Container build arguments, used to instrument the container image build.
buildTarget
Optional ¶
- Type: string
For container multistage builds name of the build stage you want to create.
Image tag will be appended with the build_target. e.g. latest-buildtarget.
registries
Optional ¶
- Type: string[] | Registry[]
List of container registries to push created image to.
tarPath
Optional ¶
- Type: string
Container images created by kaniko are tarball files.
This is the path where to store the image, will be named with suffix .tar
.
This path will be created if not present.
PredefinedImages ¶
The PredefinedImages collection supplies commonly utilized container image objects within the gcix framework.
Constants ¶
Name | Type | Description |
---|---|---|
ALPINE_GIT |
@gcix/gcix.Image |
A predefined Alpine Git container image object. |
BUSYBOX |
@gcix/gcix.Image |
A predefined Busybox container image object. |
CRANE |
@gcix/gcix.Image |
A predefined Crane container image object. |
DIVE |
@gcix/gcix.Image |
A predefined Dive container image object. |
GCIP |
@gcix/gcix.Image |
A predefined GCIP container image object. |
GCIX |
@gcix/gcix.Image |
A predefined GCIX container image object. |
KANIKO |
@gcix/gcix.Image |
A predefined Kaniko container image object. |
TRIVY |
@gcix/gcix.Image |
A predefined Trivy container image object. |
ALPINE_GIT
Required ¶
- Type: @gcix/gcix.Image
A predefined Alpine Git container image object.
This image is useful for Git operations within containers.
BUSYBOX
Required ¶
- Type: @gcix/gcix.Image
A predefined Busybox container image object.
CRANE
Required ¶
- Type: @gcix/gcix.Image
A predefined Crane container image object.
DIVE
Required ¶
- Type: @gcix/gcix.Image
A predefined Dive container image object.
GCIP
Required ¶
- Type: @gcix/gcix.Image
A predefined GCIP container image object.
GCIX
Required ¶
- Type: @gcix/gcix.Image
A predefined GCIX container image object.
KANIKO
Required ¶
- Type: @gcix/gcix.Image
A predefined Kaniko container image object.
TRIVY
Required ¶
- Type: @gcix/gcix.Image
A predefined Trivy container image object.
Registry ¶
Container registry urls constants.
Static Functions ¶
Name | Description |
---|---|
aws |
Amazon Elastic Container Registry (ECR). |
aws
¶
Amazon Elastic Container Registry (ECR).
If neither accountId
nor region
is given, the method attempts to
evaluate accountId
and region
using helper functions from aws.AWSAccount
.
If either of the helper functions does provide a valid value, a ValueError
or KeyError
exception will be raised.
props
Optional ¶
- Type: AWSRegistryProps
Constants ¶
Name | Type | Description |
---|---|---|
DOCKER |
string |
No description. |
GCR |
string |
No description. |
QUAY |
string |
No description. |
DOCKER
Required ¶
- Type: string
GCR
Required ¶
- Type: string
QUAY
Required ¶
- Type: string
TrivyIgnoreFileCheck ¶
- Implements: ITrivyIgnoreFileCheck
This job checks if a .trivyignore file exists and is not empty and fails if so.
If a .trivyignore file is found and not empty, by default the job fails with exit 1
,
the job is configured to allow failures so that the pipeline keeps running.
This ensures the visibility of acknowledged CVE's in the .trivyignore
file inside the pipeline.
This subclass of Job
will configure following defaults for the superclass:
- name: trivyignore
- stage: check
- image: PredefinedImages.BUSYBOX
- allow_failure: 1
Initializers ¶
Name | Type | Description |
---|---|---|
props |
TrivyIgnoreFileCheckProps |
No description. |
props
Required ¶
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: @gcix/gcix.Job | @gcix/gcix.JobCollection | @gcix/gcix.Need[]
addNeeds
¶
needs
Required ¶
- Type: @gcix/gcix.Job | @gcix/gcix.JobCollection | @gcix/gcix.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: @gcix/gcix.Job | @gcix/gcix.JobCollection
addTags
¶
tags
Required ¶
- Type: string[]
addVariables
¶
variables
Required ¶
- Type: {[ key: string ]: string}
appendRules
¶
rules
Required ¶
- Type: @gcix/gcix.Rule[]
appendScripts
¶
scripts
Required ¶
- Type: string[]
assignAllowFailure
¶
allowFailure
Required ¶
- Type: boolean | number[]
assignArtifacts
¶
artifacts
Required ¶
- Type: @gcix/gcix.Artifacts
assignCache
¶
cache
Required ¶
- Type: @gcix/gcix.Cache
assignDependencies
¶
dependencies
Required ¶
- Type: @gcix/gcix.Job | @gcix/gcix.JobCollection | @gcix/gcix.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 | @gcix/gcix.Image
assignNeeds
¶
needs
Required ¶
- Type: @gcix/gcix.Job | @gcix/gcix.JobCollection | @gcix/gcix.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: @gcix/gcix.Job | @gcix/gcix.JobCollection
isEqual
¶
isEqual
checks if this
object is equal to given object.
comparable
Required ¶
- Type: @gcix/gcix.IBase
prependRules
¶
rules
Required ¶
- Type: @gcix/gcix.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 |
@gcix/gcix.OrderedStringSet |
No description. |
parents |
@gcix/gcix.Job | @gcix/gcix.JobCollection[] |
No description. |
scripts |
string[] |
No description. |
stage |
string |
No description. |
artifacts |
@gcix/gcix.Artifacts |
No description. |
cache |
@gcix/gcix.Cache |
No description. |
dependencies |
@gcix/gcix.Job | @gcix/gcix.JobCollection | @gcix/gcix.Need[] |
No description. |
image |
@gcix/gcix.Image |
No description. |
needs |
@gcix/gcix.Job | @gcix/gcix.JobCollection | @gcix/gcix.Need[] |
No description. |
original |
@gcix/gcix.Job |
No description. |
rules |
@gcix/gcix.Rule[] |
No description. |
variables |
{[ key: string ]: string} |
No description. |
trivyignorePath |
string |
Path to the .trivyignore file. |
tags
Required ¶
- Type: string[]
Getter method to receive added tags.
allowFailure
Required ¶
- Type: string | boolean | number[]
name
Required ¶
- Type: string
orderedTags
Required ¶
- Type: @gcix/gcix.OrderedStringSet
parents
Required ¶
- Type: @gcix/gcix.Job | @gcix/gcix.JobCollection[]
scripts
Required ¶
- Type: string[]
stage
Required ¶
- Type: string
artifacts
Optional ¶
- Type: @gcix/gcix.Artifacts
cache
Optional ¶
- Type: @gcix/gcix.Cache
dependencies
Optional ¶
- Type: @gcix/gcix.Job | @gcix/gcix.JobCollection | @gcix/gcix.Need[]
image
Optional ¶
- Type: @gcix/gcix.Image
needs
Optional ¶
- Type: @gcix/gcix.Job | @gcix/gcix.JobCollection | @gcix/gcix.Need[]
original
Optional ¶
- Type: @gcix/gcix.Job
rules
Optional ¶
- Type: @gcix/gcix.Rule[]
variables
Optional ¶
- Type: {[ key: string ]: string}
trivyignorePath
Required ¶
- Type: string
Path to the .trivyignore
file.
TrivyScanLocalImage ¶
- Implements: ITrivyScanLocalImage
This job scanns container images to find vulnerabilities.
This job fails with exit code 1 if severities are found. The scan output is printed to stdout and uploaded to the artifacts of GitLab.
This subclass of Job
will configure following defaults for the superclass:
- name: trivy
- stage: check
- image: PredefinedImages.TRIVY
- artifacts: Path 'trivy.txt'
Initializers ¶
Name | Type | Description |
---|---|---|
props |
TrivyScanLocalImageProps |
No description. |
props
Required ¶
- Type: TrivyScanLocalImageProps
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: @gcix/gcix.Job | @gcix/gcix.JobCollection | @gcix/gcix.Need[]
addNeeds
¶
needs
Required ¶
- Type: @gcix/gcix.Job | @gcix/gcix.JobCollection | @gcix/gcix.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: @gcix/gcix.Job | @gcix/gcix.JobCollection
addTags
¶
tags
Required ¶
- Type: string[]
addVariables
¶
variables
Required ¶
- Type: {[ key: string ]: string}
appendRules
¶
rules
Required ¶
- Type: @gcix/gcix.Rule[]
appendScripts
¶
scripts
Required ¶
- Type: string[]
assignAllowFailure
¶
allowFailure
Required ¶
- Type: boolean | number[]
assignArtifacts
¶
artifacts
Required ¶
- Type: @gcix/gcix.Artifacts
assignCache
¶
cache
Required ¶
- Type: @gcix/gcix.Cache
assignDependencies
¶
dependencies
Required ¶
- Type: @gcix/gcix.Job | @gcix/gcix.JobCollection | @gcix/gcix.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 | @gcix/gcix.Image
assignNeeds
¶
needs
Required ¶
- Type: @gcix/gcix.Job | @gcix/gcix.JobCollection | @gcix/gcix.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: @gcix/gcix.Job | @gcix/gcix.JobCollection
isEqual
¶
isEqual
checks if this
object is equal to given object.
comparable
Required ¶
- Type: @gcix/gcix.IBase
prependRules
¶
rules
Required ¶
- Type: @gcix/gcix.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 |
@gcix/gcix.OrderedStringSet |
No description. |
parents |
@gcix/gcix.Job | @gcix/gcix.JobCollection[] |
No description. |
scripts |
string[] |
No description. |
stage |
string |
No description. |
artifacts |
@gcix/gcix.Artifacts |
No description. |
cache |
@gcix/gcix.Cache |
No description. |
dependencies |
@gcix/gcix.Job | @gcix/gcix.JobCollection | @gcix/gcix.Need[] |
No description. |
image |
@gcix/gcix.Image |
No description. |
needs |
@gcix/gcix.Job | @gcix/gcix.JobCollection | @gcix/gcix.Need[] |
No description. |
original |
@gcix/gcix.Job |
No description. |
rules |
@gcix/gcix.Rule[] |
No description. |
variables |
{[ key: string ]: string} |
No description. |
debug |
boolean |
If trivy should run in debug mode. |
exitIfVulnerable |
boolean |
Exit code when vulnerabilities were found. |
imageName |
string |
Container image name, searched for in imagePath and gets .tar appended. |
imagePath |
string |
Path where to find the container image. |
imageTag |
string |
The tag the image will be tagged with. |
outputFormat |
string |
Scan output format, possible values (table, json). |
severity |
string |
Severities of vulnerabilities to be displayed (comma separated). |
vulnerabilityTypes |
string |
List of vulnerability types (comma separated). |
trivyConfig |
string |
Additional options to pass to trivy binary. |
tags
Required ¶
- Type: string[]
Getter method to receive added tags.
allowFailure
Required ¶
- Type: string | boolean | number[]
name
Required ¶
- Type: string
orderedTags
Required ¶
- Type: @gcix/gcix.OrderedStringSet
parents
Required ¶
- Type: @gcix/gcix.Job | @gcix/gcix.JobCollection[]
scripts
Required ¶
- Type: string[]
stage
Required ¶
- Type: string
artifacts
Optional ¶
- Type: @gcix/gcix.Artifacts
cache
Optional ¶
- Type: @gcix/gcix.Cache
dependencies
Optional ¶
- Type: @gcix/gcix.Job | @gcix/gcix.JobCollection | @gcix/gcix.Need[]
image
Optional ¶
- Type: @gcix/gcix.Image
needs
Optional ¶
- Type: @gcix/gcix.Job | @gcix/gcix.JobCollection | @gcix/gcix.Need[]
original
Optional ¶
- Type: @gcix/gcix.Job
rules
Optional ¶
- Type: @gcix/gcix.Rule[]
variables
Optional ¶
- Type: {[ key: string ]: string}
debug
Required ¶
- Type: boolean
If trivy should run in debug mode.
exitIfVulnerable
Required ¶
- Type: boolean
Exit code when vulnerabilities were found.
If true exit code is 1 else 0.
imageName
Required ¶
- Type: string
Container image name, searched for in imagePath
and gets .tar
appended.
imagePath
Required ¶
- Type: string
Path where to find the container image.
imageTag
Required ¶
- Type: string
The tag the image will be tagged with.
outputFormat
Required ¶
- Type: string
Scan output format, possible values (table, json).
severity
Required ¶
- Type: string
Severities of vulnerabilities to be displayed (comma separated).
vulnerabilityTypes
Required ¶
- Type: string
List of vulnerability types (comma separated).
trivyConfig
Optional ¶
- Type: string
Additional options to pass to trivy
binary.
Protocols ¶
IBuildContainerCollection ¶
- Implemented By: BuildContainerCollection, BuildGitlabContainerCollection, IBuildContainerCollection
Properties ¶
Name | Type | Description |
---|---|---|
cranePushJob |
CranePush |
Crane push job. |
diveScanJob |
DiveScan |
Dive scan job. |
dockerClientConfig |
DockerClientConfig |
Creates the Docker configuration file base on objects settings, to authenticate against given registries. |
doCranePush |
boolean |
Set to false to skip the Crane push job. |
doDiveScan |
boolean |
Set to false to skip the Dive scan job. |
doTrivyignoreCheck |
boolean |
Set to false to skip the existance check of the .trivyignore file. |
doTrivyScan |
boolean |
Set to false to skip the Trivy scan job. |
imageName |
string |
Image name with stage in the registry. |
imageTag |
string |
Image tag. |
kanikoExecuteJob |
KanikoExecute |
Kaniko execute job. |
registry |
string | Registry |
Container registry to push the image to. |
trivyIgnoreFileCheckJob |
TrivyIgnoreFileCheck |
Trivy ignore file check job. |
trivyScanLocalImageJob |
TrivyScanLocalImage |
Trivy scan local image job. |
cranePushJob
Required ¶
- Type: CranePush
Crane push job.
diveScanJob
Required ¶
- Type: DiveScan
Dive scan job.
dockerClientConfig
Required ¶
- Type: DockerClientConfig
- Default: DockerClientConfig with login to the official Docker Hub and expecting credentials given as environment variables
REGISTRY_USER
andREGISTRY_LOGIN
.
Creates the Docker configuration file base on objects settings, to authenticate against given registries.
doCranePush
Required ¶
- Type: boolean
- Default: true
Set to false
to skip the Crane push job.
doDiveScan
Required ¶
- Type: boolean
- Default: true
Set to false
to skip the Dive scan job.
doTrivyignoreCheck
Required ¶
- Type: boolean
- Default: true
Set to false
to skip the existance check of the .trivyignore
file.
doTrivyScan
Required ¶
- Type: boolean
- Default: true
Set to false
to skip the Trivy scan job.
imageName
Required ¶
- Type: string
- Default: PredefinedVariables.ciProjectDir
Image name with stage in the registry.
e.g. username/imageName.
imageTag
Required ¶
- Type: string
- Default: PredefinedVariables.ciCommitRefName
Image tag.
Depending of the build it defaults either to the git tag or to the actual branch name.
kanikoExecuteJob
Required ¶
- Type: KanikoExecute
Kaniko execute job.
registry
Required ¶
- Type: string | Registry
- Default: Registry.DOCKER
Container registry to push the image to.
If the container registry
needs authentication, you have to provide a DockerClientConfig
object
with credentials.
trivyIgnoreFileCheckJob
Required ¶
- Type: TrivyIgnoreFileCheck
Trivy ignore file check job.
trivyScanLocalImageJob
Required ¶
- Type: TrivyScanLocalImage
Trivy scan local image job.
ICopyContainerCollection ¶
- Implemented By: CopyContainerCollection, ICopyContainerCollection
Properties ¶
Name | Type | Description |
---|---|---|
cranePullJob |
CranePull |
CranPull job. |
cranePushJob |
CranePush |
No description. |
dockerClientConfig |
DockerClientConfig |
Creates the Docker configuration file base on objects settings, to authenticate against given registries. |
doDiveScan |
boolean |
Set to false to skip the Dive scan job. |
doTrivyignoreCheck |
boolean |
Set to false to skip the existance check of the .trivyignore file. |
doTrivyScan |
boolean |
Set to false to skip the Trivy scan job. |
dstRegistry |
string | Registry |
Container registry to push the image to. |
imageName |
string |
Image name with stage in the registry. |
imageTag |
string |
Container image tag to pull from srcRegistry and push to dstRegistry . |
srcRegistry |
string | Registry |
Container registry to pull the image from. |
diveScanJob |
DiveScan |
Dive scan job. |
trivyIgnoreFileCheckJob |
TrivyIgnoreFileCheck |
Trivy ignore file check job. |
trivyScanLocalImageJob |
TrivyScanLocalImage |
Trivy scan local image job. |
cranePullJob
Required ¶
- Type: CranePull
CranPull job.
cranePushJob
Required ¶
- Type: CranePush
dockerClientConfig
Required ¶
- Type: DockerClientConfig
- Default: DockerClientConfig with login to the official Docker Hub and expecting credentials given as environment variables
REGISTRY_USER
andREGISTRY_LOGIN
.
Creates the Docker configuration file base on objects settings, to authenticate against given registries.
doDiveScan
Required ¶
- Type: boolean
- Default: true
Set to false
to skip the Dive scan job.
doTrivyignoreCheck
Required ¶
- Type: boolean
- Default: true
Set to false
to skip the existance check of the .trivyignore
file.
doTrivyScan
Required ¶
- Type: boolean
- Default: true
Set to false
to skip the Trivy scan job.
dstRegistry
Required ¶
- Type: string | Registry
- Default: Registry.DOCKER
Container registry to push the image to.
If the container registry needs
authentication, you have to provide a DockerClientConfig
object with
credentials.
imageName
Required ¶
- Type: string
Image name with stage in the registry.
e.g. username/image_name.
imageTag
Required ¶
- Type: string
Container image tag to pull from srcRegistry
and push to dstRegistry
.
srcRegistry
Required ¶
- Type: string | Registry
- Default: Registry.DOCKER
Container registry to pull the image from.
If the container registry needs
authentication, you have to provide a DockerClientConfig
object with
credentials.
diveScanJob
Optional ¶
- Type: DiveScan
Dive scan job.
trivyIgnoreFileCheckJob
Optional ¶
- Type: TrivyIgnoreFileCheck
Trivy ignore file check job.
trivyScanLocalImageJob
Optional ¶
- Type: TrivyScanLocalImage
Trivy scan local image job.
ICraneCopy ¶
- Implemented By: CraneCopy, ICraneCopy
Properties ¶
Name | Type | Description |
---|---|---|
dstRegistry |
string | Registry |
Registry URL to copy container image to. |
srcRegistry |
string | Registry |
Registry URL to copy container image from. |
dockerClientConfig |
DockerClientConfig |
Creates the Docker configuration file base on objects settings, used by crane to authenticate against given registries. |
dstRegistry
Required ¶
- Type: string | Registry
Registry URL to copy container image to.
srcRegistry
Required ¶
- Type: string | Registry
Registry URL to copy container image from.
dockerClientConfig
Optional ¶
- Type: DockerClientConfig
Creates the Docker configuration file base on objects settings, used by crane to authenticate against given registries.
ICranePull ¶
- Implemented By: CranePull, ICranePull
Properties ¶
Name | Type | Description |
---|---|---|
dockerClientConfig |
DockerClientConfig |
Creates the Docker configuration file base on objects settings, to authenticate against given registries. |
imageName |
string |
Container image with namespace to pull from srcRegistry . |
imageTag |
string |
Tag of the image which will be pulled. |
srcRegistry |
string | Registry |
Registry URL to pull container image from. |
tarPath |
string |
Path where to save the container image tarball. |
dockerClientConfig
Required ¶
- Type: DockerClientConfig
- Default: DockerClientConfig with login to the official Docker Hub and expecting credentials given as environment variables
REGISTRY_USER
andREGISTRY_LOGIN
.
Creates the Docker configuration file base on objects settings, to authenticate against given registries.
imageName
Required ¶
- Type: string
- Default: PredefinedVariables.ciProjectName
Container image with namespace to pull from srcRegistry
.
imageTag
Required ¶
- Type: string
- Default: latest
Tag of the image which will be pulled.
srcRegistry
Required ¶
- Type: string | Registry
Registry URL to pull container image from.
tarPath
Required ¶
- Type: string
- Default: PredefinedVariables.ciProjectDir
Path where to save the container image tarball.
ICranePush ¶
- Implemented By: CranePush, ICranePush
Properties ¶
Name | Type | Description |
---|---|---|
dockerClientConfig |
DockerClientConfig |
Creates the Docker configuration file base on objects settings, to authenticate against given registries. |
dstRegistry |
string | Registry |
Registry URL to copy container image to. |
imageName |
string |
Container image name, searched for in imagePath and gets .tar appended. |
imageTag |
string |
The tag the image will be tagged with. |
tarPath |
string |
Path where to find the container image tarball. |
dockerClientConfig
Required ¶
- Type: DockerClientConfig
Creates the Docker configuration file base on objects settings, to authenticate against given registries.
Defaults to a DockerClientConfig
with login to the official Docker Hub and expecting credentials given as
environment variables REGISTRY_USER
and REGISTRY_LOGIN
.
dstRegistry
Required ¶
- Type: string | Registry
Registry URL to copy container image to.
imageName
Required ¶
- Type: string
- Default: PredefinedVariables.ciProjectName
Container image name, searched for in imagePath
and gets .tar
appended.
imageTag
Required ¶
- Type: string
- Default: PredefinedVariables.ciCommitTag
The tag the image will be tagged with.
tarPath
Required ¶
- Type: string
- Default: PredefinedVariables.ciProjectDir
Path where to find the container image tarball.
IDiveScan ¶
Properties ¶
Name | Type | Description |
---|---|---|
highestUserWastedPercent |
number |
Highest allowable percentage of bytes wasted (as a ratio between 0-1), otherwise CI validation will fail. |
ignoreErrors |
boolean |
Ignore image parsing errors and run the analysis anyway. |
imageName |
string |
Name of the container image to scan, if source is docker-archive argument gets prefix .tar . |
imagePath |
string |
Path to the image can be either a remote container registry, as well as a local path to an image. |
imageTag |
string |
The tag the image will be tagged with. |
lowestEfficiency |
number |
Lowest allowable image efficiency (as a ratio between 0-1), otherwise CI validation will fail. |
source |
string |
The container engine to fetch the image from. |
highestWastedBytes |
number |
Highest allowable bytes wasted, otherwise CI validation will fail. |
highestUserWastedPercent
Required ¶
- Type: number
- Default: 0.1
Highest allowable percentage of bytes wasted (as a ratio between 0-1), otherwise CI validation will fail.
ignoreErrors
Required ¶
- Type: boolean
- Default: false
Ignore image parsing errors and run the analysis anyway.
imageName
Required ¶
- Type: string
- Default: PredefinedVariables.ciProjectName
Name of the container image to scan, if source
is docker-archive
argument gets prefix .tar
.
imagePath
Required ¶
- Type: string
- Default: PredefinedVariables.ciProjectPath
Path to the image can be either a remote container registry, as well as a local path to an image.
imageTag
Required ¶
- Type: string
- Default: PredefinedVariables.ciCommitTag
The tag the image will be tagged with.
lowestEfficiency
Required ¶
- Type: number
- Default: 0.9
Lowest allowable image efficiency (as a ratio between 0-1), otherwise CI validation will fail.
source
Required ¶
- Type: string
- Default: docker-archive
The container engine to fetch the image from.
Allowed values: docker, podman, docker-archive
highestWastedBytes
Optional ¶
- Type: number
Highest allowable bytes wasted, otherwise CI validation will fail.
IDockerBuild ¶
- Implemented By: DockerBuild, IDockerBuild
Properties ¶
Name | Type | Description |
---|---|---|
context |
string |
The Docker build context (the directory containing the Dockerfile). |
repository |
string |
The Docker repository name ([<registry>/]<image>) . |
tag |
string |
A Docker image tag applied to the image. |
context
Required ¶
- Type: string
- Default:
.
The Docker build context (the directory containing the Dockerfile).
repository
Required ¶
- Type: string
The Docker repository name ([<registry>/]<image>)
.
tag
Required ¶
- Type: string
- Default: "latest"
A Docker image tag applied to the image.
IDockerClientConfig ¶
- Implemented By: DockerClientConfig, IDockerClientConfig
Properties ¶
Name | Type | Description |
---|---|---|
config |
IDockerClientConfigType |
Docker client configuration. |
configFilePath |
string |
Docker client config path. |
config
Required ¶
- Type: IDockerClientConfigType
Docker client configuration.
configFilePath
Required ¶
- Type: string
- Default: $HOME/.docker/config.json
Docker client config path.
IDockerClientConfigType ¶
- Implemented By: IDockerClientConfigType
Properties ¶
Name | Type | Description |
---|---|---|
auths |
{[ key: string ]: any} |
No description. |
credHelpers |
{[ key: string ]: string} |
No description. |
credsStore |
string |
No description. |
rawInput |
{[ key: string ]: string} |
No description. |
auths
Optional ¶
- Type: {[ key: string ]: any}
credHelpers
Optional ¶
- Type: {[ key: string ]: string}
credsStore
Optional ¶
- Type: string
rawInput
Optional ¶
- Type: {[ key: string ]: string}
IDockerPush ¶
- Implemented By: DockerPush, IDockerPush
Properties ¶
Name | Type | Description |
---|---|---|
containerImage |
string |
The name of the Docker image to push to the registry . |
registry |
string |
The Docker registry the image should be pushed to. |
tag |
string |
The Docker image tag that should be pushed to the registry . |
loginEnvVar |
string |
If you have to login to the registry before the push, you have to provide the name of the environment variable, which contains the password or token, here. |
userEnvVar |
string |
If you have to login to the registry before the push, you have to provide the name of the environment variable, which contains the username value, here. |
containerImage
Required ¶
- Type: string
The name of the Docker image to push to the registry
.
registry
Required ¶
- Type: string
- Default: index.docker.io/v1
The Docker registry the image should be pushed to.
tag
Required ¶
- Type: string
- Default:
latest
The Docker image tag that should be pushed to the registry
.
loginEnvVar
Optional ¶
- Type: string
If you have to login to the registry before the push, you have to provide the name of the environment variable, which contains the password or token, here.
DO NOT PROVIDE THE LOGIN VALUE ITSELF! This would be a security issue!
userEnvVar
Optional ¶
- Type: string
If you have to login to the registry before the push, you have to provide the name of the environment variable, which contains the username value, here.
DO NOT PROVIDE THE USERNAME VALUE ITSELF! This would be a security issue!
IKanikoExecute ¶
- Implemented By: KanikoExecute, IKanikoExecute
Properties ¶
Name | Type | Description |
---|---|---|
context |
string |
Context which will be send to kaniko. |
dockerClientConfig |
DockerClientConfig |
Creates the Docker configuration file base on objects settings, to authenticate against given registries. |
dockerfile |
string |
Name of the dockerfile to use. |
enablePush |
boolean |
Enable push to container registry, disabled to allow subsequent jobs to act on container tarball. |
imageName |
string |
Image name which will be created. |
imageTag |
string |
The tag the image will be tagged with. |
verbosity |
string |
Verbosity of kaniko logging. |
buildArgs |
{[ key: string ]: any} |
Container build arguments, used to instrument the container image build. |
buildTarget |
string |
For container multistage builds name of the build stage you want to create. |
registries |
string[] | Registry[] |
List of container registries to push created image to. |
tarPath |
string |
Container images created by kaniko are tarball files. |
context
Required ¶
- Type: string
- Default: PredefinedVariables.CI_PROJECT_DIR
Context which will be send to kaniko.
dockerClientConfig
Required ¶
- Type: DockerClientConfig
Creates the Docker configuration file base on objects settings, to authenticate against given registries.
Defaults to a DockerClientConfig
with login to the official Docker Hub and expecting credentials given as
environment variables REGISTRY_USER
and REGISTRY_LOGIN
.
dockerfile
Required ¶
- Type: string
- Default: "Dockerfile"
Name of the dockerfile to use.
File is relative to context.
enablePush
Required ¶
- Type: boolean
- Default: false
Enable push to container registry, disabled to allow subsequent jobs to act on container tarball.
imageName
Required ¶
- Type: string
- Default: PredefinedVariables.CI_PROJECT_NAME.
Image name which will be created.
imageTag
Required ¶
- Type: string
- Default: PredefinedVariables.CI_COMMIT_TAG
The tag the image will be tagged with.
verbosity
Required ¶
- Type: string
- Default: "info"
Verbosity of kaniko logging.
buildArgs
Optional ¶
- Type: {[ key: string ]: any}
Container build arguments, used to instrument the container image build.
buildTarget
Optional ¶
- Type: string
For container multistage builds name of the build stage you want to create.
Image tag will be appended with the build_target. e.g. latest-buildtarget.
registries
Optional ¶
- Type: string[] | Registry[]
List of container registries to push created image to.
tarPath
Optional ¶
- Type: string
Container images created by kaniko are tarball files.
This is the path where to store the image, will be named with suffix .tar
.
This path will be created if not present.
ITrivyIgnoreFileCheck ¶
- Implemented By: TrivyIgnoreFileCheck, ITrivyIgnoreFileCheck
Properties ¶
Name | Type | Description |
---|---|---|
trivyignorePath |
string |
Path to the .trivyignore file. |
trivyignorePath
Required ¶
- Type: string
- Default: PredefinedVariables.ciProjectDir/.trivyignore
Path to the .trivyignore
file.
ITrivyScanLocalImage ¶
- Implemented By: TrivyScanLocalImage, ITrivyScanLocalImage
Properties ¶
Name | Type | Description |
---|---|---|
debug |
boolean |
If trivy should run in debug mode. |
exitIfVulnerable |
boolean |
Exit code when vulnerabilities were found. |
imageName |
string |
Container image name, searched for in imagePath and gets .tar appended. |
imagePath |
string |
Path where to find the container image. |
imageTag |
string |
The tag the image will be tagged with. |
outputFormat |
string |
Scan output format, possible values (table, json). |
severity |
string |
Severities of vulnerabilities to be displayed (comma separated). |
vulnerabilityTypes |
string |
List of vulnerability types (comma separated). |
trivyConfig |
string |
Additional options to pass to trivy binary. |
debug
Required ¶
- Type: boolean
- Default: false
If trivy should run in debug mode.
exitIfVulnerable
Required ¶
- Type: boolean
- Default: true
Exit code when vulnerabilities were found.
If true exit code is 1 else 0.
imageName
Required ¶
- Type: string
- Default: PredefinedVariables.CI_PROJECT_NAME
Container image name, searched for in imagePath
and gets .tar
appended.
imagePath
Required ¶
- Type: string
- Default: PredefinedVariables.CI_PROJECT_DIR
Path where to find the container image.
imageTag
Required ¶
- Type: string
- Default: PredefinedVariables.CI_COMMIT_TAG
The tag the image will be tagged with.
outputFormat
Required ¶
- Type: string
- Default: "table"
Scan output format, possible values (table, json).
severity
Required ¶
- Type: string
- Default: "UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL"
Severities of vulnerabilities to be displayed (comma separated).
vulnerabilityTypes
Required ¶
- Type: string
- Default: "os,library"
List of vulnerability types (comma separated).
trivyConfig
Optional ¶
- Type: string
Additional options to pass to trivy
binary.