Skip to content

CLI pipeline trigger with variables? #663

@vilhelmen

Description

@vilhelmen

Description of the problem, including code/CLI snippet

It doesn't seem possible to trigger a pipeline and send variables from the CLI, but maybe I'm doing something wrong? I was hoping to use the cli instead of a bunch of curl for easier project id resolution, but I admit JSON on the CLI is gross and I should probably just do it directly in three lines of python.

Example I'm trying:

gitlab project trigger-pipeline \
        --id 43 \
        --ref "dev" \
        --token "XXXXXXX" \
        --variables "{\"TEST\": \"??????????\"}"

If you run a pipeline trigger with debug on, you can see that it's sending an empty variables dictionary by default:

send: b'{"ref": "dev", "token": "XXXXXXX", "variables": {}}'

Expected Behavior

Trigger pipeline with variables

Actual Behavior

gitlab: error: unrecognized arguments: --variables {"TEST": "??????????"}

Specifications

  • python-gitlab version: 1.7.0
  • API version you are using (v3/v4): v4
  • Gitlab server version (or gitlab.com): 11.5.3-ee

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy