Skip to content

IaC & CI/CD: GitLab CI

GitLab CI commands from the IaC & CI/CD folder.

Index
4 items

GitLab CI: Watch the pipeline for this branch

Safe

Live status of the current branch's pipeline from the terminal.

glab ci status --live
What each part does
  1. glab ci statusstatus of the latest pipeline on the current branch, job by job
  2. --livekeep refreshing until the pipeline finishes

Also known as: glab ci · pipeline status

GitLab CI: Show a job's log

Safe

Stream the log of a CI job (pick interactively if you omit the id).

glab ci trace <job-id>
What each part does
  1. glab ci tracestream a CI job's log (follows it while running)
  2. <job-id>the job ID; leave it out to pick a job interactively

Also known as: job log · glab trace

GitLab CI: Lint .gitlab-ci.yml

Safe

Validate the CI config against the GitLab instance before pushing.

glab ci lint
What each part does
  1. glab ci lintsend .gitlab-ci.yml to the GitLab CI lint API and report syntax / config errors

Also known as: yaml invalid · ci lint

GitLab CI: Run a pipeline on a branch

Safe

Trigger a new pipeline, e.g. to re-deploy.

glab ci run --branch <branch>
What each part does
  1. glab ci runcreate a new pipeline
  2. --branch <branch>the branch to run it on; add --variables KEY:value for CI variables

Also known as: trigger pipeline

My DevOps Playbook by Angelo John Calleja

New runbook

GitHub not connected

Saving is handled by the site: the GitHub token is stored in Cloudflare, not in your browser. Enter the editor password (the EDITOR_PASSWORD secret) to unlock saving in this browser.

Saving commits to gelogrammer/My_DevOps_Playbook. Create a fine-grained token with access to only this repo andContents: Read and write, then paste it here. It is stored only in this browser.

src/content/docs/…