.gitlab-ci.yml

GitLab CI/CD pipeline definition.

Open in YAML Validator

About this format

GitLab uses a `.gitlab-ci.yml` file in the root of the repository to define CI/CD pipeline stages and jobs.

Example Data

stages:
  - build
  - test

build_job:
  stage: build
  script:
    - echo "Building project"

test_job:
  stage: test
  script:
    - echo "Running tests"

When to use .gitlab-ci.yml

  • Automating builds
  • Running unit tests
  • Deploying applications to staging