.gitlab-ci.yml Part Seven – Basics Of Interruptible Resource Group Trigger

.gitlab-ci.yml Part Seven – Basics Of Interruptible Resource Group Trigger

.gitlab-ci.yml Part Seven – Basics Of Interruptible Resource Group Trigger

Hello Everyone

Welcome to CloudAffaire and this is Debjeet.

In the last blog post, we have discussed .gitlab-ci.yml features like cache, artifacts and dependencies.

https://cloudaffaire.com/gitlab-ci-yml-part-six-basics-of-cache-artifacts-dependencies/

In this blog post, we will discuss .gitlab-ci.yml features like interruptible, resource_group and trigger.

interruptible:

interruptible is used to indicate that a job should be canceled if made redundant by a newer pipeline run. Defaults to false. This value will only be used if the automatic cancellation of redundant pipelines feature is enabled. When enabled, a pipeline on the same branch will be canceled when it is made redundant by a newer pipeline run or either all jobs are set as interruptible, or any uninterruptible jobs have not started. Pending jobs are always considered interruptible.

.gitlab-ci.yml Part Seven – Basics Of Interruptible Resource Group Trigger

resource_group:

Sometimes running multiples jobs or pipelines at the same time in an environment can lead to errors during the deployment. To avoid these errors, the resource_group attribute can be used to ensure that the Runner will not run certain jobs simultaneously. When the resource_group key is defined for a job in .gitlab-ci.yml, job executions are mutually exclusive across different pipelines for the same project. If multiple jobs belonging to the same resource group are enqueued simultaneously, only one of the jobs will be picked by the Runner, and the other jobs will wait until the resource_group is free.

trigger:

trigger allows you to define downstream pipeline trigger. When a job created from trigger definition is started by GitLab, a downstream pipeline gets created.

Hope you enjoyed this article. In the next blog post, we will continue our discussion .gitlab-ci.yml.

To get more details on GitLab you can follow the below link.

https://docs.gitlab.com/ee/README.html

To Get more details on Git you can follow the below links.

https://cloudaffaire.com/category/devops/git/

https://git-scm.com/doc

 

Leave a Reply

Close Menu