本文由 简悦 SimpRead 转码, 原文地址 g.hz.netease.com

杭研 Git 托管平台

Use this document to get started with GitLab continuous integration.

Before you start, make sure you have:

If you are migrating from another CI/CD tool, view this documentation:

CI/CD process overview

To use GitLab CI/CD:

  1. Ensure you have runners available to run your jobs. If you don't have a runner, install GitLab Runner and register a runner for your instance, project, or group.
  2. Create a .gitlab-ci.yml file at the root of your repository. This file is where you define your CI/CD jobs.

When you commit the file to your repository, the runner runs your jobs. The job results are displayed in a pipeline.

Ensure you have runners available

In GitLab, runners are agents that run your CI/CD jobs.

You might already have runners available for your project, including shared runners, which are available to all projects in your GitLab instance.

To view available runners:

As long as you have at least one runner that's active, with a green circle next to it, you have a runner available to process your jobs.