Professional Documents
Culture Documents
Kitchen, Audio
e.g., Regular Expressions, Garden,
LOGIN or REGISTER
This is a draft cheat sheet. It is a work in progress and is not finished yet.
1 of 7 1/6/23, 08:16
GitLab CI/CD Pipeline Configuration Cheat Sheet by vio... https://cheatography.com/violaken/cheat-sheets/gitlab-ci...
2 of 7 1/6/23, 08:16
GitLab CI/CD Pipeline Configuration Cheat Sheet by vio... https://cheatography.com/violaken/cheat-sheets/gitlab-ci...
build:osx: deploy_prod:
stage: build stage: deploy
script: make build:osx script:
artifacts: - echo "Deploy to production server"
paths: environment:
- binaries/ name: production
url: https://example.com
build:linux: when: manual
stage: build only:
script: make build:linux - master
artifacts: allow_failure: false
paths:
- binaries/
In the protected environments
test:osx: settings, select the environment and
stage: test
add the users, roles or groups that
script: make test:osx
dependencies: are authorized to trigger the manual
- build:osx job to the Allowed to Deploy list
test:linux:
stage: test Artifact Management
script: make test:linux
dependencies: Artifacts | Docker | Cache
- build:linux
Artifacts
deploy:
stage: deploy
script: make deploy job:
artifacts:
name: "$CI_JOB_NAME"
By default, all artifacts from all
paths:
previous stages are passed to the - binaries/
Docker Image
image:
name: super/sql:experimental
entrypoint: [""]
3 of 7 1/6/23, 08:16
GitLab CI/CD Pipeline Configuration Cheat Sheet by vio... https://cheatography.com/violaken/cheat-sheets/gitlab-ci...
linux:build: services:
stage: build - name: postgres:9.4
alias: db
mac:build: entrypoint: ["docker-entrypoint.sh"
stage: build command: ["postgres"]
linux:rspec:
stage: test
needs: ["linux:build"]
Cache
linux:rubocop:
build:
stage: test
script: mvn test
needs: ["linux:build"]
cache:
key: build
mac:rspec:
untracked: true
stage: test
paths:
needs: ["mac:build"]
- binaries/
policy: pull
mac:rubocop:
stage: test
needs: ["mac:build"] policy : pull | push | pull-push
4 of 7 1/6/23, 08:16
GitLab CI/CD Pipeline Configuration Cheat Sheet by vio... https://cheatography.com/violaken/cheat-sheets/gitlab-ci...
Tags
job:
tags:
- ruby
- postgres
osx job:
stage:
- build
tags:
- osx
script:
- echo "Hello, $USER!"
Trigger
staging:
stage: deploy
trigger: my/deployment
staging-branch:
stage: deploy
trigger:
project: my/deployment
branch: stable
5 of 7 1/6/23, 08:16
GitLab CI/CD Pipeline Configuration Cheat Sheet by vio... https://cheatography.com/violaken/cheat-sheets/gitlab-ci...
Parallel
test:
parallel: 3
script:
- bundle
- bundle exec rspec_booster --job
PDF (recommended)
PDF (4 pages)
Alternative Downloads
4 Pages
6 of 7 1/6/23, 08:16
GitLab CI/CD Pipeline Configuration Cheat Sheet by vio... https://cheatography.com/violaken/cheat-sheets/gitlab-ci...
roman_balzer published VS
SpaceDuck
Code Keybinds.
8 hours 39 mins ago
Cheatography
sams sub updated divorce.
21 hours 7 mins ago
© 2011 - 2023 Cheatography.com | CC License | Terms | Privacy Latest Cheat Sheets RSS Feed
7 of 7 1/6/23, 08:16