🌐
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.
🌐
GitLab
docs.gitlab.com › gitlab docs › use gitlab › use ci/cd to build your application › tutorials › tutorial: your first pipeline
Tutorial: Create and run your first GitLab CI/CD pipeline | GitLab Docs
This example shows four jobs: build-job, test-job1, test-job2, and deploy-prod. The comments listed in the echo commands are displayed in the UI when you view the jobs. The values for the predefined variables $GITLAB_USER_LOGIN and $CI_COMMIT_BRANCH are populated when the jobs run.
Discussions

How make a if statement in the CI file
Have somebody a simple example how to make if conditions in the CI file for GitLab Runner · I’m afraid, this is not possible in the relatively static YAML configuration language. I would write a small bash script which reads the environment variables CI_MERGE_REQUEST_ID and does the printing ... More on forum.gitlab.com
🌐 forum.gitlab.com
10
0
July 14, 2020
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
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
🌐
Spacelift
spacelift.io › blog › gitlab-ci-yml
Writing .gitlab-ci.yml File with Examples [Tutorial]
September 15, 2025 - Stages are run in the order that they’re written: stages: - test - build test_job1: stage: test # ... test_job2: stage: test # ... build_job: stage: build # ... In the example above, the pipeline will begin with the test_job1 and test_job2 ...
🌐
GitHub
gist.github.com › Thakurvaibhav › 5a676f7138b20b4d8ecef5fc588a62eb
sample-gitlab-ci.yaml · GitHub
Hi Vibhav it is possible to make .gitlab-ci.yml pipeline for azure with docker containerization , actually i am struggling with this .
🌐
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
include: - remote: 'https://gitlab.com/example-project/-/raw/main/.gitlab-ci.yml' integrity: 'sha256-L3/GAoKaw0Arw6hDCKeKQlV1QPEgHYxGBHsH4zG1IY8='
🌐
GitLab
gitlab.com › gitlab.org › repository
lib/gitlab/ci/templates · master · GitLab.org / GitLab · GitLab
GitLab is the open-source DevSecOps platform that provides a complete software development lifecycle toolchain including source control, CI/CD, security scanning, and project management in a single application.
Find elsewhere
🌐
Hifis
hifis.net › workshop-materials › gitlab-ci › episodes › 08-using-includes
Using Includes - Continuous Integration in GitLab
As demonstrated above, the simplest way to include YAML files in another one is to put the file to include somewhere in the same project and reference it with the include:local sub-key in the main YAML file .gitlab-ci.yml by using the relative path from the project root to the YAML file to include.
🌐
Medium
medium.com › @ankiit › machine-learning-ops-for-data-scientists-hands-on-ci-cd-ed3e8a0432e9
HelloWorld CICD on Gitlab. Learn how to use and build a simple… | by Ankiit | Medium
March 23, 2024 - To trigger Gitlab Pipelines, create a file called .gitlab-ci.yml in the project root and copy the above contents (if not already).
🌐
GitLab
genboree.org › help
Gitlab ci yaml · Yaml · Ci · Help · GitLab
In this example, the build-code-job job in the build stage runs first. It outputs the Ruby version the job is using, then runs rake to build project files.
🌐
GitHub
github.com › dokku › gitlab-ci
GitHub - dokku/gitlab-ci: A collection of gitlab-ci examples · GitHub
All examples below are functionally complete and can be copy-pasted into a .gitlab-ci.yml file, with some minor caveats:
Author: dokku
🌐
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 on where the application should be deployed to.
🌐
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
For example, the inputs context allows you to access information passed into the configuration file from a parent file or when a pipeline is run. 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 ...
🌐
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
🌐
GitLab
docs.gitlab.com › gitlab docs › use gitlab › use ci/cd to build your application › jobs
CI/CD Jobs | GitLab Docs
To create a group of jobs, in the .gitlab-ci.yml file, separate each job name with a number and one of the following: A forward or backward slash (/ or \), for example, slash-test 1/3, slash-test 2/3, slash-test 3/3.
🌐
GitLab
docs.gitlab.com › gitlab docs › use gitlab › use ci/cd to build your application › ci/cd components › ci/cd component examples
CI/CD component examples | GitLab Docs
- docker push $CI_REGISTRY_IMAGE/my-tool:$CI_COMMIT_TAG create-release: stage: release image: registry.gitlab.com/gitlab-org/cli:latest script: echo "Creating release $CI_COMMIT_TAG" rules: - if: $CI_COMMIT_TAG release: tag_name: $CI_COMMIT_TAG description: "Release $CI_COMMIT_TAG" In the component template (templates/my-component/template.yml):
🌐
GitLab
forum.gitlab.com › gitlab ci/cd
How make a if statement in the CI file - GitLab CI/CD - GitLab Forum
July 14, 2020 - Have somebody a simple example how to make if conditions in the CI file for GitLab Runner · I’m afraid, this is not possible in the relatively static YAML configuration language. I would write a small bash script which reads the environment variables CI_MERGE_REQUEST_ID and does the printing ...
🌐
Medium
medium.com › globant › optimize-pipeline-implementation-using-gitlab-ci-templates-6eef54046231
Optimize pipeline implementation using GitLab CI Templates | by Francisco Andre Aranguren Torres | Globant | Medium
March 8, 2023 - You will have a stable version where only major version releases can introduce breaking changes, while in the latest version any change can be a breaking change. The GitLab team distinguishes those versions using different files (for example, Deploy.yml for the latest version and Deploy.gitlab-ci.yml for the stable version).
🌐
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: "XXX/infrastructure/ci-templates" ref: "main" file: ".poc-template-v4.yml" - project: 'XXX/infrastructure/ci-templates' ref: "main" file: '.poc-node-ci-template.yml' Thanks & Regards Srivatsas...
🌐
GitLab
gitlab.com › gitlab.org › repository
lib/gitlab/ci/templates/Getting-Started.gitlab-ci.yml · master · GitLab.org / GitLab · GitLab
GitLab is the open-source DevSecOps platform that provides a complete software development lifecycle toolchain including source control, CI/CD, security scanning, and project management in a single application.