| 位置 | 仓库根目录 .gitlab-ci.yml |
|---|---|
| 默认阶段 | 未声明 stages 时使用 build / test / deploy |
| 作业核心键 | stage、script、image、rules |
| 全局键 | default、workflow、include、stages、variables |
最小流水线
最小流水线
stages: [build, test, deploy]
build-job:
stage: build
script:
- make build
test-job:
stage: test
script:
- make test阶段决定作业顺序,同阶段作业默认并行;跨阶段依赖可用 needs 改成 DAG。