git
Submodule ¶
Structs ¶
GitMirrorProps ¶
Initializer ¶
Properties ¶
Name | Type | Description |
---|---|---|
remote_repository |
str |
The git repository the code of the pipelines repository should be mirrored to. |
git_config_user_email |
str |
The 'user.email' with which the commits to the remote repository should be made. Defaults to GITLAB_USER_EMAIL. |
git_config_user_name |
str |
The 'user.name' with which the commits to the remote repository should be made. Defaults to GITLAB_USER_NAME. |
job_name |
str |
The name of the Bootstrap job. |
job_stage |
str |
The stage of the Bootstrap job. |
private_key_variable |
str |
DO NOT PROVIDE YOUR PRIVATE SSH KEY HERE!!! This parameter takes the name of the Gitlab environment variable, which contains the private ssh key used to push to the remote repository. This one should be created as protected and masked variable in the 'CI/CD' settings of your project. |
run_only_for_repository_url |
str |
When mirroring to a remote Gitlab instance, you don't want to run this mirroring job there again. |
script_hook |
typing.List[str] |
This list of strings could contain any commands that should be executed between pulling the current repository and pushing it to the remote. |
remote_repository
Required ¶
- Type: str
The git repository the code of the pipelines repository should be mirrored to.
git_config_user_email
Optional ¶
- Type: str
The 'user.email' with which the commits to the remote repository should be made. Defaults to GITLAB_USER_EMAIL.
git_config_user_name
Optional ¶
- Type: str
The 'user.name' with which the commits to the remote repository should be made. Defaults to GITLAB_USER_NAME.
job_name
Optional ¶
- Type: str
The name of the Bootstrap job.
job_stage
Optional ¶
- Type: str
The stage of the Bootstrap job.
private_key_variable
Optional ¶
- Type: str
DO NOT PROVIDE YOUR PRIVATE SSH KEY HERE!!! This parameter takes the name of the Gitlab environment variable, which contains the private ssh key used to push to the remote repository. This one should be created as protected and masked variable in the 'CI/CD' settings of your project.
run_only_for_repository_url
Optional ¶
- Type: str
When mirroring to a remote Gitlab instance, you don't want to run this mirroring job there again.
With this variable the job only runs, when its value matches the CI_REPOSITORY_URL of the current repository.
script_hook
Optional ¶
- Type: typing.List[str]
This list of strings could contain any commands that should be executed between pulling the current repository and pushing it to the remote.
This hook is mostly meant to be for git configuration commands, required to push to the remote repository.
Classes ¶
GitMirror ¶
- Implements: IGitMirror
This job clones the CI_COMMIT_REF_NAME of the current repository and forcefully pushes this REF to the remote_repository
.
This subclass of Job
will configure following defaults for the superclass:
- name: git-mirror
- stage: deploy
- image: PredefinedImages.ALPINE_GIT
Initializers ¶
Name | Type | Description |
---|---|---|
remote_repository |
str |
The git repository the code of the pipelines repository should be mirrored to. |
git_config_user_email |
str |
The 'user.email' with which the commits to the remote repository should be made. Defaults to GITLAB_USER_EMAIL. |
git_config_user_name |
str |
The 'user.name' with which the commits to the remote repository should be made. Defaults to GITLAB_USER_NAME. |
job_name |
str |
The name of the Bootstrap job. |
job_stage |
str |
The stage of the Bootstrap job. |
private_key_variable |
str |
DO NOT PROVIDE YOUR PRIVATE SSH KEY HERE!!! This parameter takes the name of the Gitlab environment variable, which contains the private ssh key used to push to the remote repository. This one should be created as protected and masked variable in the 'CI/CD' settings of your project. |
run_only_for_repository_url |
str |
When mirroring to a remote Gitlab instance, you don't want to run this mirroring job there again. |
script_hook |
typing.List[str] |
This list of strings could contain any commands that should be executed between pulling the current repository and pushing it to the remote. |
remote_repository
Required ¶
- Type: str
The git repository the code of the pipelines repository should be mirrored to.
git_config_user_email
Optional ¶
- Type: str
The 'user.email' with which the commits to the remote repository should be made. Defaults to GITLAB_USER_EMAIL.
git_config_user_name
Optional ¶
- Type: str
The 'user.name' with which the commits to the remote repository should be made. Defaults to GITLAB_USER_NAME.
job_name
Optional ¶
- Type: str
The name of the Bootstrap job.
job_stage
Optional ¶
- Type: str
The stage of the Bootstrap job.
private_key_variable
Optional ¶
- Type: str
DO NOT PROVIDE YOUR PRIVATE SSH KEY HERE!!! This parameter takes the name of the Gitlab environment variable, which contains the private ssh key used to push to the remote repository. This one should be created as protected and masked variable in the 'CI/CD' settings of your project.
run_only_for_repository_url
Optional ¶
- Type: str
When mirroring to a remote Gitlab instance, you don't want to run this mirroring job there again.
With this variable the job only runs, when its value matches the CI_REPOSITORY_URL of the current repository.
script_hook
Optional ¶
- Type: typing.List[str]
This list of strings could contain any commands that should be executed between pulling the current repository and pushing it to the remote.
This hook is mostly meant to be for git configuration commands, required to push to the remote repository.
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. |
git_config_user_email |
str |
The 'user.email' with which the commits to the remote repository should be made. Defaults to GITLAB_USER_EMAIL. |
git_config_user_name |
str |
The 'user.name' with which the commits to the remote repository should be made. Defaults to GITLAB_USER_NAME. |
remote_repository |
str |
The git repository the code of the pipelines repository should be mirrored to. |
script_hook |
typing.List[str] |
This list of strings could contain any commands that should be executed between pulling the current repository and pushing it to the remote. |
private_key_variable |
str |
DO NOT PROVIDE YOUR PRIVATE SSH KEY HERE!!! This parameter takes the name of the Gitlab environment variable, which contains the private ssh key used to push to the remote repository. This one should be created as protected and masked variable in the 'CI/CD' settings of your project. |
run_only_for_repository_url |
str |
When mirroring to a remote Gitlab instance, you don't want to run this mirroring job there again. |
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]
git_config_user_email
Required ¶
- Type: str
The 'user.email' with which the commits to the remote repository should be made. Defaults to GITLAB_USER_EMAIL.
git_config_user_name
Required ¶
- Type: str
The 'user.name' with which the commits to the remote repository should be made. Defaults to GITLAB_USER_NAME.
remote_repository
Required ¶
- Type: str
The git repository the code of the pipelines repository should be mirrored to.
script_hook
Required ¶
- Type: typing.List[str]
This list of strings could contain any commands that should be executed between pulling the current repository and pushing it to the remote.
This hook is mostly meant to be for git configuration commands, required to push to the remote repository.
private_key_variable
Optional ¶
- Type: str
DO NOT PROVIDE YOUR PRIVATE SSH KEY HERE!!! This parameter takes the name of the Gitlab environment variable, which contains the private ssh key used to push to the remote repository. This one should be created as protected and masked variable in the 'CI/CD' settings of your project.
run_only_for_repository_url
Optional ¶
- Type: str
When mirroring to a remote Gitlab instance, you don't want to run this mirroring job there again.
With this variable the job only runs, when its value matches the CI_REPOSITORY_URL of the current repository.
Protocols ¶
IGitMirror ¶
- Implemented By: gcix.aws.CdkMirrorToCodecommit, GitMirror, gcix.aws.ICdkMirrorToCodecommit, IGitMirror
Properties ¶
Name | Type | Description |
---|---|---|
git_config_user_email |
str |
The 'user.email' with which the commits to the remote repository should be made. Defaults to GITLAB_USER_EMAIL. |
git_config_user_name |
str |
The 'user.name' with which the commits to the remote repository should be made. Defaults to GITLAB_USER_NAME. |
remote_repository |
str |
The git repository the code of the pipelines repository should be mirrored to. |
script_hook |
typing.List[str] |
This list of strings could contain any commands that should be executed between pulling the current repository and pushing it to the remote. |
private_key_variable |
str |
DO NOT PROVIDE YOUR PRIVATE SSH KEY HERE!!! This parameter takes the name of the Gitlab environment variable, which contains the private ssh key used to push to the remote repository. This one should be created as protected and masked variable in the 'CI/CD' settings of your project. |
run_only_for_repository_url |
str |
When mirroring to a remote Gitlab instance, you don't want to run this mirroring job there again. |
git_config_user_email
Required ¶
- Type: str
The 'user.email' with which the commits to the remote repository should be made. Defaults to GITLAB_USER_EMAIL.
git_config_user_name
Required ¶
- Type: str
The 'user.name' with which the commits to the remote repository should be made. Defaults to GITLAB_USER_NAME.
remote_repository
Required ¶
- Type: str
The git repository the code of the pipelines repository should be mirrored to.
script_hook
Required ¶
- Type: typing.List[str]
This list of strings could contain any commands that should be executed between pulling the current repository and pushing it to the remote.
This hook is mostly meant to be for git configuration commands, required to push to the remote repository.
private_key_variable
Optional ¶
- Type: str
DO NOT PROVIDE YOUR PRIVATE SSH KEY HERE!!! This parameter takes the name of the Gitlab environment variable, which contains the private ssh key used to push to the remote repository. This one should be created as protected and masked variable in the 'CI/CD' settings of your project.
run_only_for_repository_url
Optional ¶
- Type: str
When mirroring to a remote Gitlab instance, you don't want to run this mirroring job there again.
With this variable the job only runs, when its value matches the CI_REPOSITORY_URL of the current repository.
Created: November 14, 2023