{"id":49496,"date":"2025-05-27T03:32:36","date_gmt":"2025-05-27T03:32:36","guid":{"rendered":"https:\/\/www.devopsschool.com\/blog\/?p=49496"},"modified":"2025-06-09T04:04:08","modified_gmt":"2025-06-09T04:04:08","slug":"gitlab-ci-cd-pipeline-configuration-keywords","status":"publish","type":"post","link":"https:\/\/www.devopsschool.com\/blog\/gitlab-ci-cd-pipeline-configuration-keywords\/","title":{"rendered":"GitLab CI\/CD Pipeline Configuration Keywords"},"content":{"rendered":"\n<figure class=\"wp-block-image\"><a href=\"https:\/\/blog.cubos.io\/conhecendo-o-gitlab-ci-cd\/\" target=\"_blank\" rel=\"noopener\"><img decoding=\"async\" src=\"https:\/\/tse4.mm.bing.net\/th?id=OIP.yPt5ior-aLsOwKcUguheHwHaEG&amp;pid=Api\" alt=\"Conhecendo o GitLab CI\/CD\"\/><\/a><\/figure>\n\n\n\n<p>Below is a comprehensive table listing the key stanzas (keywords) used in GitLab CI\/CD pipeline configuration files (<code>.gitlab-ci.yml<\/code>). These keywords are categorized based on their scope and functionality. This information is based on GitLab&#8217;s official documentation as of version 18.0.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">\ud83d\udcd8 GitLab CI\/CD Pipeline Configuration Keywords<\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th><strong>Keyword<\/strong><\/th><th><strong>Scope<\/strong><\/th><th><strong>Description<\/strong><\/th><\/tr><\/thead><tbody><tr><td><code><a href=\"https:\/\/www.bestdevops.com\/gitlab-pipeline-what-is-stages-in-gitlab-ci-cd\/\" target=\"_blank\" rel=\"noopener\">stages<\/a><\/code><\/td><td>Global<\/td><td>Defines the stages of the pipeline (e.g., build, test, deploy).<\/td><\/tr><tr><td><code><a href=\"https:\/\/www.bestdevops.com\/gitlab-pipeline-default-what-is-default-in-gitlab-ci-cd\/\" target=\"_blank\" rel=\"noopener\">default<\/a><\/code><\/td><td>Global<\/td><td>Sets default values for jobs.<\/td><\/tr><tr><td><code><a href=\"https:\/\/www.bestdevops.com\/gitlab-pipeline-inlcude-what-is-include-in-gitlab-ci-cd\/\" target=\"_blank\" rel=\"noopener\">include<\/a><\/code><\/td><td>Global<\/td><td>Includes external YAML files into the pipeline configuration.<\/td><\/tr><tr><td><code><a href=\"https:\/\/www.bestdevops.com\/gitlab-pipeline-workflow-what-is-workflow-in-gitlab-ci-cd\/\" target=\"_blank\" rel=\"noopener\">workflow<\/a><\/code><\/td><td>Global<\/td><td>Defines conditions to control pipeline creation.<\/td><\/tr><tr><td><code><a href=\"https:\/\/www.bestdevops.com\/gitlab-pipeline-variables-what-is-variables-in-gitlab-ci-cd\/\" target=\"_blank\" rel=\"noopener\">variables<\/a><\/code><\/td><td>Global\/Job<\/td><td>Defines CI\/CD variables.<\/td><\/tr><tr><td><code><a href=\"https:\/\/www.bestdevops.com\/gitlab-pipeline-image-what-is-image-in-gitlab-ci-cd\/\" target=\"_blank\" rel=\"noopener\">image<\/a><\/code><\/td><td>Global\/Job<\/td><td>Specifies the Docker image to use for jobs.<\/td><\/tr><tr><td><code><a href=\"https:\/\/www.bestdevops.com\/gitlab-pipeline-services-what-is-services-in-gitlab-ci-cd\/\" target=\"_blank\" rel=\"noopener\">services<\/a><\/code><\/td><td>Global\/Job<\/td><td>Defines additional Docker services for jobs.<\/td><\/tr><tr><td><code><a href=\"https:\/\/www.bestdevops.com\/gitlab-pipeline-before_script-what-is-before_script-in-gitlab-ci-cd\/\" target=\"_blank\" rel=\"noopener\">before_script<\/a><\/code><\/td><td>Global\/Job<\/td><td>Scripts to run before each job&#8217;s <code>script<\/code>.<\/td><\/tr><tr><td><code><a href=\"https:\/\/www.bestdevops.com\/gitlab-pipeline-after_script-what-is-after_script-in-gitlab-ci-cd\/\" target=\"_blank\" rel=\"noopener\">after_script<\/a><\/code><\/td><td>Global\/Job<\/td><td>Scripts to run after each job&#8217;s <code>script<\/code>, regardless of success or failure.<\/td><\/tr><tr><td><code><a href=\"https:\/\/www.bestdevops.com\/gitlab-pipeline-cache-what-is-cache-in-gitlab-ci-cd\/\" target=\"_blank\" rel=\"noopener\">cache<\/a><\/code><\/td><td>Global\/Job<\/td><td>Specifies files to cache between jobs.<\/td><\/tr><tr><td><code><a href=\"https:\/\/www.bestdevops.com\/gitlab-pipeline-pages-what-is-pages-in-gitlab-ci-cd\/\" target=\"_blank\" rel=\"noopener\">pages<\/a><\/code><\/td><td>Job<\/td><td>Defines a job that uploads content to GitLab Pages.<\/td><\/tr><tr><td><code><a href=\"https:\/\/www.bestdevops.com\/gitlab-pipeline-script-what-is-script-in-gitlab-ci-cd\/\" target=\"_blank\" rel=\"noopener\">script<\/a><\/code><\/td><td>Job<\/td><td>The shell commands to execute in the job.<\/td><\/tr><tr><td><code><a href=\"https:\/\/www.bestdevops.com\/gitlab-pipeline-stage-what-is-stage-in-gitlab-ci-cd\/\" target=\"_blank\" rel=\"noopener\">stage<\/a><\/code><\/td><td>Job<\/td><td>Assigns the job to a stage.<\/td><\/tr><tr><td><code>only<\/code><\/td><td>Job<\/td><td>Specifies the conditions to include the job. <em>(Deprecated in favor of <code>rules<\/code>)<\/em><\/td><\/tr><tr><td><code><a href=\"https:\/\/www.bestdevops.com\/gitlab-pipeline-stages-what-is-stages-in-gitlab-ci-cd\/\" target=\"_blank\" rel=\"noopener\">except<\/a><\/code><\/td><td>Job<\/td><td>Specifies the conditions to exclude the job. <em>(Deprecated in favor of <code>rules<\/code>)<\/em><\/td><\/tr><tr><td><code><a href=\"https:\/\/www.bestdevops.com\/gitlab-pipeline-rules-what-is-rules-in-gitlab-ci-cd\/\" target=\"_blank\" rel=\"noopener\">rules<\/a><\/code><\/td><td>Job<\/td><td>Specifies conditions to include\/exclude jobs.<\/td><\/tr><tr><td><code><a href=\"https:\/\/www.bestdevops.com\/gitlab-pipeline-needs-what-is-needs-in-gitlab-ci-cd\/\" target=\"_blank\" rel=\"noopener\">needs<\/a><\/code><\/td><td>Job<\/td><td>Defines job dependencies and allows out-of-order execution.<\/td><\/tr><tr><td><code><a href=\"https:\/\/www.bestdevops.com\/gitlab-pipeline-dependencies-what-is-dependencies-in-gitlab-ci-cd\/\" target=\"_blank\" rel=\"noopener\">dependencies<\/a><\/code><\/td><td>Job<\/td><td>Specifies artifacts to pass between jobs.<\/td><\/tr><tr><td><code><a href=\"https:\/\/www.bestdevops.com\/gitlab-pipeline-artifacts-what-is-artifacts-in-gitlab-ci-cd\/\" target=\"_blank\" rel=\"noopener\">artifacts<\/a><\/code><\/td><td>Job<\/td><td>Defines files to save after job completion.<\/td><\/tr><tr><td><code>retry<\/code><\/td><td>Job<\/td><td>Specifies the number of retries for a job on failure.<\/td><\/tr><tr><td><code><a href=\"https:\/\/www.bestdevops.com\/gitlab-pipeline-timeout-what-is-timeout-in-gitlab-ci-cd\/\" target=\"_blank\" rel=\"noopener\">timeout<\/a><\/code><\/td><td>Job<\/td><td>Sets a timeout for the job.<\/td><\/tr><tr><td><code>when<\/code><\/td><td>Job<\/td><td>Specifies when to run the job (e.g., on_success, manual).<\/td><\/tr><tr><td><code><a href=\"https:\/\/www.bestdevops.com\/gitlab-pipeline-allow_failure-what-is-allow_failure-in-gitlab-ci-cd\/\" target=\"_blank\" rel=\"noopener\">allow_failure<\/a><\/code><\/td><td>Job<\/td><td>Allows the job to fail without failing the pipeline.<\/td><\/tr><tr><td><code><a href=\"https:\/\/www.bestdevops.com\/gitlab-pipeline-parrallel-what-is-parrallel-in-gitlab-ci-cd\/\" target=\"_blank\" rel=\"noopener\">parallel<\/a><\/code><\/td><td>Job<\/td><td>Defines parallel execution of a job.<\/td><\/tr><tr><td><code><a href=\"https:\/\/www.bestdevops.com\/gitlab-pipeline-trigger-what-is-trigger-in-gitlab-ci-cd\/\" target=\"_blank\" rel=\"noopener\">trigger<\/a><\/code><\/td><td>Job<\/td><td>Triggers a downstream pipeline.<\/td><\/tr><tr><td><code><a href=\"https:\/\/www.bestdevops.com\/gitlab-pipeline-extends-what-is-extends-in-gitlab-ci-cd\/\" target=\"_blank\" rel=\"noopener\">extends<\/a><\/code><\/td><td>Job<\/td><td>Inherits configuration from other jobs.<\/td><\/tr><tr><td><code><a href=\"https:\/\/www.bestdevops.com\/gitlab-pipeline-tags-what-is-tags-in-gitlab-ci-cd\/\" target=\"_blank\" rel=\"noopener\">tags<\/a><\/code><\/td><td>Job<\/td><td>Specifies tags to select specific runners.<\/td><\/tr><tr><td><code><a href=\"https:\/\/www.bestdevops.com\/gitlab-pipeline-environment-what-is-environment-in-gitlab-ci-cd\/\" target=\"_blank\" rel=\"noopener\">environment<\/a><\/code><\/td><td>Job<\/td><td>Defines the environment for deployment.<\/td><\/tr><tr><td><code>only:variables<\/code><\/td><td>Job<\/td><td>Specifies job inclusion based on variables. <em>(Deprecated in favor of <code>rules<\/code>)<\/em><\/td><\/tr><tr><td><code>except:variables<\/code><\/td><td>Job<\/td><td>Specifies job exclusion based on variables. <em>(Deprecated in favor of <code>rules<\/code>)<\/em><\/td><\/tr><tr><td><code>coverage<\/code><\/td><td>Job<\/td><td>Specifies how to extract code coverage info.<\/td><\/tr><tr><td><code>secrets<\/code><\/td><td>Job<\/td><td>Defines secrets to be used in jobs.<\/td><\/tr><tr><td><code>resource_group<\/code><\/td><td>Job<\/td><td>Limits job concurrency.<\/td><\/tr><tr><td><code>interruptible<\/code><\/td><td>Job<\/td><td>Allows jobs to be canceled when superseded by newer runs.<\/td><\/tr><tr><td><code>manual<\/code><\/td><td>Job<\/td><td>Marks job as manual, requiring user intervention. <em>(Deprecated in favor of <code>when: manual<\/code>)<\/em><\/td><\/tr><tr><td><code>start_in<\/code><\/td><td>Job<\/td><td>Delays the execution of a manual job.<\/td><\/tr><tr><td><code>inherit<\/code><\/td><td>Job<\/td><td>Controls inheritance of global configurations.<\/td><\/tr><tr><td><code>coverage:regex<\/code><\/td><td>Job<\/td><td>Specifies a regex to extract coverage info.<\/td><\/tr><tr><td><code><a href=\"https:\/\/www.bestdevops.com\/gitlab-pipeline-when-what-is-when-in-gitlab-ci-cd\/\" target=\"_blank\" rel=\"noopener\">retry:when<\/a><\/code><\/td><td>Job<\/td><td>Specifies conditions under which to retry a job.<\/td><\/tr><tr><td><code>release<\/code><\/td><td>Job<\/td><td>Defines a release to be created after job completion.<\/td><\/tr><tr><td><code>id_tokens<\/code><\/td><td>Job<\/td><td>Defines OpenID Connect (OIDC) tokens for jobs.<\/td><\/tr><tr><td><code>workflow:rules<\/code><\/td><td>Global<\/td><td>Defines rules to control pipeline creation.<\/td><\/tr><tr><td><code>workflow:variables<\/code><\/td><td>Global<\/td><td>Defines variables at the workflow level.<\/td><\/tr><tr><td><code>workflow:inputs<\/code><\/td><td>Global<\/td><td>Defines inputs for the pipeline.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>This table provides a comprehensive overview of the keywords used in GitLab CI\/CD pipeline configurations. For detailed information and examples on each keyword, you can refer to the official GitLab CI\/CD YAML syntax reference: (<a href=\"https:\/\/docs.gitlab.com\/ci\/yaml\/?utm_source=chatgpt.com\" target=\"_blank\" rel=\"noopener\">GitLab Documentation<\/a>).(<a href=\"https:\/\/docs.gitlab.com\/ci\/yaml\/?utm_source=chatgpt.com\" target=\"_blank\" rel=\"noopener\">GitLab Documentation<\/a>)<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Below is a comprehensive table listing the key stanzas (keywords) used in GitLab CI\/CD pipeline configuration files (.gitlab-ci.yml). These keywords are categorized based on their scope and functionality. This information&#8230; <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"_joinchat":[],"footnotes":""},"categories":[2],"tags":[],"class_list":["post-49496","post","type-post","status-publish","format-standard","hentry","category-uncategorised"],"_links":{"self":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/49496","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/comments?post=49496"}],"version-history":[{"count":4,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/49496\/revisions"}],"predecessor-version":[{"id":49631,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/49496\/revisions\/49631"}],"wp:attachment":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/media?parent=49496"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/categories?post=49496"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/tags?post=49496"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}