🌐
GitLab
docs.gitlab.com › gitlab docs › use gitlab › use ci/cd to build your application › ci/cd yaml syntax reference
CI/CD YAML syntax reference | GitLab Docs
The YAML file must have the extension .yml or .yaml. You can use * and ** wildcards in the file path. You can use certain CI/CD variables. ... The .gitlab-ci.yml file and the local file must be on the same branch.
Getting started
Use CI/CD variables to customize jobs by making values defined elsewhere accessible to jobs. You can hard-code CI/CD variables in your .gitlab-ci.yml file, set them in your project settings, or generate them dynamically.
CI/CD inputs
Inputs provide advantages over variables including type checking, validation, and a clear contract. Unexpected inputs are rejected. Inputs for pipelines must be defined in the spec:inputs header of the main .gitlab-ci.yml file.
CI/CD variables
Variables saved in the .gitlab-ci.yml file are visible to all users with access to the repository, and should store only non-sensitive project configuration. For example, the URL of a database saved in a DATABASE_URL variable.
Pipelines
CI/CD pipelines are the fundamental component of GitLab CI/CD. Pipelines are configured in a .gitlab-ci.yml file by using YAML keywords.
🌐
GitLab
docs.gitlab.com › gitlab docs › use gitlab › use ci/cd to build your application › getting started
Get started with GitLab CI/CD | GitLab Docs
The .gitlab-ci.yml file defines the stages, jobs, and scripts that make up your CI/CD pipeline, including variables, job dependencies, and when and how each job runs.
Discussions

