CloudBees action: Run a GitLab pipeline

1 minute read

Use this action to trigger a GitLab pipeline, a part of a continuous integration and continuous delivery (CI/CD) process.

All CloudBees action repositories are listed at CloudBees, Inc. on GitHub.

Inputs

Table 1. Input details
Input name Data type Required? Description

url

String

No

The GitLab server URL. If not specified, uses https://gitlab.com.

access-token

String

Yes

The GitLab API access token.

trigger-token

String

Yes

The GitLab pipeline API trigger token.

namespace

String

Yes

The GitLab namespace corresponding to the project.

project-name

String

Yes

The GitLab pipeline project name.

branch-name

String

Yes

The GitLab branch name.

parameters

JSON

No

GitLab pipeline parameters, formatted as JSON data in key/value pairs.

Usage example

In your YAML file, add:

steps: - name: Run GitLab pipeline uses: cloudbees-io/gitlab-run-pipeline@v1 with: url: https://gitlab.com/ access-token: ${{ secrets.GITLAB_API_ACCESS_TOKEN }} trigger-token: ${{ secrets.GITLAB_API_TRIGGER_TOKEN }} namespace: group1 project-name: project01 branch-name: main parameters: {"param1":"val1","param2":"val2"}