.gitlab-ci.yml Part Nine – Basics Of Default Inherit

.gitlab-ci.yml Part Nine – Basics Of Default Inherit

.gitlab-ci.yml Part Nine – Basics Of Default Inherit

Hello Everyone

Welcome to CloudAffaire and this is Debjeet.

In the last blog post, we have discussed .gitlab-ci.yml features like include, extends and pages.

https://cloudaffaire.com/gitlab-ci-yml-part-eight-basics-of-include-extends-pages/

In this blog post, we will discuss .gitlab-ci.yml features like default and inherit.

default:

Some parameters can be set globally as the default for all jobs using the default: keyword. Default parameters can then be overridden by job-specific configuration. The following job parameters can be defined inside a default: block:

  • image
  • services
  • before_script
  • after_script
  • tags
  • cache
  • artifacts
  • retry
  • timeout
  • interruptible

inherit:

You can disable inheritance of globally defined defaults and variables with the inherit: parameter. To enable or disable the inheritance of all variables: or default: parameters, use the following format:

  • default: true or default: false
  • variables: true or variables: false

To inherit only a subset of default: parameters or variables:, specify what you wish to inherit in an array, and any not listed will not be inherited.

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