Run a CI job locally

Run a job from .gitlab-ci.yml locally in Docker. It replaces the removed gitlab-runner exec

gitlab-ci-local --job build

tool
gitlab-ci4 commands
tags
gitlab-cicidebug

More gitlab-ci commands

  • gitlab-runner register --non-interactive --url https://<host> --token glrt-<id> --executor docker --docker-image alpine:latest

    Register a runner with the new authentication token. Note: the old registration token is deprecated

  • gitlab-runner verify --delete

    Check the configured runners and unregister the ones GitLab no longer knows

  • curl -X POST -F token=$CI_TOKEN -F ref=main -F 'variables[DEPLOY]=true' https://<host>/api/v4/projects/<id>/trigger/pipeline

    Start a pipeline from outside CI with a trigger token and your own variables

all 4 gitlab-ci commands