Skip to content

feat: support "Run pipeline"

Kerri Miller requested to merge github/fork/andhe/run-pipeline into trunk

Created by: andhe

Description

The API calls it "create pipeline", but the gitlab web interface button to do this says "Run pipeline".

I named the command run as that's likely to be more familiar to users.

With this you can now support starting a pipeline via "glab pipeline run -b mybranch".

Note that setting Ref when calling the CreatePipeline API seems required or we'll end up with an "Internal Server Error". We thus do a best-effort attempt at figuring out the default when the branch argument is not specified.

Motivation and Context I have pipelines that I need to regularly trigger manually. Rather than using the "Run pipeline" button in the web interface it would be convenient to be able to do this via the cli.

How Has This Been Tested? I triggered a pipeline run on one of my repos and looked at the web interface to see it run.

Please help test this on a repo where the default branch is not named "master" (and "master" doesn't exist at all).

Types of changes

  • New feature (non-breaking change which adds functionality)

Merge request reports