container
Submodule ¶
Structs ¶
AWSRegistryProps ¶
Initializer ¶
Properties ¶
Name | Type | Description |
---|---|---|
account_id |
str |
AWS account id. |
region |
str |
AWS region where the ECR repository lives in. |
account_id
Optional ¶
- Type: str
- Default: AWSAccount.awsAccountId()
AWS account id.
region
Optional ¶
- Type: str
- Default: AWSAccount.awsRegion()
AWS region where the ECR repository lives in.
BuildContainerCollectionProps ¶
Initializer ¶
Properties ¶
Name | Type | Description |
---|---|---|
registry |
typing.Union[str, Registry] |
Container registry to push the image to. |
docker_client_config |
DockerClientConfig |
Creates the Docker configuration file base on objects settings, to authenticate against given registries. |
do_crane_push |
bool |
Set to false to skip the Crane push job. |
do_dive_scan |
bool |
Set to false to skip the Dive scan job. |
do_trivyignore_check |
bool |
Set to false to skip the existance check of the .trivyignore file. |
do_trivy_scan |
bool |
Set to false to skip the Trivy scan job. |
image_name |
str |
Image name with stage in the registry. |
image_tag |
str |
Image tag. |
job_name |
str |
The name of the Bootstrap job. |
job_stage |
str |
The stage of the Bootstrap job. |
registry
Required ¶
- Type: typing.Union[str, 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.
docker_client_config
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.
do_crane_push
Optional ¶
- Type: bool
- Default: true
Set to false
to skip the Crane push job.
do_dive_scan
Optional ¶
- Type: bool
- Default: true
Set to false
to skip the Dive scan job.
do_trivyignore_check
Optional ¶
- Type: bool
- Default: true
Set to false
to skip the existance check of the .trivyignore
file.
do_trivy_scan
Optional ¶
- Type: bool
- Default: true
Set to false
to skip the Trivy scan job.
image_name
Optional ¶
- Type: str
- Default: PredefinedVariables.ciProjectDir
Image name with stage in the registry.
e.g. username/imageName.
image_tag
Optional ¶
- Type: str
- Default: PredefinedVariables.ciCommitRefName
Image tag.
Depending of the build it defaults either to the git tag or to the actual branch name.
job_name
Optional ¶
- Type: str
The name of the Bootstrap job.
job_stage
Optional ¶
- Type: str
The stage of the Bootstrap job.
CopyContainerCollectionProps ¶
Initializer ¶
Properties ¶
Name | Type | Description |
---|---|---|
image_name |
str |
Image name with stage in the registry. |
image_tag |
str |
Container image tag to pull from srcRegistry and push to dstRegistry . |
docker_client_config |
DockerClientConfig |
Creates the Docker configuration file base on objects settings, to authenticate against given registries. |
do_dive_scan |
bool |
Set to false to skip the Dive scan job. |
do_trivyignore_check |
bool |
Set to false to skip the existance check of the .trivyignore file. |
do_trivy_scan |
bool |
Set to false to skip the Trivy scan job. |
dst_registry |
typing.Union[str, Registry] |
Container registry to push the image to. |
job_name |
str |
The name of the Bootstrap job. |
job_stage |
str |
The stage of the Bootstrap job. |
src_registry |
typing.Union[str, Registry] |
Container registry to pull the image from. |
image_name
Required ¶
- Type: str
Image name with stage in the registry.
e.g. username/image_name.
image_tag
Required ¶
- Type: str
Container image tag to pull from srcRegistry
and push to dstRegistry
.
docker_client_config
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.
do_dive_scan
Optional ¶
- Type: bool
- Default: true
Set to false
to skip the Dive scan job.
do_trivyignore_check
Optional ¶
- Type: bool
- Default: true
Set to false
to skip the existance check of the .trivyignore
file.
do_trivy_scan
Optional ¶
- Type: bool
- Default: true
Set to false
to skip the Trivy scan job.
dst_registry
Optional ¶
- Type: typing.Union[str, 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.
job_name
Optional ¶
- Type: str
The name of the Bootstrap job.
job_stage
Optional ¶
- Type: str
The stage of the Bootstrap job.
src_registry
Optional ¶
- Type: typing.Union[str, 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 |
---|---|---|
dst_registry |
typing.Union[str, Registry] |
Registry URL to copy container image to. |
src_registry |
typing.Union[str, Registry] |
Registry URL to copy container image from. |
docker_client_config |
DockerClientConfig |
Creates the Docker configuration file base on objects settings, used by crane to authenticate against given registries. |
job_name |
str |
The name of the Bootstrap job. |
job_stage |
str |
The stage of the Bootstrap job. |
dst_registry
Required ¶
- Type: typing.Union[str, Registry]
Registry URL to copy container image to.
src_registry
Required ¶
- Type: typing.Union[str, Registry]
Registry URL to copy container image from.
docker_client_config
Optional ¶
- Type: DockerClientConfig
Creates the Docker configuration file base on objects settings, used by crane to authenticate against given registries.
job_name
Optional ¶
- Type: str
The name of the Bootstrap job.
job_stage
Optional ¶
- Type: str
The stage of the Bootstrap job.
CranePullProps ¶
Initializer ¶
Properties ¶
Name | Type | Description |
---|---|---|
src_registry |
typing.Union[str, Registry] |
Registry URL to pull container image from. |
docker_client_config |
DockerClientConfig |
Creates the Docker configuration file base on objects settings, to authenticate against given registries. |
image_name |
str |
Container image with namespace to pull from srcRegistry . |
image_tag |
str |
Tag of the image which will be pulled. |
job_name |
str |
The name of the Bootstrap job. |
job_stage |
str |
The stage of the Bootstrap job. |
tar_path |
str |
Path where to save the container image tarball. |
src_registry
Required ¶
- Type: typing.Union[str, Registry]
Registry URL to pull container image from.
docker_client_config
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.
image_name
Optional ¶
- Type: str
- Default: PredefinedVariables.ciProjectName
Container image with namespace to pull from srcRegistry
.
image_tag
Optional ¶
- Type: str
- Default: latest
Tag of the image which will be pulled.
job_name
Optional ¶
- Type: str
The name of the Bootstrap job.
job_stage
Optional ¶
- Type: str
The stage of the Bootstrap job.
tar_path
Optional ¶
- Type: str
- Default: PredefinedVariables.ciProjectDir
Path where to save the container image tarball.
CranePushProps ¶
Initializer ¶
Properties ¶
Name | Type | Description |
---|---|---|
dst_registry |
typing.Union[str, Registry] |
Registry URL to copy container image to. |
docker_client_config |
DockerClientConfig |
Creates the Docker configuration file base on objects settings, to authenticate against given registries. |
image_name |
str |
Container image name, searched for in imagePath and gets .tar appended. |
image_tag |
str |
The tag the image will be tagged with. |
job_name |
str |
The name of the Bootstrap job. |
job_stage |
str |
The stage of the Bootstrap job. |
tar_path |
str |
Path where to find the container image tarball. |
dst_registry
Required ¶
- Type: typing.Union[str, Registry]
Registry URL to copy container image to.
docker_client_config
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
.
image_name
Optional ¶
- Type: str
- Default: PredefinedVariables.ciProjectName
Container image name, searched for in imagePath
and gets .tar
appended.
image_tag
Optional ¶
- Type: str
- Default: PredefinedVariables.ciCommitTag
The tag the image will be tagged with.
job_name
Optional ¶
- Type: str
The name of the Bootstrap job.
job_stage
Optional ¶
- Type: str
The stage of the Bootstrap job.
tar_path
Optional ¶
- Type: str
- Default: PredefinedVariables.ciProjectDir
Path where to find the container image tarball.
DiveScanProps ¶
Initializer ¶
Properties ¶
Name | Type | Description |
---|---|---|
highest_user_wasted_percent |
typing.Union[int, float] |
Highest allowable percentage of bytes wasted (as a ratio between 0-1), otherwise CI validation will fail. |
highest_wasted_bytes |
typing.Union[int, float] |
Highest allowable bytes wasted, otherwise CI validation will fail. |
ignore_errors |
bool |
Ignore image parsing errors and run the analysis anyway. |
image_name |
str |
Name of the container image to scan, if source is docker-archive argument gets prefix .tar . |
image_path |
str |
Path to the image can be either a remote container registry, as well as a local path to an image. |
job_name |
str |
The name of the Bootstrap job. |
job_stage |
str |
The stage of the Bootstrap job. |
lowest_efficiency |
typing.Union[int, float] |
Lowest allowable image efficiency (as a ratio between 0-1), otherwise CI validation will fail. |
source |
str |
The container engine to fetch the image from. |
highest_user_wasted_percent
Optional ¶
- Type: typing.Union[int, float]
- Default: 0.1
Highest allowable percentage of bytes wasted (as a ratio between 0-1), otherwise CI validation will fail.
highest_wasted_bytes
Optional ¶
- Type: typing.Union[int, float]
Highest allowable bytes wasted, otherwise CI validation will fail.
ignore_errors
Optional ¶
- Type: bool
- Default: false
Ignore image parsing errors and run the analysis anyway.
image_name
Optional ¶
- Type: str
- Default: PredefinedVariables.ciProjectName
Name of the container image to scan, if source
is docker-archive
argument gets prefix .tar
.
image_path
Optional ¶
- Type: str
- Default: PredefinedVariables.ciProjectPath
Path to the image can be either a remote container registry, as well as a local path to an image.
job_name
Optional ¶
- Type: str
The name of the Bootstrap job.
job_stage
Optional ¶
- Type: str
The stage of the Bootstrap job.
lowest_efficiency
Optional ¶
- Type: typing.Union[int, float]
- Default: 0.9
Lowest allowable image efficiency (as a ratio between 0-1), otherwise CI validation will fail.
source
Optional ¶
- Type: str
- Default: "docker-archive
The container engine to fetch the image from.
Allowed values: docker, podman, docker-archive
DockerBuildProps ¶
Initializer ¶
Properties ¶
Name | Type | Description |
---|---|---|
repository |
str |
The Docker repository name ([<registry>/]<image>) . |
context |
str |
The Docker build context (the directory containing the Dockerfile). |
job_name |
str |
The name of the Bootstrap job. |
job_stage |
str |
The stage of the Bootstrap job. |
tag |
str |
A Docker image tag applied to the image. |
repository
Required ¶
- Type: str
The Docker repository name ([<registry>/]<image>)
.
context
Optional ¶
- Type: str
- Default:
.
The Docker build context (the directory containing the Dockerfile).
job_name
Optional ¶
- Type: str
The name of the Bootstrap job.
job_stage
Optional ¶
- Type: str
The stage of the Bootstrap job.
tag
Optional ¶
- Type: str
A Docker image tag applied to the image.
If not set docker uses latest
DockerClientConfigProps ¶
Initializer ¶
Properties ¶
Name | Type | Description |
---|---|---|
config_file_path |
str |
Docker client config path. |
config_file_path
Optional ¶
- Type: str
- Default: $HOME/.docker/config.json
Docker client config path.
DockerPushProps ¶
Initializer ¶
Properties ¶
Name | Type | Description |
---|---|---|
container_image |
str |
The name of the Docker image to push to the registry . |
job_name |
str |
The name of the Bootstrap job. |
job_stage |
str |
The stage of the Bootstrap job. |
login_env_var |
str |
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 |
str |
The Docker registry the image should be pushed to. |
tag |
str |
The Docker image tag that should be pushed to the registry . |
user_env_var |
str |
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. |
container_image
Required ¶
- Type: str
The name of the Docker image to push to the registry
.
job_name
Optional ¶
- Type: str
The name of the Bootstrap job.
job_stage
Optional ¶
- Type: str
The stage of the Bootstrap job.
login_env_var
Optional ¶
- Type: str
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: str
- Default: index.docker.io/v1
The Docker registry the image should be pushed to.
tag
Optional ¶
- Type: str
- Default:
latest
The Docker image tag that should be pushed to the registry
.
user_env_var
Optional ¶
- Type: str
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 |
---|---|---|
build_args |
typing.Mapping[typing.Any] |
Container build arguments, used to instrument the container image build. |
build_target |
str |
For container multistage builds name of the build stage you want to create. |
context |
str |
Context which will be send to kaniko. |
docker_client_config |
DockerClientConfig |
Creates the Docker configuration file base on objects settings, to authenticate against given registries. |
dockerfile |
str |
Name of the dockerfile to use. |
enable_push |
bool |
Enable push to container registry, disabled to allow subsequent jobs to. |
image_name |
str |
Image name which will be created. |
image_tag |
str |
The tag the image will be tagged with. |
job_name |
str |
The name of the Bootstrap job. |
job_stage |
str |
The stage of the Bootstrap job. |
registries |
typing.Union[typing.List[str], typing.List[Registry]] |
List of container registries to push created image to. |
tar_path |
str |
Container images created by kaniko are tarball files. |
verbosity |
str |
Verbosity of kaniko logging. |
build_args
Optional ¶
- Type: typing.Mapping[typing.Any]
Container build arguments, used to instrument the container image build.
build_target
Optional ¶
- Type: str
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: str
Context which will be send to kaniko.
Defaults to None
which implies
the local directory is the context.
docker_client_config
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: str
- Default: "Dockerfile"
Name of the dockerfile to use.
File is relative to context.
enable_push
Optional ¶
- Type: bool
- Default: false act on container tarball.
Enable push to container registry, disabled to allow subsequent jobs to.
image_name
Optional ¶
- Type: str
- Default: PredefinedVariables.CI_PROJECT_NAME.
Image name which will be created.
image_tag
Optional ¶
- Type: str
- Default: PredefinedVariables.CI_COMMIT_TAG
The tag the image will be tagged with.
job_name
Optional ¶
- Type: str
The name of the Bootstrap job.
job_stage
Optional ¶
- Type: str
The stage of the Bootstrap job.
registries
Optional ¶
- Type: typing.Union[typing.List[str], typing.List[Registry]]
List of container registries to push created image to.
tar_path
Optional ¶
- Type: str
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: str
- Default: "info"
Verbosity of kaniko logging.
TrivyIgnoreFileCheckProps ¶
Initializer ¶
Properties ¶
Name | Type | Description |
---|---|---|
job_name |
str |
The name of the Bootstrap job. |
job_stage |
str |
The stage of the Bootstrap job. |
trivyignore_path |
str |
Path to the .trivyignore file. |
job_name
Optional ¶
- Type: str
The name of the Bootstrap job.
job_stage
Optional ¶
- Type: str
The stage of the Bootstrap job.
trivyignore_path
Optional ¶
- Type: str
- Default: PredefinedVariables.ciProjectDir/.trivyignore
Path to the .trivyignore
file.
TrivyScanLocalImageProps ¶
Initializer ¶
Properties ¶
Name | Type | Description |
---|---|---|
debug |
bool |
If trivy should run in debug mode. |
exit_if_vulnerable |
bool |
Exit code when vulnerabilities were found. |
image_name |
str |
Container image name, searched for in imagePath and gets .tar appended. |
image_path |
str |
Path where to find the container image. |
job_name |
str |
The name of the Bootstrap job. |
job_stage |
str |
The stage of the Bootstrap job. |
output_format |
str |
Scan output format, possible values (table, json). |
severity |
str |
Severities of vulnerabilities to be displayed (comma separated). |
trivy_config |
str |
Additional options to pass to trivy binary. |
vulnerability_types |
str |
List of vulnerability types (comma separated). |
debug
Optional ¶
- Type: bool
- Default: false
If trivy should run in debug mode.
exit_if_vulnerable
Optional ¶
- Type: bool
- Default: true
Exit code when vulnerabilities were found.
If true exit code is 1 else 0.
image_name
Optional ¶
- Type: str
- Default: PredefinedVariables.CI_PROJECT_NAME
Container image name, searched for in imagePath
and gets .tar
appended.
image_path
Optional ¶
- Type: str
- Default: PredefinedVariables.CI_PROJECT_DIR
Path where to find the container image.
job_name
Optional ¶
- Type: str
The name of the Bootstrap job.
job_stage
Optional ¶
- Type: str
The stage of the Bootstrap job.
output_format
Optional ¶
- Type: str
- Default: "table"
Scan output format, possible values (table, json).
severity
Optional ¶
- Type: str
- Default: "UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL"
Severities of vulnerabilities to be displayed (comma separated).
trivy_config
Optional ¶
- Type: str
Additional options to pass to trivy
binary.
vulnerability_types
Optional ¶
- Type: str
- 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 |
---|---|---|
registry |
typing.Union[str, Registry] |
Container registry to push the image to. |
docker_client_config |
DockerClientConfig |
Creates the Docker configuration file base on objects settings, to authenticate against given registries. |
do_crane_push |
bool |
Set to false to skip the Crane push job. |
do_dive_scan |
bool |
Set to false to skip the Dive scan job. |
do_trivyignore_check |
bool |
Set to false to skip the existance check of the .trivyignore file. |
do_trivy_scan |
bool |
Set to false to skip the Trivy scan job. |
image_name |
str |
Image name with stage in the registry. |
image_tag |
str |
Image tag. |
job_name |
str |
The name of the Bootstrap job. |
job_stage |
str |
The stage of the Bootstrap job. |
registry
Required ¶
- Type: typing.Union[str, 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.
docker_client_config
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.
do_crane_push
Optional ¶
- Type: bool
- Default: true
Set to false
to skip the Crane push job.
do_dive_scan
Optional ¶
- Type: bool
- Default: true
Set to false
to skip the Dive scan job.
do_trivyignore_check
Optional ¶
- Type: bool
- Default: true
Set to false
to skip the existance check of the .trivyignore
file.
do_trivy_scan
Optional ¶
- Type: bool
- Default: true
Set to false
to skip the Trivy scan job.
image_name
Optional ¶
- Type: str
- Default: PredefinedVariables.ciProjectDir
Image name with stage in the registry.
e.g. username/imageName.
image_tag
Optional ¶
- Type: str
- Default: PredefinedVariables.ciCommitRefName
Image tag.
Depending of the build it defaults either to the git tag or to the actual branch name.
job_name
Optional ¶
- Type: str
The name of the Bootstrap job.
job_stage
Optional ¶
- Type: str
The stage of the Bootstrap job.
Methods ¶
Name | Description |
---|---|
add_children |
Add gcix.Job s or other gcix.JobCollection s to this JobCollection. |
add_dependencies |
No description. |
add_needs |
No description. |
add_parent |
No description. |
add_tags |
No description. |
add_variables |
No description. |
append_rules |
No description. |
append_scripts |
No description. |
assign_artifacts |
No description. |
assign_cache |
No description. |
get_all_instance_names |
Return all instance names from the given child. |
initialize_allow_failure |
Calling gcix.Job.assignAllowFailure() to all jobs within this JobCollection that haven't been set the allowFailure before. |
initialize_artifacts |
Sets gcix.Job.artifacts to all jobs within this JobCollection that haven't been set the artifacs before. |
initialize_cache |
Calling gcix.Job.assigneCache() to all jobs within this JobCollection that haven't been set the cache before. |
initialize_dependencies |
Calling gcix.Job.assignDependencies() to all jobs within the first stage of this JobCollection that haven't been added dependencies before. |
initialize_image |
Calling gcix.Job.assignImage() to all jobs within this JobCollection. |
initialize_needs |
Calling gcix.Job.assignNeeds() to all jobs within the first stage of this JobCollection that haven't been added needs before. |
initialize_rules |
Calling gcix.Job.append_rules() to all jobs within this JobCollection that haven't been added rules before. |
initialize_tags |
Calling gcix.Job.addTags([...]) to all jobs within this JobCollection that haven't been added tags before. |
initialize_variables |
Calling gcix.Job.addVariables({...}) to all jobs within this JobCollection that haven't been added variables before. |
is_equal |
isEqual checks if this object is equal to given object. |
override_allow_failure |
Calling gcix.Job.assignAllowFailure() to all jobs within this JobCollection overriding any previous set value. |
override_dependencies |
Calling gcix.Job.assignDependencies() to all jobs within the first stage of this JobCollection and overriding any previously added dependencies to that jobs. |
override_image |
Calling gcix.Job.assignImage() to all jobs within this JobCollection overriding any previous set value. |
override_needs |
Calling gcix.Job.assignNeeds() to all jobs within the first stage of this JobCollection and overriding any previously added needs to that jobs. |
override_rules |
Calling gcix.Job.overrideRules() to all jobs within this JobCollection and overriding any previously added rules to that jobs. |
override_tags |
Calling gcix.Job.addTags([...]) to all jobs within this JobCollection and overriding any previously added tags to that jobs. |
override_variables |
Calling gcix.Job.addVariables({...}) to all jobs within this JobCollection and overriding any previously added variables to that jobs. |
prepend_rules |
No description. |
prepend_scripts |
No description. |
render |
Returns a representation of any object which implements IBase . |
add_children
¶
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.
jobs_or_job_collections
Required ¶
- Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection]]
name
Optional ¶
- Type: str
stage
Optional ¶
- Type: str
add_dependencies
¶
dependencies
Required ¶
- Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]]
add_needs
¶
needs
Required ¶
- Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]]
add_parent
¶
parent
Required ¶
- Type: gcix.JobCollection
add_tags
¶
tags
Required ¶
- Type: typing.List[str]
add_variables
¶
variables
Required ¶
- Type: typing.Mapping[str]
append_rules
¶
rules
Required ¶
- Type: typing.List[gcix.Rule]
append_scripts
¶
scripts
Required ¶
- Type: typing.List[str]
assign_artifacts
¶
artifacts
Required ¶
- Type: gcix.Artifacts
assign_cache
¶
cache
Required ¶
- Type: gcix.Cache
get_all_instance_names
¶
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: typing.Union[gcix.Job, gcix.JobCollection]
initialize_allow_failure
¶
Calling gcix.Job.assignAllowFailure()
to all jobs within this JobCollection that haven't been set the allowFailure before.
allow_failure
Required ¶
- Type: typing.Union[bool, typing.List[typing.Union[int, float]]]
initialize_artifacts
¶
Sets gcix.Job.artifacts
to all jobs within this JobCollection that haven't been set the artifacs before.
artifacts
Required ¶
- Type: gcix.Artifacts
initialize_cache
¶
Calling gcix.Job.assigneCache()
to all jobs within this JobCollection that haven't been set the cache before.
cache
Required ¶
- Type: gcix.Cache
initialize_dependencies
¶
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: typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]]
initialize_image
¶
Calling gcix.Job.assignImage()
to all jobs within this JobCollection.
image
Required ¶
- Type: typing.Union[str, gcix.Image]
initialize_needs
¶
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: typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]]
initialize_rules
¶
Calling gcix.Job.append_rules()
to all jobs within this JobCollection that haven't been added rules before.
rules
Required ¶
- Type: typing.List[gcix.Rule]
initialize_tags
¶
Calling gcix.Job.addTags([...])
to all jobs within this JobCollection that haven't been added tags before.
tags
Required ¶
- Type: typing.List[str]
initialize_variables
¶
Calling gcix.Job.addVariables({...})
to all jobs within this JobCollection that haven't been added variables before.
variables
Required ¶
- Type: typing.Mapping[str]
is_equal
¶
isEqual
checks if this
object is equal to given object.
comparable
Required ¶
- Type: gcix.IBase
override_allow_failure
¶
Calling gcix.Job.assignAllowFailure()
to all jobs within this JobCollection overriding any previous set value.
allow_failure
Required ¶
- Type: typing.Union[bool, typing.List[typing.Union[int, float]]]
override_dependencies
¶
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: typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]]
override_image
¶
Calling gcix.Job.assignImage()
to all jobs within this JobCollection overriding any previous set value.
image
Required ¶
- Type: typing.Union[str, gcix.Image]
override_needs
¶
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: typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]]
override_rules
¶
Calling gcix.Job.overrideRules()
to all jobs within this JobCollection and overriding any previously added rules to that jobs.
rules
Required ¶
- Type: typing.List[gcix.Rule]
override_tags
¶
Calling gcix.Job.addTags([...])
to all jobs within this JobCollection and overriding any previously added tags to that jobs.
tags
Required ¶
- Type: typing.List[str]
override_variables
¶
Calling gcix.Job.addVariables({...})
to all jobs within this JobCollection and overriding any previously added variables to that jobs.
variables
Required ¶
- Type: typing.Mapping[str]
prepend_rules
¶
rules
Required ¶
- Type: typing.List[gcix.Rule]
prepend_scripts
¶
scripts
Required ¶
- Type: typing.List[str]
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 |
---|---|---|
last_jobs_executed |
typing.List[gcix.Job] |
This property returns all Jobs from the last stage of this JobCollection. |
nested_jobs |
typing.List[gcix.Job] |
No description. |
populated_jobs |
typing.List[gcix.Job] |
Returns a list with populated copies of all nested jobs of this JobCollection. |
children |
typing.List[gcix.ChildDict] |
No description. |
ordered_tags |
gcix.OrderedStringSet |
No description. |
ordered_tags_for_initialization |
gcix.OrderedStringSet |
No description. |
ordered_tags_for_replacement |
gcix.OrderedStringSet |
No description. |
parents |
typing.List[typing.Union[gcix.Job, gcix.JobCollection]] |
No description. |
allow_failure_for_initialization |
typing.Union[str, bool, typing.List[typing.Union[int, float]]] |
No description. |
allow_failure_for_replacement |
typing.Union[str, bool, typing.List[typing.Union[int, float]]] |
No description. |
artifacts |
gcix.Artifacts |
No description. |
artifacts_for_initialization |
gcix.Artifacts |
No description. |
artifacts_for_replacement |
gcix.Artifacts |
No description. |
cache |
gcix.Cache |
No description. |
cache_for_initialization |
gcix.Cache |
No description. |
dependencies |
typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]] |
No description. |
dependencies_for_initialization |
typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]] |
No description. |
dependencies_for_replacement |
typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]] |
No description. |
image_for_initialization |
typing.Union[str, gcix.Image] |
No description. |
image_for_replacement |
typing.Union[str, gcix.Image] |
No description. |
needs |
typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]] |
No description. |
needs_for_initialization |
typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]] |
No description. |
needs_for_replacement |
typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]] |
No description. |
rules_for_initialization |
typing.List[gcix.Rule] |
No description. |
rules_for_replacement |
typing.List[gcix.Rule] |
No description. |
rules_to_append |
typing.List[gcix.Rule] |
No description. |
rules_to_prepend |
typing.List[gcix.Rule] |
No description. |
scripts_to_append |
typing.List[str] |
No description. |
scripts_to_prepend |
typing.List[str] |
No description. |
variables |
typing.Mapping[str] |
No description. |
variables_for_initialization |
typing.Mapping[str] |
No description. |
variables_for_replacement |
typing.Mapping[str] |
No description. |
crane_push_job |
CranePush |
Crane push job. |
dive_scan_job |
DiveScan |
Dive scan job. |
docker_client_config |
DockerClientConfig |
Creates the Docker configuration file base on objects settings, to authenticate against given registries. |
do_crane_push |
bool |
Set to false to skip the Crane push job. |
do_dive_scan |
bool |
Set to false to skip the Dive scan job. |
do_trivyignore_check |
bool |
Set to false to skip the existance check of the .trivyignore file. |
do_trivy_scan |
bool |
Set to false to skip the Trivy scan job. |
image_name |
str |
Image name with stage in the registry. |
image_tag |
str |
Image tag. |
kaniko_execute_job |
KanikoExecute |
Kaniko execute job. |
registry |
typing.Union[str, Registry] |
Container registry to push the image to. |
trivy_ignore_file_check_job |
TrivyIgnoreFileCheck |
Trivy ignore file check job. |
trivy_scan_local_image_job |
TrivyScanLocalImage |
Trivy scan local image job. |
last_jobs_executed
Required ¶
- Type: typing.List[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.
nested_jobs
Required ¶
- Type: typing.List[gcix.Job]
populated_jobs
Required ¶
- Type: typing.List[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: typing.List[gcix.ChildDict]
ordered_tags
Required ¶
- Type: gcix.OrderedStringSet
ordered_tags_for_initialization
Required ¶
- Type: gcix.OrderedStringSet
ordered_tags_for_replacement
Required ¶
- Type: gcix.OrderedStringSet
parents
Required ¶
- Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection]]
allow_failure_for_initialization
Optional ¶
- Type: typing.Union[str, bool, typing.List[typing.Union[int, float]]]
allow_failure_for_replacement
Optional ¶
- Type: typing.Union[str, bool, typing.List[typing.Union[int, float]]]
artifacts
Optional ¶
- Type: gcix.Artifacts
artifacts_for_initialization
Optional ¶
- Type: gcix.Artifacts
artifacts_for_replacement
Optional ¶
- Type: gcix.Artifacts
cache
Optional ¶
- Type: gcix.Cache
cache_for_initialization
Optional ¶
- Type: gcix.Cache
dependencies
Optional ¶
- Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]]
dependencies_for_initialization
Optional ¶
- Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]]
dependencies_for_replacement
Optional ¶
- Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]]
image_for_initialization
Optional ¶
- Type: typing.Union[str, gcix.Image]
image_for_replacement
Optional ¶
- Type: typing.Union[str, gcix.Image]
needs
Optional ¶
- Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]]
needs_for_initialization
Optional ¶
- Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]]
needs_for_replacement
Optional ¶
- Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]]
rules_for_initialization
Optional ¶
- Type: typing.List[gcix.Rule]
rules_for_replacement
Optional ¶
- Type: typing.List[gcix.Rule]
rules_to_append
Optional ¶
- Type: typing.List[gcix.Rule]
rules_to_prepend
Optional ¶
- Type: typing.List[gcix.Rule]
scripts_to_append
Optional ¶
- Type: typing.List[str]
scripts_to_prepend
Optional ¶
- Type: typing.List[str]
variables
Optional ¶
- Type: typing.Mapping[str]
variables_for_initialization
Optional ¶
- Type: typing.Mapping[str]
variables_for_replacement
Optional ¶
- Type: typing.Mapping[str]
crane_push_job
Required ¶
- Type: CranePush
Crane push job.
dive_scan_job
Required ¶
- Type: DiveScan
Dive scan job.
docker_client_config
Required ¶
- Type: DockerClientConfig
Creates the Docker configuration file base on objects settings, to authenticate against given registries.
do_crane_push
Required ¶
- Type: bool
Set to false
to skip the Crane push job.
do_dive_scan
Required ¶
- Type: bool
Set to false
to skip the Dive scan job.
do_trivyignore_check
Required ¶
- Type: bool
Set to false
to skip the existance check of the .trivyignore
file.
do_trivy_scan
Required ¶
- Type: bool
Set to false
to skip the Trivy scan job.
image_name
Required ¶
- Type: str
Image name with stage in the registry.
e.g. username/imageName.
image_tag
Required ¶
- Type: str
Image tag.
Depending of the build it defaults either to the git tag or to the actual branch name.
kaniko_execute_job
Required ¶
- Type: KanikoExecute
Kaniko execute job.
registry
Required ¶
- Type: typing.Union[str, Registry]
Container registry to push the image to.
If the container registry
needs authentication, you have to provide a DockerClientConfig
object
with credentials.
trivy_ignore_file_check_job
Required ¶
- Type: TrivyIgnoreFileCheck
Trivy ignore file check job.
trivy_scan_local_image_job
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 |
---|---|---|
image_name |
str |
Image name with stage in the registry. |
image_tag |
str |
Container image tag to pull from srcRegistry and push to dstRegistry . |
docker_client_config |
DockerClientConfig |
Creates the Docker configuration file base on objects settings, to authenticate against given registries. |
do_dive_scan |
bool |
Set to false to skip the Dive scan job. |
do_trivyignore_check |
bool |
Set to false to skip the existance check of the .trivyignore file. |
do_trivy_scan |
bool |
Set to false to skip the Trivy scan job. |
dst_registry |
typing.Union[str, Registry] |
Container registry to push the image to. |
job_name |
str |
The name of the Bootstrap job. |
job_stage |
str |
The stage of the Bootstrap job. |
src_registry |
typing.Union[str, Registry] |
Container registry to pull the image from. |
image_name
Required ¶
- Type: str
Image name with stage in the registry.
e.g. username/image_name.
image_tag
Required ¶
- Type: str
Container image tag to pull from srcRegistry
and push to dstRegistry
.
docker_client_config
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.
do_dive_scan
Optional ¶
- Type: bool
- Default: true
Set to false
to skip the Dive scan job.
do_trivyignore_check
Optional ¶
- Type: bool
- Default: true
Set to false
to skip the existance check of the .trivyignore
file.
do_trivy_scan
Optional ¶
- Type: bool
- Default: true
Set to false
to skip the Trivy scan job.
dst_registry
Optional ¶
- Type: typing.Union[str, 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.
job_name
Optional ¶
- Type: str
The name of the Bootstrap job.
job_stage
Optional ¶
- Type: str
The stage of the Bootstrap job.
src_registry
Optional ¶
- Type: typing.Union[str, 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.
Methods ¶
Name | Description |
---|---|
add_children |
Add gcix.Job s or other gcix.JobCollection s to this JobCollection. |
add_dependencies |
No description. |
add_needs |
No description. |
add_parent |
No description. |
add_tags |
No description. |
add_variables |
No description. |
append_rules |
No description. |
append_scripts |
No description. |
assign_artifacts |
No description. |
assign_cache |
No description. |
get_all_instance_names |
Return all instance names from the given child. |
initialize_allow_failure |
Calling gcix.Job.assignAllowFailure() to all jobs within this JobCollection that haven't been set the allowFailure before. |
initialize_artifacts |
Sets gcix.Job.artifacts to all jobs within this JobCollection that haven't been set the artifacs before. |
initialize_cache |
Calling gcix.Job.assigneCache() to all jobs within this JobCollection that haven't been set the cache before. |
initialize_dependencies |
Calling gcix.Job.assignDependencies() to all jobs within the first stage of this JobCollection that haven't been added dependencies before. |
initialize_image |
Calling gcix.Job.assignImage() to all jobs within this JobCollection. |
initialize_needs |
Calling gcix.Job.assignNeeds() to all jobs within the first stage of this JobCollection that haven't been added needs before. |
initialize_rules |
Calling gcix.Job.append_rules() to all jobs within this JobCollection that haven't been added rules before. |
initialize_tags |
Calling gcix.Job.addTags([...]) to all jobs within this JobCollection that haven't been added tags before. |
initialize_variables |
Calling gcix.Job.addVariables({...}) to all jobs within this JobCollection that haven't been added variables before. |
is_equal |
isEqual checks if this object is equal to given object. |
override_allow_failure |
Calling gcix.Job.assignAllowFailure() to all jobs within this JobCollection overriding any previous set value. |
override_dependencies |
Calling gcix.Job.assignDependencies() to all jobs within the first stage of this JobCollection and overriding any previously added dependencies to that jobs. |
override_image |
Calling gcix.Job.assignImage() to all jobs within this JobCollection overriding any previous set value. |
override_needs |
Calling gcix.Job.assignNeeds() to all jobs within the first stage of this JobCollection and overriding any previously added needs to that jobs. |
override_rules |
Calling gcix.Job.overrideRules() to all jobs within this JobCollection and overriding any previously added rules to that jobs. |
override_tags |
Calling gcix.Job.addTags([...]) to all jobs within this JobCollection and overriding any previously added tags to that jobs. |
override_variables |
Calling gcix.Job.addVariables({...}) to all jobs within this JobCollection and overriding any previously added variables to that jobs. |
prepend_rules |
No description. |
prepend_scripts |
No description. |
render |
Returns a representation of any object which implements IBase . |
add_children
¶
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.
jobs_or_job_collections
Required ¶
- Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection]]
name
Optional ¶
- Type: str
stage
Optional ¶
- Type: str
add_dependencies
¶
dependencies
Required ¶
- Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]]
add_needs
¶
needs
Required ¶
- Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]]
add_parent
¶
parent
Required ¶
- Type: gcix.JobCollection
add_tags
¶
tags
Required ¶
- Type: typing.List[str]
add_variables
¶
variables
Required ¶
- Type: typing.Mapping[str]
append_rules
¶
rules
Required ¶
- Type: typing.List[gcix.Rule]
append_scripts
¶
scripts
Required ¶
- Type: typing.List[str]
assign_artifacts
¶
artifacts
Required ¶
- Type: gcix.Artifacts
assign_cache
¶
cache
Required ¶
- Type: gcix.Cache
get_all_instance_names
¶
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: typing.Union[gcix.Job, gcix.JobCollection]
initialize_allow_failure
¶
Calling gcix.Job.assignAllowFailure()
to all jobs within this JobCollection that haven't been set the allowFailure before.
allow_failure
Required ¶
- Type: typing.Union[bool, typing.List[typing.Union[int, float]]]
initialize_artifacts
¶
Sets gcix.Job.artifacts
to all jobs within this JobCollection that haven't been set the artifacs before.
artifacts
Required ¶
- Type: gcix.Artifacts
initialize_cache
¶
Calling gcix.Job.assigneCache()
to all jobs within this JobCollection that haven't been set the cache before.
cache
Required ¶
- Type: gcix.Cache
initialize_dependencies
¶
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: typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]]
initialize_image
¶
Calling gcix.Job.assignImage()
to all jobs within this JobCollection.
image
Required ¶
- Type: typing.Union[str, gcix.Image]
initialize_needs
¶
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: typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]]
initialize_rules
¶
Calling gcix.Job.append_rules()
to all jobs within this JobCollection that haven't been added rules before.
rules
Required ¶
- Type: typing.List[gcix.Rule]
initialize_tags
¶
Calling gcix.Job.addTags([...])
to all jobs within this JobCollection that haven't been added tags before.
tags
Required ¶
- Type: typing.List[str]
initialize_variables
¶
Calling gcix.Job.addVariables({...})
to all jobs within this JobCollection that haven't been added variables before.
variables
Required ¶
- Type: typing.Mapping[str]
is_equal
¶
isEqual
checks if this
object is equal to given object.
comparable
Required ¶
- Type: gcix.IBase
override_allow_failure
¶
Calling gcix.Job.assignAllowFailure()
to all jobs within this JobCollection overriding any previous set value.
allow_failure
Required ¶
- Type: typing.Union[bool, typing.List[typing.Union[int, float]]]
override_dependencies
¶
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: typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]]
override_image
¶
Calling gcix.Job.assignImage()
to all jobs within this JobCollection overriding any previous set value.
image
Required ¶
- Type: typing.Union[str, gcix.Image]
override_needs
¶
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: typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]]
override_rules
¶
Calling gcix.Job.overrideRules()
to all jobs within this JobCollection and overriding any previously added rules to that jobs.
rules
Required ¶
- Type: typing.List[gcix.Rule]
override_tags
¶
Calling gcix.Job.addTags([...])
to all jobs within this JobCollection and overriding any previously added tags to that jobs.
tags
Required ¶
- Type: typing.List[str]
override_variables
¶
Calling gcix.Job.addVariables({...})
to all jobs within this JobCollection and overriding any previously added variables to that jobs.
variables
Required ¶
- Type: typing.Mapping[str]
prepend_rules
¶
rules
Required ¶
- Type: typing.List[gcix.Rule]
prepend_scripts
¶
scripts
Required ¶
- Type: typing.List[str]
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 |
---|---|---|
last_jobs_executed |
typing.List[gcix.Job] |
This property returns all Jobs from the last stage of this JobCollection. |
nested_jobs |
typing.List[gcix.Job] |
No description. |
populated_jobs |
typing.List[gcix.Job] |
Returns a list with populated copies of all nested jobs of this JobCollection. |
children |
typing.List[gcix.ChildDict] |
No description. |
ordered_tags |
gcix.OrderedStringSet |
No description. |
ordered_tags_for_initialization |
gcix.OrderedStringSet |
No description. |
ordered_tags_for_replacement |
gcix.OrderedStringSet |
No description. |
parents |
typing.List[typing.Union[gcix.Job, gcix.JobCollection]] |
No description. |
allow_failure_for_initialization |
typing.Union[str, bool, typing.List[typing.Union[int, float]]] |
No description. |
allow_failure_for_replacement |
typing.Union[str, bool, typing.List[typing.Union[int, float]]] |
No description. |
artifacts |
gcix.Artifacts |
No description. |
artifacts_for_initialization |
gcix.Artifacts |
No description. |
artifacts_for_replacement |
gcix.Artifacts |
No description. |
cache |
gcix.Cache |
No description. |
cache_for_initialization |
gcix.Cache |
No description. |
dependencies |
typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]] |
No description. |
dependencies_for_initialization |
typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]] |
No description. |
dependencies_for_replacement |
typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]] |
No description. |
image_for_initialization |
typing.Union[str, gcix.Image] |
No description. |
image_for_replacement |
typing.Union[str, gcix.Image] |
No description. |
needs |
typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]] |
No description. |
needs_for_initialization |
typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]] |
No description. |
needs_for_replacement |
typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]] |
No description. |
rules_for_initialization |
typing.List[gcix.Rule] |
No description. |
rules_for_replacement |
typing.List[gcix.Rule] |
No description. |
rules_to_append |
typing.List[gcix.Rule] |
No description. |
rules_to_prepend |
typing.List[gcix.Rule] |
No description. |
scripts_to_append |
typing.List[str] |
No description. |
scripts_to_prepend |
typing.List[str] |
No description. |
variables |
typing.Mapping[str] |
No description. |
variables_for_initialization |
typing.Mapping[str] |
No description. |
variables_for_replacement |
typing.Mapping[str] |
No description. |
crane_pull_job |
CranePull |
CranPull job. |
crane_push_job |
CranePush |
No description. |
docker_client_config |
DockerClientConfig |
Creates the Docker configuration file base on objects settings, to authenticate against given registries. |
do_dive_scan |
bool |
Set to false to skip the Dive scan job. |
do_trivyignore_check |
bool |
Set to false to skip the existance check of the .trivyignore file. |
do_trivy_scan |
bool |
Set to false to skip the Trivy scan job. |
dst_registry |
typing.Union[str, Registry] |
Container registry to push the image to. |
image_name |
str |
Image name with stage in the registry. |
image_tag |
str |
Container image tag to pull from srcRegistry and push to dstRegistry . |
src_registry |
typing.Union[str, Registry] |
Container registry to pull the image from. |
dive_scan_job |
DiveScan |
Dive scan job. |
trivy_ignore_file_check_job |
TrivyIgnoreFileCheck |
Trivy ignore file check job. |
trivy_scan_local_image_job |
TrivyScanLocalImage |
Trivy scan local image job. |
last_jobs_executed
Required ¶
- Type: typing.List[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.
nested_jobs
Required ¶
- Type: typing.List[gcix.Job]
populated_jobs
Required ¶
- Type: typing.List[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: typing.List[gcix.ChildDict]
ordered_tags
Required ¶
- Type: gcix.OrderedStringSet
ordered_tags_for_initialization
Required ¶
- Type: gcix.OrderedStringSet
ordered_tags_for_replacement
Required ¶
- Type: gcix.OrderedStringSet
parents
Required ¶
- Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection]]
allow_failure_for_initialization
Optional ¶
- Type: typing.Union[str, bool, typing.List[typing.Union[int, float]]]
allow_failure_for_replacement
Optional ¶
- Type: typing.Union[str, bool, typing.List[typing.Union[int, float]]]
artifacts
Optional ¶
- Type: gcix.Artifacts
artifacts_for_initialization
Optional ¶
- Type: gcix.Artifacts
artifacts_for_replacement
Optional ¶
- Type: gcix.Artifacts
cache
Optional ¶
- Type: gcix.Cache
cache_for_initialization
Optional ¶
- Type: gcix.Cache
dependencies
Optional ¶
- Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]]
dependencies_for_initialization
Optional ¶
- Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]]
dependencies_for_replacement
Optional ¶
- Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]]
image_for_initialization
Optional ¶
- Type: typing.Union[str, gcix.Image]
image_for_replacement
Optional ¶
- Type: typing.Union[str, gcix.Image]
needs
Optional ¶
- Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]]
needs_for_initialization
Optional ¶
- Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]]
needs_for_replacement
Optional ¶
- Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]]
rules_for_initialization
Optional ¶
- Type: typing.List[gcix.Rule]
rules_for_replacement
Optional ¶
- Type: typing.List[gcix.Rule]
rules_to_append
Optional ¶
- Type: typing.List[gcix.Rule]
rules_to_prepend
Optional ¶
- Type: typing.List[gcix.Rule]
scripts_to_append
Optional ¶
- Type: typing.List[str]
scripts_to_prepend
Optional ¶
- Type: typing.List[str]
variables
Optional ¶
- Type: typing.Mapping[str]
variables_for_initialization
Optional ¶
- Type: typing.Mapping[str]
variables_for_replacement
Optional ¶
- Type: typing.Mapping[str]
crane_pull_job
Required ¶
- Type: CranePull
CranPull job.
crane_push_job
Required ¶
- Type: CranePush
docker_client_config
Required ¶
- Type: DockerClientConfig
Creates the Docker configuration file base on objects settings, to authenticate against given registries.
do_dive_scan
Required ¶
- Type: bool
Set to false
to skip the Dive scan job.
do_trivyignore_check
Required ¶
- Type: bool
Set to false
to skip the existance check of the .trivyignore
file.
do_trivy_scan
Required ¶
- Type: bool
Set to false
to skip the Trivy scan job.
dst_registry
Required ¶
- Type: typing.Union[str, Registry]
Container registry to push the image to.
If the container registry needs
authentication, you have to provide a DockerClientConfig
object with
credentials.
image_name
Required ¶
- Type: str
Image name with stage in the registry.
e.g. username/image_name.
image_tag
Required ¶
- Type: str
Container image tag to pull from srcRegistry
and push to dstRegistry
.
src_registry
Required ¶
- Type: typing.Union[str, Registry]
Container registry to pull the image from.
If the container registry needs
authentication, you have to provide a DockerClientConfig
object with
credentials.
dive_scan_job
Optional ¶
- Type: DiveScan
Dive scan job.
trivy_ignore_file_check_job
Optional ¶
- Type: TrivyIgnoreFileCheck
Trivy ignore file check job.
trivy_scan_local_image_job
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 |
---|---|---|
dst_registry |
typing.Union[str, Registry] |
Registry URL to copy container image to. |
src_registry |
typing.Union[str, Registry] |
Registry URL to copy container image from. |
docker_client_config |
DockerClientConfig |
Creates the Docker configuration file base on objects settings, used by crane to authenticate against given registries. |
job_name |
str |
The name of the Bootstrap job. |
job_stage |
str |
The stage of the Bootstrap job. |
dst_registry
Required ¶
- Type: typing.Union[str, Registry]
Registry URL to copy container image to.
src_registry
Required ¶
- Type: typing.Union[str, Registry]
Registry URL to copy container image from.
docker_client_config
Optional ¶
- Type: DockerClientConfig
Creates the Docker configuration file base on objects settings, used by crane to authenticate against given registries.
job_name
Optional ¶
- Type: str
The name of the Bootstrap job.
job_stage
Optional ¶
- Type: str
The stage of the Bootstrap job.
Methods ¶
Name | Description |
---|---|
add_dependencies |
No description. |
add_needs |
No description. |
add_parent |
This method is called by gcix.JobCollection s when the job is added to that JobCollection. |
add_tags |
No description. |
add_variables |
No description. |
append_rules |
No description. |
append_scripts |
No description. |
assign_allow_failure |
No description. |
assign_artifacts |
No description. |
assign_cache |
No description. |
assign_dependencies |
No description. |
assign_image |
Sets the image of this job. |
assign_needs |
No description. |
assign_tags |
No description. |
copy |
Returns an independent, deep copy object of this job. |
extend_name |
This method is used by gcix.JobCollection s to populate the jobs name. |
extend_stage |
This method is used by gcix.JobCollection s to populate the jobs name and stage. |
extend_stage_value |
This method is used by gcix.JobCollection s to populate the jobs stage. |
get_all_instance_names |
Return all instance names from the given child. |
is_equal |
isEqual checks if this object is equal to given object. |
prepend_rules |
No description. |
prepend_scripts |
No description. |
render |
Returns a representation of any object which implements IBase . |
add_dependencies
¶
dependencies
Required ¶
- Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]]
add_needs
¶
needs
Required ¶
- Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]]
add_parent
¶
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: typing.Union[gcix.Job, gcix.JobCollection]
add_tags
¶
tags
Required ¶
- Type: typing.List[str]
add_variables
¶
variables
Required ¶
- Type: typing.Mapping[str]
append_rules
¶
rules
Required ¶
- Type: typing.List[gcix.Rule]
append_scripts
¶
scripts
Required ¶
- Type: typing.List[str]
assign_allow_failure
¶
allow_failure
Required ¶
- Type: typing.Union[bool, typing.List[typing.Union[int, float]]]
assign_artifacts
¶
artifacts
Required ¶
- Type: gcix.Artifacts
assign_cache
¶
cache
Required ¶
- Type: gcix.Cache
assign_dependencies
¶
dependencies
Required ¶
- Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]]
assign_image
¶
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: typing.Union[str, gcix.Image]
assign_needs
¶
needs
Required ¶
- Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]]
assign_tags
¶
tags
Required ¶
- Type: typing.List[str]
copy
¶
Returns an independent, deep copy object of this job.
extend_name
¶
This method is used by gcix.JobCollection
s to populate the jobs name.
name
Required ¶
- Type: str
extend_stage
¶
This method is used by gcix.JobCollection
s to populate the jobs name and stage.
stage
Required ¶
- Type: str
extend_stage_value
¶
This method is used by gcix.JobCollection
s to populate the jobs stage.
stage
Required ¶
- Type: str
get_all_instance_names
¶
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: typing.Union[gcix.Job, gcix.JobCollection]
is_equal
¶
isEqual
checks if this
object is equal to given object.
comparable
Required ¶
- Type: gcix.IBase
prepend_rules
¶
rules
Required ¶
- Type: typing.List[gcix.Rule]
prepend_scripts
¶
scripts
Required ¶
- Type: typing.List[str]
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 |
typing.List[str] |
Getter method to receive added tags. |
allow_failure |
typing.Union[str, bool, typing.List[typing.Union[int, float]]] |
No description. |
name |
str |
No description. |
ordered_tags |
gcix.OrderedStringSet |
No description. |
parents |
typing.List[typing.Union[gcix.Job, gcix.JobCollection]] |
No description. |
scripts |
typing.List[str] |
No description. |
stage |
str |
No description. |
artifacts |
gcix.Artifacts |
No description. |
cache |
gcix.Cache |
No description. |
dependencies |
typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]] |
No description. |
image |
gcix.Image |
No description. |
needs |
typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]] |
No description. |
original |
gcix.Job |
No description. |
rules |
typing.List[gcix.Rule] |
No description. |
variables |
typing.Mapping[str] |
No description. |
dst_registry |
typing.Union[str, Registry] |
Registry URL to copy container image to. |
src_registry |
typing.Union[str, Registry] |
Registry URL to copy container image from. |
docker_client_config |
DockerClientConfig |
Creates the Docker configuration file base on objects settings, used by crane to authenticate against given registries. |
tags
Required ¶
- Type: typing.List[str]
Getter method to receive added tags.
allow_failure
Required ¶
- Type: typing.Union[str, bool, typing.List[typing.Union[int, float]]]
name
Required ¶
- Type: str
ordered_tags
Required ¶
- Type: gcix.OrderedStringSet
parents
Required ¶
- Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection]]
scripts
Required ¶
- Type: typing.List[str]
stage
Required ¶
- Type: str
artifacts
Optional ¶
- Type: gcix.Artifacts
cache
Optional ¶
- Type: gcix.Cache
dependencies
Optional ¶
- Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]]
image
Optional ¶
- Type: gcix.Image
needs
Optional ¶
- Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]]
original
Optional ¶
- Type: gcix.Job
rules
Optional ¶
- Type: typing.List[gcix.Rule]
variables
Optional ¶
- Type: typing.Mapping[str]
dst_registry
Required ¶
- Type: typing.Union[str, Registry]
Registry URL to copy container image to.
src_registry
Required ¶
- Type: typing.Union[str, Registry]
Registry URL to copy container image from.
docker_client_config
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 |
---|---|---|
src_registry |
typing.Union[str, Registry] |
Registry URL to pull container image from. |
docker_client_config |
DockerClientConfig |
Creates the Docker configuration file base on objects settings, to authenticate against given registries. |
image_name |
str |
Container image with namespace to pull from srcRegistry . |
image_tag |
str |
Tag of the image which will be pulled. |
job_name |
str |
The name of the Bootstrap job. |
job_stage |
str |
The stage of the Bootstrap job. |
tar_path |
str |
Path where to save the container image tarball. |
src_registry
Required ¶
- Type: typing.Union[str, Registry]
Registry URL to pull container image from.
docker_client_config
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.
image_name
Optional ¶
- Type: str
- Default: PredefinedVariables.ciProjectName
Container image with namespace to pull from srcRegistry
.
image_tag
Optional ¶
- Type: str
- Default: latest
Tag of the image which will be pulled.
job_name
Optional ¶
- Type: str
The name of the Bootstrap job.
job_stage
Optional ¶
- Type: str
The stage of the Bootstrap job.
tar_path
Optional ¶
- Type: str
- Default: PredefinedVariables.ciProjectDir
Path where to save the container image tarball.
Methods ¶
Name | Description |
---|---|
add_dependencies |
No description. |
add_needs |
No description. |
add_parent |
This method is called by gcix.JobCollection s when the job is added to that JobCollection. |
add_tags |
No description. |
add_variables |
No description. |
append_rules |
No description. |
append_scripts |
No description. |
assign_allow_failure |
No description. |
assign_artifacts |
No description. |
assign_cache |
No description. |
assign_dependencies |
No description. |
assign_image |
Sets the image of this job. |
assign_needs |
No description. |
assign_tags |
No description. |
copy |
Returns an independent, deep copy object of this job. |
extend_name |
This method is used by gcix.JobCollection s to populate the jobs name. |
extend_stage |
This method is used by gcix.JobCollection s to populate the jobs name and stage. |
extend_stage_value |
This method is used by gcix.JobCollection s to populate the jobs stage. |
get_all_instance_names |
Return all instance names from the given child. |
is_equal |
isEqual checks if this object is equal to given object. |
prepend_rules |
No description. |
prepend_scripts |
No description. |
render |
Returns a representation of any object which implements IBase . |
add_dependencies
¶
dependencies
Required ¶
- Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]]
add_needs
¶
needs
Required ¶
- Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]]
add_parent
¶
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: typing.Union[gcix.Job, gcix.JobCollection]
add_tags
¶
tags
Required ¶
- Type: typing.List[str]
add_variables
¶
variables
Required ¶
- Type: typing.Mapping[str]
append_rules
¶
rules
Required ¶
- Type: typing.List[gcix.Rule]
append_scripts
¶
scripts
Required ¶
- Type: typing.List[str]
assign_allow_failure
¶
allow_failure
Required ¶
- Type: typing.Union[bool, typing.List[typing.Union[int, float]]]
assign_artifacts
¶
artifacts
Required ¶
- Type: gcix.Artifacts
assign_cache
¶
cache
Required ¶
- Type: gcix.Cache
assign_dependencies
¶
dependencies
Required ¶
- Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]]
assign_image
¶
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: typing.Union[str, gcix.Image]
assign_needs
¶
needs
Required ¶
- Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]]
assign_tags
¶
tags
Required ¶
- Type: typing.List[str]
copy
¶
Returns an independent, deep copy object of this job.
extend_name
¶
This method is used by gcix.JobCollection
s to populate the jobs name.
name
Required ¶
- Type: str
extend_stage
¶
This method is used by gcix.JobCollection
s to populate the jobs name and stage.
stage
Required ¶
- Type: str
extend_stage_value
¶
This method is used by gcix.JobCollection
s to populate the jobs stage.
stage
Required ¶
- Type: str
get_all_instance_names
¶
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: typing.Union[gcix.Job, gcix.JobCollection]
is_equal
¶
isEqual
checks if this
object is equal to given object.
comparable
Required ¶
- Type: gcix.IBase
prepend_rules
¶
rules
Required ¶
- Type: typing.List[gcix.Rule]
prepend_scripts
¶
scripts
Required ¶
- Type: typing.List[str]
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 |
typing.List[str] |
Getter method to receive added tags. |
allow_failure |
typing.Union[str, bool, typing.List[typing.Union[int, float]]] |
No description. |
name |
str |
No description. |
ordered_tags |
gcix.OrderedStringSet |
No description. |
parents |
typing.List[typing.Union[gcix.Job, gcix.JobCollection]] |
No description. |
scripts |
typing.List[str] |
No description. |
stage |
str |
No description. |
artifacts |
gcix.Artifacts |
No description. |
cache |
gcix.Cache |
No description. |
dependencies |
typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]] |
No description. |
image |
gcix.Image |
No description. |
needs |
typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]] |
No description. |
original |
gcix.Job |
No description. |
rules |
typing.List[gcix.Rule] |
No description. |
variables |
typing.Mapping[str] |
No description. |
docker_client_config |
DockerClientConfig |
Creates the Docker configuration file base on objects settings, to authenticate against given registries. |
image_name |
str |
Container image with namespace to pull from srcRegistry . |
image_tag |
str |
Tag of the image which will be pulled. |
src_registry |
typing.Union[str, Registry] |
Registry URL to pull container image from. |
tar_path |
str |
Path where to save the container image tarball. |
tags
Required ¶
- Type: typing.List[str]
Getter method to receive added tags.
allow_failure
Required ¶
- Type: typing.Union[str, bool, typing.List[typing.Union[int, float]]]
name
Required ¶
- Type: str
ordered_tags
Required ¶
- Type: gcix.OrderedStringSet
parents
Required ¶
- Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection]]
scripts
Required ¶
- Type: typing.List[str]
stage
Required ¶
- Type: str
artifacts
Optional ¶
- Type: gcix.Artifacts
cache
Optional ¶
- Type: gcix.Cache
dependencies
Optional ¶
- Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]]
image
Optional ¶
- Type: gcix.Image
needs
Optional ¶
- Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]]
original
Optional ¶
- Type: gcix.Job
rules
Optional ¶
- Type: typing.List[gcix.Rule]
variables
Optional ¶
- Type: typing.Mapping[str]
docker_client_config
Required ¶
- Type: DockerClientConfig
Creates the Docker configuration file base on objects settings, to authenticate against given registries.
image_name
Required ¶
- Type: str
Container image with namespace to pull from srcRegistry
.
image_tag
Required ¶
- Type: str
Tag of the image which will be pulled.
src_registry
Required ¶
- Type: typing.Union[str, Registry]
Registry URL to pull container image from.
tar_path
Required ¶
- Type: str
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 |
---|---|---|
dst_registry |
typing.Union[str, Registry] |
Registry URL to copy container image to. |
docker_client_config |
DockerClientConfig |
Creates the Docker configuration file base on objects settings, to authenticate against given registries. |
image_name |
str |
Container image name, searched for in imagePath and gets .tar appended. |
image_tag |
str |
The tag the image will be tagged with. |
job_name |
str |
The name of the Bootstrap job. |
job_stage |
str |
The stage of the Bootstrap job. |
tar_path |
str |
Path where to find the container image tarball. |
dst_registry
Required ¶
- Type: typing.Union[str, Registry]
Registry URL to copy container image to.
docker_client_config
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
.
image_name
Optional ¶
- Type: str
- Default: PredefinedVariables.ciProjectName
Container image name, searched for in imagePath
and gets .tar
appended.
image_tag
Optional ¶
- Type: str
- Default: PredefinedVariables.ciCommitTag
The tag the image will be tagged with.
job_name
Optional ¶
- Type: str
The name of the Bootstrap job.
job_stage
Optional ¶
- Type: str
The stage of the Bootstrap job.
tar_path
Optional ¶
- Type: str
- Default: PredefinedVariables.ciProjectDir
Path where to find the container image tarball.
Methods ¶
Name | Description |
---|---|
add_dependencies |
No description. |
add_needs |
No description. |
add_parent |
This method is called by gcix.JobCollection s when the job is added to that JobCollection. |
add_tags |
No description. |
add_variables |
No description. |
append_rules |
No description. |
append_scripts |
No description. |
assign_allow_failure |
No description. |
assign_artifacts |
No description. |
assign_cache |
No description. |
assign_dependencies |
No description. |
assign_image |
Sets the image of this job. |
assign_needs |
No description. |
assign_tags |
No description. |
copy |
Returns an independent, deep copy object of this job. |
extend_name |
This method is used by gcix.JobCollection s to populate the jobs name. |
extend_stage |
This method is used by gcix.JobCollection s to populate the jobs name and stage. |
extend_stage_value |
This method is used by gcix.JobCollection s to populate the jobs stage. |
get_all_instance_names |
Return all instance names from the given child. |
is_equal |
isEqual checks if this object is equal to given object. |
prepend_rules |
No description. |
prepend_scripts |
No description. |
render |
Returns a representation of any object which implements IBase . |
add_dependencies
¶
dependencies
Required ¶
- Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]]
add_needs
¶
needs
Required ¶
- Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]]
add_parent
¶
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: typing.Union[gcix.Job, gcix.JobCollection]
add_tags
¶
tags
Required ¶
- Type: typing.List[str]
add_variables
¶
variables
Required ¶
- Type: typing.Mapping[str]
append_rules
¶
rules
Required ¶
- Type: typing.List[gcix.Rule]
append_scripts
¶
scripts
Required ¶
- Type: typing.List[str]
assign_allow_failure
¶
allow_failure
Required ¶
- Type: typing.Union[bool, typing.List[typing.Union[int, float]]]
assign_artifacts
¶
artifacts
Required ¶
- Type: gcix.Artifacts
assign_cache
¶
cache
Required ¶
- Type: gcix.Cache
assign_dependencies
¶
dependencies
Required ¶
- Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]]
assign_image
¶
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: typing.Union[str, gcix.Image]
assign_needs
¶
needs
Required ¶
- Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]]
assign_tags
¶
tags
Required ¶
- Type: typing.List[str]
copy
¶
Returns an independent, deep copy object of this job.
extend_name
¶
This method is used by gcix.JobCollection
s to populate the jobs name.
name
Required ¶
- Type: str
extend_stage
¶
This method is used by gcix.JobCollection
s to populate the jobs name and stage.
stage
Required ¶
- Type: str
extend_stage_value
¶
This method is used by gcix.JobCollection
s to populate the jobs stage.
stage
Required ¶
- Type: str
get_all_instance_names
¶
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: typing.Union[gcix.Job, gcix.JobCollection]
is_equal
¶
isEqual
checks if this
object is equal to given object.
comparable
Required ¶
- Type: gcix.IBase
prepend_rules
¶
rules
Required ¶
- Type: typing.List[gcix.Rule]
prepend_scripts
¶
scripts
Required ¶
- Type: typing.List[str]
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 |
typing.List[str] |
Getter method to receive added tags. |
allow_failure |
typing.Union[str, bool, typing.List[typing.Union[int, float]]] |
No description. |
name |
str |
No description. |
ordered_tags |
gcix.OrderedStringSet |
No description. |
parents |
typing.List[typing.Union[gcix.Job, gcix.JobCollection]] |
No description. |
scripts |
typing.List[str] |
No description. |
stage |
str |
No description. |
artifacts |
gcix.Artifacts |
No description. |
cache |
gcix.Cache |
No description. |
dependencies |
typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]] |
No description. |
image |
gcix.Image |
No description. |
needs |
typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]] |
No description. |
original |
gcix.Job |
No description. |
rules |
typing.List[gcix.Rule] |
No description. |
variables |
typing.Mapping[str] |
No description. |
docker_client_config |
DockerClientConfig |
Creates the Docker configuration file base on objects settings, to authenticate against given registries. |
dst_registry |
typing.Union[str, Registry] |
Registry URL to copy container image to. |
image_name |
str |
Container image name, searched for in imagePath and gets .tar appended. |
image_tag |
str |
The tag the image will be tagged with. |
tar_path |
str |
Path where to find the container image tarball. |
tags
Required ¶
- Type: typing.List[str]
Getter method to receive added tags.
allow_failure
Required ¶
- Type: typing.Union[str, bool, typing.List[typing.Union[int, float]]]
name
Required ¶
- Type: str
ordered_tags
Required ¶
- Type: gcix.OrderedStringSet
parents
Required ¶
- Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection]]
scripts
Required ¶
- Type: typing.List[str]
stage
Required ¶
- Type: str
artifacts
Optional ¶
- Type: gcix.Artifacts
cache
Optional ¶
- Type: gcix.Cache
dependencies
Optional ¶
- Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]]
image
Optional ¶
- Type: gcix.Image
needs
Optional ¶
- Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]]
original
Optional ¶
- Type: gcix.Job
rules
Optional ¶
- Type: typing.List[gcix.Rule]
variables
Optional ¶
- Type: typing.Mapping[str]
docker_client_config
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
.
dst_registry
Required ¶
- Type: typing.Union[str, Registry]
Registry URL to copy container image to.
image_name
Required ¶
- Type: str
Container image name, searched for in imagePath
and gets .tar
appended.
image_tag
Required ¶
- Type: str
The tag the image will be tagged with.
tar_path
Required ¶
- Type: str
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 |
---|---|---|
highest_user_wasted_percent |
typing.Union[int, float] |
Highest allowable percentage of bytes wasted (as a ratio between 0-1), otherwise CI validation will fail. |
highest_wasted_bytes |
typing.Union[int, float] |
Highest allowable bytes wasted, otherwise CI validation will fail. |
ignore_errors |
bool |
Ignore image parsing errors and run the analysis anyway. |
image_name |
str |
Name of the container image to scan, if source is docker-archive argument gets prefix .tar . |
image_path |
str |
Path to the image can be either a remote container registry, as well as a local path to an image. |
job_name |
str |
The name of the Bootstrap job. |
job_stage |
str |
The stage of the Bootstrap job. |
lowest_efficiency |
typing.Union[int, float] |
Lowest allowable image efficiency (as a ratio between 0-1), otherwise CI validation will fail. |
source |
str |
The container engine to fetch the image from. |
highest_user_wasted_percent
Optional ¶
- Type: typing.Union[int, float]
- Default: 0.1
Highest allowable percentage of bytes wasted (as a ratio between 0-1), otherwise CI validation will fail.
highest_wasted_bytes
Optional ¶
- Type: typing.Union[int, float]
Highest allowable bytes wasted, otherwise CI validation will fail.
ignore_errors
Optional ¶
- Type: bool
- Default: false
Ignore image parsing errors and run the analysis anyway.
image_name
Optional ¶
- Type: str
- Default: PredefinedVariables.ciProjectName
Name of the container image to scan, if source
is docker-archive
argument gets prefix .tar
.
image_path
Optional ¶
- Type: str
- Default: PredefinedVariables.ciProjectPath
Path to the image can be either a remote container registry, as well as a local path to an image.
job_name
Optional ¶
- Type: str
The name of the Bootstrap job.
job_stage
Optional ¶
- Type: str
The stage of the Bootstrap job.
lowest_efficiency
Optional ¶
- Type: typing.Union[int, float]
- Default: 0.9
Lowest allowable image efficiency (as a ratio between 0-1), otherwise CI validation will fail.
source
Optional ¶
- Type: str
- Default: "docker-archive
The container engine to fetch the image from.
Allowed values: docker, podman, docker-archive
Methods ¶
Name | Description |
---|---|
add_dependencies |
No description. |
add_needs |
No description. |
add_parent |
This method is called by gcix.JobCollection s when the job is added to that JobCollection. |
add_tags |
No description. |
add_variables |
No description. |
append_rules |
No description. |
append_scripts |
No description. |
assign_allow_failure |
No description. |
assign_artifacts |
No description. |
assign_cache |
No description. |
assign_dependencies |
No description. |
assign_image |
Sets the image of this job. |
assign_needs |
No description. |
assign_tags |
No description. |
copy |
Returns an independent, deep copy object of this job. |
extend_name |
This method is used by gcix.JobCollection s to populate the jobs name. |
extend_stage |
This method is used by gcix.JobCollection s to populate the jobs name and stage. |
extend_stage_value |
This method is used by gcix.JobCollection s to populate the jobs stage. |
get_all_instance_names |
Return all instance names from the given child. |
is_equal |
isEqual checks if this object is equal to given object. |
prepend_rules |
No description. |
prepend_scripts |
No description. |
render |
Returns a representation of any object which implements IBase . |
add_dependencies
¶
dependencies
Required ¶
- Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]]
add_needs
¶
needs
Required ¶
- Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]]
add_parent
¶
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: typing.Union[gcix.Job, gcix.JobCollection]
add_tags
¶
tags
Required ¶
- Type: typing.List[str]
add_variables
¶
variables
Required ¶
- Type: typing.Mapping[str]
append_rules
¶
rules
Required ¶
- Type: typing.List[gcix.Rule]
append_scripts
¶
scripts
Required ¶
- Type: typing.List[str]
assign_allow_failure
¶
allow_failure
Required ¶
- Type: typing.Union[bool, typing.List[typing.Union[int, float]]]
assign_artifacts
¶
artifacts
Required ¶
- Type: gcix.Artifacts
assign_cache
¶
cache
Required ¶
- Type: gcix.Cache
assign_dependencies
¶
dependencies
Required ¶
- Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]]
assign_image
¶
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: typing.Union[str, gcix.Image]
assign_needs
¶
needs
Required ¶
- Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]]
assign_tags
¶
tags
Required ¶
- Type: typing.List[str]
copy
¶
Returns an independent, deep copy object of this job.
extend_name
¶
This method is used by gcix.JobCollection
s to populate the jobs name.
name
Required ¶
- Type: str
extend_stage
¶
This method is used by gcix.JobCollection
s to populate the jobs name and stage.
stage
Required ¶
- Type: str
extend_stage_value
¶
This method is used by gcix.JobCollection
s to populate the jobs stage.
stage
Required ¶
- Type: str
get_all_instance_names
¶
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: typing.Union[gcix.Job, gcix.JobCollection]
is_equal
¶
isEqual
checks if this
object is equal to given object.
comparable
Required ¶
- Type: gcix.IBase
prepend_rules
¶
rules
Required ¶
- Type: typing.List[gcix.Rule]
prepend_scripts
¶
scripts
Required ¶
- Type: typing.List[str]
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 |
typing.List[str] |
Getter method to receive added tags. |
allow_failure |
typing.Union[str, bool, typing.List[typing.Union[int, float]]] |
No description. |
name |
str |
No description. |
ordered_tags |
gcix.OrderedStringSet |
No description. |
parents |
typing.List[typing.Union[gcix.Job, gcix.JobCollection]] |
No description. |
scripts |
typing.List[str] |
No description. |
stage |
str |
No description. |
artifacts |
gcix.Artifacts |
No description. |
cache |
gcix.Cache |
No description. |
dependencies |
typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]] |
No description. |
image |
gcix.Image |
No description. |
needs |
typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]] |
No description. |
original |
gcix.Job |
No description. |
rules |
typing.List[gcix.Rule] |
No description. |
variables |
typing.Mapping[str] |
No description. |
highest_user_wasted_percent |
typing.Union[int, float] |
Highest allowable percentage of bytes wasted (as a ratio between 0-1), otherwise CI validation will fail. |
ignore_errors |
bool |
Ignore image parsing errors and run the analysis anyway. |
image_name |
str |
Name of the container image to scan, if source is docker-archive argument gets prefix .tar . |
image_path |
str |
Path to the image can be either a remote container registry, as well as a local path to an image. |
lowest_efficiency |
typing.Union[int, float] |
Lowest allowable image efficiency (as a ratio between 0-1), otherwise CI validation will fail. |
source |
str |
The container engine to fetch the image from. |
highest_wasted_bytes |
typing.Union[int, float] |
Highest allowable bytes wasted, otherwise CI validation will fail. |
tags
Required ¶
- Type: typing.List[str]
Getter method to receive added tags.
allow_failure
Required ¶
- Type: typing.Union[str, bool, typing.List[typing.Union[int, float]]]
name
Required ¶
- Type: str
ordered_tags
Required ¶
- Type: gcix.OrderedStringSet
parents
Required ¶
- Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection]]
scripts
Required ¶
- Type: typing.List[str]
stage
Required ¶
- Type: str
artifacts
Optional ¶
- Type: gcix.Artifacts
cache
Optional ¶
- Type: gcix.Cache
dependencies
Optional ¶
- Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]]
image
Optional ¶
- Type: gcix.Image
needs
Optional ¶
- Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]]
original
Optional ¶
- Type: gcix.Job
rules
Optional ¶
- Type: typing.List[gcix.Rule]
variables
Optional ¶
- Type: typing.Mapping[str]
highest_user_wasted_percent
Required ¶
- Type: typing.Union[int, float]
Highest allowable percentage of bytes wasted (as a ratio between 0-1), otherwise CI validation will fail.
ignore_errors
Required ¶
- Type: bool
Ignore image parsing errors and run the analysis anyway.
image_name
Required ¶
- Type: str
Name of the container image to scan, if source
is docker-archive
argument gets prefix .tar
.
image_path
Required ¶
- Type: str
Path to the image can be either a remote container registry, as well as a local path to an image.
lowest_efficiency
Required ¶
- Type: typing.Union[int, float]
Lowest allowable image efficiency (as a ratio between 0-1), otherwise CI validation will fail.
source
Required ¶
- Type: str
The container engine to fetch the image from.
Allowed values: docker, podman, docker-archive
highest_wasted_bytes
Optional ¶
- Type: typing.Union[int, float]
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 |
---|---|---|
repository |
str |
The Docker repository name ([<registry>/]<image>) . |
context |
str |
The Docker build context (the directory containing the Dockerfile). |
job_name |
str |
The name of the Bootstrap job. |
job_stage |
str |
The stage of the Bootstrap job. |
tag |
str |
A Docker image tag applied to the image. |
repository
Required ¶
- Type: str
The Docker repository name ([<registry>/]<image>)
.
context
Optional ¶
- Type: str
- Default:
.
The Docker build context (the directory containing the Dockerfile).
job_name
Optional ¶
- Type: str
The name of the Bootstrap job.
job_stage
Optional ¶
- Type: str
The stage of the Bootstrap job.
tag
Optional ¶
- Type: str
A Docker image tag applied to the image.
If not set docker uses latest
Methods ¶
Name | Description |
---|---|
add_dependencies |
No description. |
add_needs |
No description. |
add_parent |
This method is called by gcix.JobCollection s when the job is added to that JobCollection. |
add_tags |
No description. |
add_variables |
No description. |
append_rules |
No description. |
append_scripts |
No description. |
assign_allow_failure |
No description. |
assign_artifacts |
No description. |
assign_cache |
No description. |
assign_dependencies |
No description. |
assign_image |
Sets the image of this job. |
assign_needs |
No description. |
assign_tags |
No description. |
copy |
Returns an independent, deep copy object of this job. |
extend_name |
This method is used by gcix.JobCollection s to populate the jobs name. |
extend_stage |
This method is used by gcix.JobCollection s to populate the jobs name and stage. |
extend_stage_value |
This method is used by gcix.JobCollection s to populate the jobs stage. |
get_all_instance_names |
Return all instance names from the given child. |
is_equal |
isEqual checks if this object is equal to given object. |
prepend_rules |
No description. |
prepend_scripts |
No description. |
render |
Returns a representation of any object which implements IBase . |
add_dependencies
¶
dependencies
Required ¶
- Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]]
add_needs
¶
needs
Required ¶
- Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]]
add_parent
¶
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: typing.Union[gcix.Job, gcix.JobCollection]
add_tags
¶
tags
Required ¶
- Type: typing.List[str]
add_variables
¶
variables
Required ¶
- Type: typing.Mapping[str]
append_rules
¶
rules
Required ¶
- Type: typing.List[gcix.Rule]
append_scripts
¶
scripts
Required ¶
- Type: typing.List[str]
assign_allow_failure
¶
allow_failure
Required ¶
- Type: typing.Union[bool, typing.List[typing.Union[int, float]]]
assign_artifacts
¶
artifacts
Required ¶
- Type: gcix.Artifacts
assign_cache
¶
cache
Required ¶
- Type: gcix.Cache
assign_dependencies
¶
dependencies
Required ¶
- Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]]
assign_image
¶
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: typing.Union[str, gcix.Image]
assign_needs
¶
needs
Required ¶
- Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]]
assign_tags
¶
tags
Required ¶
- Type: typing.List[str]
copy
¶
Returns an independent, deep copy object of this job.
extend_name
¶
This method is used by gcix.JobCollection
s to populate the jobs name.
name
Required ¶
- Type: str
extend_stage
¶
This method is used by gcix.JobCollection
s to populate the jobs name and stage.
stage
Required ¶
- Type: str
extend_stage_value
¶
This method is used by gcix.JobCollection
s to populate the jobs stage.
stage
Required ¶
- Type: str
get_all_instance_names
¶
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: typing.Union[gcix.Job, gcix.JobCollection]
is_equal
¶
isEqual
checks if this
object is equal to given object.
comparable
Required ¶
- Type: gcix.IBase
prepend_rules
¶
rules
Required ¶
- Type: typing.List[gcix.Rule]
prepend_scripts
¶
scripts
Required ¶
- Type: typing.List[str]
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 |
typing.List[str] |
Getter method to receive added tags. |
allow_failure |
typing.Union[str, bool, typing.List[typing.Union[int, float]]] |
No description. |
name |
str |
No description. |
ordered_tags |
gcix.OrderedStringSet |
No description. |
parents |
typing.List[typing.Union[gcix.Job, gcix.JobCollection]] |
No description. |
scripts |
typing.List[str] |
No description. |
stage |
str |
No description. |
artifacts |
gcix.Artifacts |
No description. |
cache |
gcix.Cache |
No description. |
dependencies |
typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]] |
No description. |
image |
gcix.Image |
No description. |
needs |
typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]] |
No description. |
original |
gcix.Job |
No description. |
rules |
typing.List[gcix.Rule] |
No description. |
variables |
typing.Mapping[str] |
No description. |
context |
str |
The Docker build context (the directory containing the Dockerfile). |
repository |
str |
The Docker repository name ([<registry>/]<image>) . |
tag |
str |
A Docker image tag applied to the image. |
tags
Required ¶
- Type: typing.List[str]
Getter method to receive added tags.
allow_failure
Required ¶
- Type: typing.Union[str, bool, typing.List[typing.Union[int, float]]]
name
Required ¶
- Type: str
ordered_tags
Required ¶
- Type: gcix.OrderedStringSet
parents
Required ¶
- Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection]]
scripts
Required ¶
- Type: typing.List[str]
stage
Required ¶
- Type: str
artifacts
Optional ¶
- Type: gcix.Artifacts
cache
Optional ¶
- Type: gcix.Cache
dependencies
Optional ¶
- Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]]
image
Optional ¶
- Type: gcix.Image
needs
Optional ¶
- Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]]
original
Optional ¶
- Type: gcix.Job
rules
Optional ¶
- Type: typing.List[gcix.Rule]
variables
Optional ¶
- Type: typing.Mapping[str]
context
Required ¶
- Type: str
The Docker build context (the directory containing the Dockerfile).
repository
Required ¶
- Type: str
The Docker repository name ([<registry>/]<image>)
.
tag
Required ¶
- Type: str
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 |
---|---|---|
config_file_path |
str |
Docker client config path. |
config_file_path
Optional ¶
- Type: str
- Default: $HOME/.docker/config.json
Docker client config path.
Methods ¶
Name | Description |
---|---|
add_auth |
Adds basic authentication auths setting to the configuration. |
add_cred_helper |
Adds a Credentials helper credHelpers for a registry. |
add_raw |
Adds arbitrary settings to configuration. |
assign_creds_store |
Sets the credsStore setting for clients. See docker login#credentials-store. |
shell_command |
Renders the shell command for creating the docker client config. |
add_auth
¶
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: str
Name of the container registry to set creds_helper
for.
username_env_var
Optional ¶
- Type: str
Name of the environment variable which as the registry username stored.
password_env_var
Optional ¶
- Type: str
Name of the environment variable which as the registry password stored.
add_cred_helper
¶
Adds a Credentials helper credHelpers
for a registry.
See docker login#credential-helpers
registry
Required ¶
- Type: str
Name of the container registry to set creds_helper
for.
cred_helper
Required ¶
- Type: str
Name of the credential helper to use together with the registry
.
add_raw
¶
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.
raw_input
Required ¶
- Type: typing.Mapping[typing.Any]
Dictionary of non-available settings to be set.
assign_creds_store
¶
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.
creds_store
Required ¶
- Type: str
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.
shell_command
¶
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. |
config_file_path |
str |
Docker client config path. |
config
Required ¶
- Type: IDockerClientConfigType
Docker client configuration.
config_file_path
Required ¶
- Type: str
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 |
---|---|---|
container_image |
str |
The name of the Docker image to push to the registry . |
job_name |
str |
The name of the Bootstrap job. |
job_stage |
str |
The stage of the Bootstrap job. |
login_env_var |
str |
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 |
str |
The Docker registry the image should be pushed to. |
tag |
str |
The Docker image tag that should be pushed to the registry . |
user_env_var |
str |
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. |
container_image
Required ¶
- Type: str
The name of the Docker image to push to the registry
.
job_name
Optional ¶
- Type: str
The name of the Bootstrap job.
job_stage
Optional ¶
- Type: str
The stage of the Bootstrap job.
login_env_var
Optional ¶
- Type: str
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: str
- Default: index.docker.io/v1
The Docker registry the image should be pushed to.
tag
Optional ¶
- Type: str
- Default:
latest
The Docker image tag that should be pushed to the registry
.
user_env_var
Optional ¶
- Type: str
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!
Methods ¶
Name | Description |
---|---|
add_dependencies |
No description. |
add_needs |
No description. |
add_parent |
This method is called by gcix.JobCollection s when the job is added to that JobCollection. |
add_tags |
No description. |
add_variables |
No description. |
append_rules |
No description. |
append_scripts |
No description. |
assign_allow_failure |
No description. |
assign_artifacts |
No description. |
assign_cache |
No description. |
assign_dependencies |
No description. |
assign_image |
Sets the image of this job. |
assign_needs |
No description. |
assign_tags |
No description. |
copy |
Returns an independent, deep copy object of this job. |
extend_name |
This method is used by gcix.JobCollection s to populate the jobs name. |
extend_stage |
This method is used by gcix.JobCollection s to populate the jobs name and stage. |
extend_stage_value |
This method is used by gcix.JobCollection s to populate the jobs stage. |
get_all_instance_names |
Return all instance names from the given child. |
is_equal |
isEqual checks if this object is equal to given object. |
prepend_rules |
No description. |
prepend_scripts |
No description. |
render |
Returns a representation of any object which implements IBase . |
add_dependencies
¶
dependencies
Required ¶
- Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]]
add_needs
¶
needs
Required ¶
- Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]]
add_parent
¶
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: typing.Union[gcix.Job, gcix.JobCollection]
add_tags
¶
tags
Required ¶
- Type: typing.List[str]
add_variables
¶
variables
Required ¶
- Type: typing.Mapping[str]
append_rules
¶
rules
Required ¶
- Type: typing.List[gcix.Rule]
append_scripts
¶
scripts
Required ¶
- Type: typing.List[str]
assign_allow_failure
¶
allow_failure
Required ¶
- Type: typing.Union[bool, typing.List[typing.Union[int, float]]]
assign_artifacts
¶
artifacts
Required ¶
- Type: gcix.Artifacts
assign_cache
¶
cache
Required ¶
- Type: gcix.Cache
assign_dependencies
¶
dependencies
Required ¶
- Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]]
assign_image
¶
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: typing.Union[str, gcix.Image]
assign_needs
¶
needs
Required ¶
- Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]]
assign_tags
¶
tags
Required ¶
- Type: typing.List[str]
copy
¶
Returns an independent, deep copy object of this job.
extend_name
¶
This method is used by gcix.JobCollection
s to populate the jobs name.
name
Required ¶
- Type: str
extend_stage
¶
This method is used by gcix.JobCollection
s to populate the jobs name and stage.
stage
Required ¶
- Type: str
extend_stage_value
¶
This method is used by gcix.JobCollection
s to populate the jobs stage.
stage
Required ¶
- Type: str
get_all_instance_names
¶
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: typing.Union[gcix.Job, gcix.JobCollection]
is_equal
¶
isEqual
checks if this
object is equal to given object.
comparable
Required ¶
- Type: gcix.IBase
prepend_rules
¶
rules
Required ¶
- Type: typing.List[gcix.Rule]
prepend_scripts
¶
scripts
Required ¶
- Type: typing.List[str]
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 |
typing.List[str] |
Getter method to receive added tags. |
allow_failure |
typing.Union[str, bool, typing.List[typing.Union[int, float]]] |
No description. |
name |
str |
No description. |
ordered_tags |
gcix.OrderedStringSet |
No description. |
parents |
typing.List[typing.Union[gcix.Job, gcix.JobCollection]] |
No description. |
scripts |
typing.List[str] |
No description. |
stage |
str |
No description. |
artifacts |
gcix.Artifacts |
No description. |
cache |
gcix.Cache |
No description. |
dependencies |
typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]] |
No description. |
image |
gcix.Image |
No description. |
needs |
typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]] |
No description. |
original |
gcix.Job |
No description. |
rules |
typing.List[gcix.Rule] |
No description. |
variables |
typing.Mapping[str] |
No description. |
container_image |
str |
The name of the Docker image to push to the registry . |
registry |
str |
The Docker registry the image should be pushed to. |
tag |
str |
The Docker image tag that should be pushed to the registry . |
login_env_var |
str |
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. |
user_env_var |
str |
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: typing.List[str]
Getter method to receive added tags.
allow_failure
Required ¶
- Type: typing.Union[str, bool, typing.List[typing.Union[int, float]]]
name
Required ¶
- Type: str
ordered_tags
Required ¶
- Type: gcix.OrderedStringSet
parents
Required ¶
- Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection]]
scripts
Required ¶
- Type: typing.List[str]
stage
Required ¶
- Type: str
artifacts
Optional ¶
- Type: gcix.Artifacts
cache
Optional ¶
- Type: gcix.Cache
dependencies
Optional ¶
- Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]]
image
Optional ¶
- Type: gcix.Image
needs
Optional ¶
- Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]]
original
Optional ¶
- Type: gcix.Job
rules
Optional ¶
- Type: typing.List[gcix.Rule]
variables
Optional ¶
- Type: typing.Mapping[str]
container_image
Required ¶
- Type: str
The name of the Docker image to push to the registry
.
registry
Required ¶
- Type: str
The Docker registry the image should be pushed to.
tag
Required ¶
- Type: str
The Docker image tag that should be pushed to the registry
.
login_env_var
Optional ¶
- Type: str
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!
user_env_var
Optional ¶
- Type: str
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 |
---|---|---|
build_args |
typing.Mapping[typing.Any] |
Container build arguments, used to instrument the container image build. |
build_target |
str |
For container multistage builds name of the build stage you want to create. |
context |
str |
Context which will be send to kaniko. |
docker_client_config |
DockerClientConfig |
Creates the Docker configuration file base on objects settings, to authenticate against given registries. |
dockerfile |
str |
Name of the dockerfile to use. |
enable_push |
bool |
Enable push to container registry, disabled to allow subsequent jobs to. |
image_name |
str |
Image name which will be created. |
image_tag |
str |
The tag the image will be tagged with. |
job_name |
str |
The name of the Bootstrap job. |
job_stage |
str |
The stage of the Bootstrap job. |
registries |
typing.Union[typing.List[str], typing.List[Registry]] |
List of container registries to push created image to. |
tar_path |
str |
Container images created by kaniko are tarball files. |
verbosity |
str |
Verbosity of kaniko logging. |
build_args
Optional ¶
- Type: typing.Mapping[typing.Any]
Container build arguments, used to instrument the container image build.
build_target
Optional ¶
- Type: str
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: str
Context which will be send to kaniko.
Defaults to None
which implies
the local directory is the context.
docker_client_config
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: str
- Default: "Dockerfile"
Name of the dockerfile to use.
File is relative to context.
enable_push
Optional ¶
- Type: bool
- Default: false act on container tarball.
Enable push to container registry, disabled to allow subsequent jobs to.
image_name
Optional ¶
- Type: str
- Default: PredefinedVariables.CI_PROJECT_NAME.
Image name which will be created.
image_tag
Optional ¶
- Type: str
- Default: PredefinedVariables.CI_COMMIT_TAG
The tag the image will be tagged with.
job_name
Optional ¶
- Type: str
The name of the Bootstrap job.
job_stage
Optional ¶
- Type: str
The stage of the Bootstrap job.
registries
Optional ¶
- Type: typing.Union[typing.List[str], typing.List[Registry]]
List of container registries to push created image to.
tar_path
Optional ¶
- Type: str
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: str
- Default: "info"
Verbosity of kaniko logging.
Methods ¶
Name | Description |
---|---|
add_dependencies |
No description. |
add_needs |
No description. |
add_parent |
This method is called by gcix.JobCollection s when the job is added to that JobCollection. |
add_tags |
No description. |
add_variables |
No description. |
append_rules |
No description. |
append_scripts |
No description. |
assign_allow_failure |
No description. |
assign_artifacts |
No description. |
assign_cache |
No description. |
assign_dependencies |
No description. |
assign_image |
Sets the image of this job. |
assign_needs |
No description. |
assign_tags |
No description. |
copy |
Returns an independent, deep copy object of this job. |
extend_name |
This method is used by gcix.JobCollection s to populate the jobs name. |
extend_stage |
This method is used by gcix.JobCollection s to populate the jobs name and stage. |
extend_stage_value |
This method is used by gcix.JobCollection s to populate the jobs stage. |
get_all_instance_names |
Return all instance names from the given child. |
is_equal |
isEqual checks if this object is equal to given object. |
prepend_rules |
No description. |
prepend_scripts |
No description. |
render |
Returns a representation of any object which implements IBase . |
add_dependencies
¶
dependencies
Required ¶
- Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]]
add_needs
¶
needs
Required ¶
- Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]]
add_parent
¶
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: typing.Union[gcix.Job, gcix.JobCollection]
add_tags
¶
tags
Required ¶
- Type: typing.List[str]
add_variables
¶
variables
Required ¶
- Type: typing.Mapping[str]
append_rules
¶
rules
Required ¶
- Type: typing.List[gcix.Rule]
append_scripts
¶
scripts
Required ¶
- Type: typing.List[str]
assign_allow_failure
¶
allow_failure
Required ¶
- Type: typing.Union[bool, typing.List[typing.Union[int, float]]]
assign_artifacts
¶
artifacts
Required ¶
- Type: gcix.Artifacts
assign_cache
¶
cache
Required ¶
- Type: gcix.Cache
assign_dependencies
¶
dependencies
Required ¶
- Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]]
assign_image
¶
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: typing.Union[str, gcix.Image]
assign_needs
¶
needs
Required ¶
- Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]]
assign_tags
¶
tags
Required ¶
- Type: typing.List[str]
copy
¶
Returns an independent, deep copy object of this job.
extend_name
¶
This method is used by gcix.JobCollection
s to populate the jobs name.
name
Required ¶
- Type: str
extend_stage
¶
This method is used by gcix.JobCollection
s to populate the jobs name and stage.
stage
Required ¶
- Type: str
extend_stage_value
¶
This method is used by gcix.JobCollection
s to populate the jobs stage.
stage
Required ¶
- Type: str
get_all_instance_names
¶
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: typing.Union[gcix.Job, gcix.JobCollection]
is_equal
¶
isEqual
checks if this
object is equal to given object.
comparable
Required ¶
- Type: gcix.IBase
prepend_rules
¶
rules
Required ¶
- Type: typing.List[gcix.Rule]
prepend_scripts
¶
scripts
Required ¶
- Type: typing.List[str]
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 |
typing.List[str] |
Getter method to receive added tags. |
allow_failure |
typing.Union[str, bool, typing.List[typing.Union[int, float]]] |
No description. |
name |
str |
No description. |
ordered_tags |
gcix.OrderedStringSet |
No description. |
parents |
typing.List[typing.Union[gcix.Job, gcix.JobCollection]] |
No description. |
scripts |
typing.List[str] |
No description. |
stage |
str |
No description. |
artifacts |
gcix.Artifacts |
No description. |
cache |
gcix.Cache |
No description. |
dependencies |
typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]] |
No description. |
image |
gcix.Image |
No description. |
needs |
typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]] |
No description. |
original |
gcix.Job |
No description. |
rules |
typing.List[gcix.Rule] |
No description. |
variables |
typing.Mapping[str] |
No description. |
context |
str |
Context which will be send to kaniko. |
docker_client_config |
DockerClientConfig |
Creates the Docker configuration file base on objects settings, to authenticate against given registries. |
dockerfile |
str |
Name of the dockerfile to use. |
enable_push |
bool |
Enable push to container registry, disabled to allow subsequent jobs to act on container tarball. |
image_name |
str |
Image name which will be created. |
image_tag |
str |
The tag the image will be tagged with. |
verbosity |
str |
Verbosity of kaniko logging. |
build_args |
typing.Mapping[typing.Any] |
Container build arguments, used to instrument the container image build. |
build_target |
str |
For container multistage builds name of the build stage you want to create. |
registries |
typing.Union[typing.List[str], typing.List[Registry]] |
List of container registries to push created image to. |
tar_path |
str |
Container images created by kaniko are tarball files. |
tags
Required ¶
- Type: typing.List[str]
Getter method to receive added tags.
allow_failure
Required ¶
- Type: typing.Union[str, bool, typing.List[typing.Union[int, float]]]
name
Required ¶
- Type: str
ordered_tags
Required ¶
- Type: gcix.OrderedStringSet
parents
Required ¶
- Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection]]
scripts
Required ¶
- Type: typing.List[str]
stage
Required ¶
- Type: str
artifacts
Optional ¶
- Type: gcix.Artifacts
cache
Optional ¶
- Type: gcix.Cache
dependencies
Optional ¶
- Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]]
image
Optional ¶
- Type: gcix.Image
needs
Optional ¶
- Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]]
original
Optional ¶
- Type: gcix.Job
rules
Optional ¶
- Type: typing.List[gcix.Rule]
variables
Optional ¶
- Type: typing.Mapping[str]
context
Required ¶
- Type: str
Context which will be send to kaniko.
docker_client_config
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: str
Name of the dockerfile to use.
File is relative to context.
enable_push
Required ¶
- Type: bool
Enable push to container registry, disabled to allow subsequent jobs to act on container tarball.
image_name
Required ¶
- Type: str
Image name which will be created.
image_tag
Required ¶
- Type: str
The tag the image will be tagged with.
verbosity
Required ¶
- Type: str
Verbosity of kaniko logging.
build_args
Optional ¶
- Type: typing.Mapping[typing.Any]
Container build arguments, used to instrument the container image build.
build_target
Optional ¶
- Type: str
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: typing.Union[typing.List[str], typing.List[Registry]]
List of container registries to push created image to.
tar_path
Optional ¶
- Type: str
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.Image |
A predefined Alpine Git container image object. |
BUSYBOX |
gcix.Image |
A predefined Busybox container image object. |
CRANE |
gcix.Image |
A predefined Crane container image object. |
DIVE |
gcix.Image |
A predefined Dive container image object. |
GCIP |
gcix.Image |
A predefined GCIP container image object. |
GCIX |
gcix.Image |
A predefined GCIX container image object. |
KANIKO |
gcix.Image |
A predefined Kaniko container image object. |
TRIVY |
gcix.Image |
A predefined Trivy container image object. |
ALPINE_GIT
Required ¶
- Type: gcix.Image
A predefined Alpine Git container image object.
This image is useful for Git operations within containers.
BUSYBOX
Required ¶
- Type: gcix.Image
A predefined Busybox container image object.
CRANE
Required ¶
- Type: gcix.Image
A predefined Crane container image object.
DIVE
Required ¶
- Type: gcix.Image
A predefined Dive container image object.
GCIP
Required ¶
- Type: gcix.Image
A predefined GCIP container image object.
GCIX
Required ¶
- Type: gcix.Image
A predefined GCIX container image object.
KANIKO
Required ¶
- Type: gcix.Image
A predefined Kaniko container image object.
TRIVY
Required ¶
- Type: 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.
account_id
Optional ¶
- Type: str
- Default: AWSAccount.awsAccountId()
AWS account id.
region
Optional ¶
- Type: str
- Default: AWSAccount.awsRegion()
AWS region where the ECR repository lives in.
Constants ¶
Name | Type | Description |
---|---|---|
DOCKER |
str |
No description. |
GCR |
str |
No description. |
QUAY |
str |
No description. |