gitlab-ci.yaml management
Yes, there is a lot you can do. you can use extends: to reuse configuration. https://docs.gitlab.com/ee/ci/yaml/yaml_optimization.html#use-extends-to-reuse-configuration-sections You can put scripts in their own files. Don't forget to make them executable before you commit them, so you don't have to run chmod +x on them every time. You can use include to have smaller files and put merge them in a .gitlab-ci,yml https://docs.gitlab.com/ee/ci/yaml/yaml_optimization.html#use-extends-and-include-together There are few more things you can do. What I wouldn't do, is to use yaml anchors. extends: is cleaner and has a simpler syntax. More on reddit.com
🌐 r/gitlab
11
8
January 18, 2024
Purpose of '.' in gitlab-ci.yml file
Hello, I am new to Gitlab and trying to understand existing gitlab-ci.yml files. I have gone through below include section in the file, where i have noticed ‘.’ below the file name in file: “.poc-template-v4.yml”. What is that purpose of ‘.’ please help me know. include: - project: ... More on forum.gitlab.com
🌐 forum.gitlab.com
6
0
June 20, 2023
🌐
GitHub
github.com › SocialGouv › gitlab-ci-yml
GitHub - SocialGouv/gitlab-ci-yml: Reusable Giltlab pipelines · GitHub
include: - project: SocialGouv/gitlab-ci-yml file: /base_docker_kubectl_image_stage.yml ref: v23.3.4 - project: SocialGouv/gitlab-ci-yml file: /base_create_namespace_stage.yml ref: v23.3.4 # Create namespace: extends: .base_create_namespace_stage variables: # The rancher project where the namespaces will be created RANCHER_PROJECT_ID: <rancher_project_id> # Optional REMOTE_URL: "https://github.com/${CI_PROJECT_PATH}.git" before_script: - K8S_NAMESPACE=my-namespace # (re)create to ensure a new namespaces will be created # - kubectl delete namespaces ${K8S_NAMESPACE} || true
Author: SocialGouv
🌐
Octopus Deploy
octopus.com › home › devops › gitlab ci/cd › gitlab yaml
What Is The .gitlab-ci.yml File And How To Work With It | Octopus Deploy
The .gitlab-ci.yml file defines scripts that should be run during the CI/CD pipeline and their scheduling, additional configuration files and templates, dependencies, caches, commands GitLab should run sequentially or in parallel, and instructions ...
🌐
GitLab
forum.gitlab.com › gitlab ci/cd
Purpose of '.' in gitlab-ci.yml file - GitLab CI/CD - GitLab Forum
June 20, 2023 - Hello, I am new to Gitlab and trying to understand existing gitlab-ci.yml files. I have gone through below include section in the file, where i have noticed ‘.’ below the file name in file: “.poc-template-v4.yml”. What is that purpose of ‘.’ please help me know. include: - project: ...
Find elsewhere
🌐
GitLab
gitlab.com › gitlab.org › repository
.gitlab-ci.yml · master · GitLab.org / GitLab · GitLab
if: '($CI_PIPELINE_SOURCE == "merge_request_event" && $CI_MERGE_REQUEST_EVENT_TYPE != "merge_train") && $CI_MERGE_REQUEST_LABELS =~ /pipeline:run-with-rails-next/' ... workflow: name: '$PIPELINE_NAME' rules: # https://gitlab.com/gitlab-org/gitlab/-/issues/514740 - if: '$GITLAB_USER_LOGIN == "gitlab-crowdin-bot" && $CI_PIPELINE_SOURCE == "merge_request_event" && $CI_MERGE_REQUEST_APPROVED != "true"' when: never - if: '$CI_PIPELINE_SOURCE == "pipeline" && $GITALY_TEST' variables: <<: *default-ruby-variables PIPELINE_NAME: 'Gitaly Rails Test Pipeline' - <<: *if-triggered-by-aigw-project variables: <<: *default-ruby-variables PIPELINE_NAME: 'AIGW Rails Test Pipeline' # If `$FORCE_GITLAB_CI` is set, create a pipeline.
🌐
GitLab
genboree.org › help
Gitlab ci yaml · Yaml · Ci · Help · GitLab
A file called .gitlab-ci.yml in the root of your repository, which contains the CI/CD configuration.
🌐
Spacelift
spacelift.io › blog › gitlab-ci-yml
Writing .gitlab-ci.yml File with Examples [Tutorial]
September 15, 2025 - The .gitlab-ci.yml file is used to define your project’s stages and jobs. It spans the entire DevOps lifecycle and configures all the CI/CD pipelines in your project, from code tests through to deployments.
🌐
Medium
medium.com › @yian806884 › comprehensive-guide-to-gitlab-ci-cd-081305b06a9a
Comprehensive Guide to GitLab CI/CD | by Yian Hsiao | Medium | Medium
October 16, 2023 - GitLab CI/CD is a powerful tool that utilizes a YAML configuration file .gitlab-ci.yml within each code repository.
🌐
GeeksforGeeks
geeksforgeeks.org › git › how-to-create-a-gitlab-ci-yml-file-in-gitlab
How To Create A .gitlab-ci.yml File in GitLab? - GeeksforGeeks
July 23, 2025 - The .gitlab-ci.yml file is a YAML-based configuration file placed in the root of your GitLab repository. It tells GitLab how to run CI/CD jobs, which include steps such as compiling code, running tests, deploying applications, and more.
🌐
GitLab
docs.gitlab.com › gitlab docs › use gitlab › use ci/cd to build your application › pipelines
CI/CD pipelines | GitLab Docs
CI/CD pipelines are the fundamental component of GitLab CI/CD. Pipelines are configured in a .gitlab-ci.yml file by using YAML keywords.
🌐
DeepDocs
deepdocs.dev › home › a developer’s guide to gitlab ci yml
A Developer's Guide to GitLab CI YML | DeepDocs
February 16, 2026 - At its heart, the .gitlab-ci.yml file is just a text file that speaks YAML. This format uses indentation specifically spaces, not tabs—to map out the hierarchy and relationships between different parts of your pipeline.
🌐
GitLab
docs.gitlab.com › gitlab docs › use gitlab › use ci/cd to build your application › tutorials › ci/cd examples
CI/CD examples | GitLab Docs
Examples and community-contributed guides for implementing GitLab CI/CD across languages, frameworks, and deployment targets.
🌐
GitHub
gist.github.com › devops-school › 09d79145529f07f0b6a64d6ad7476d3d
GitLab Tutorials: Example of .gitlab-ci.yml · GitHub
GitLab Tutorials: Example of .gitlab-ci.yml. GitHub Gist: instantly share code, notes, and snippets.