GitLab API icon

GitLab API

Gitlab

Actions917

Overview

This node operation triggers a pipeline for a specific project in GitLab using the GitLab API. It is useful for automating CI/CD workflows by programmatically starting pipelines based on a commit SHA, branch, or tag reference. For example, it can be used to trigger a deployment pipeline when new code is pushed to a branch.

Use Case Examples

  1. Trigger a pipeline for project ID 18 on the 'develop' branch to automate testing and deployment.
  2. Start a pipeline for a specific commit SHA to validate changes before merging.

Properties

Name Meaning
Skip Authentication Option to skip authentication for the request.
Authentication Type of authentication used, default is GitLab API key.
baseUrl Base URL of the GitLab instance, default is https://gitlab.com.
Method HTTP method to use for the request, default is GET.
Path Parameters Parameters for the API path including project ID and reference (branch, tag, or commit SHA).

Output

JSON

  • pipeline
    • id - ID of the triggered pipeline.
    • status - Status of the triggered pipeline.
    • ref - Reference (branch, tag, or commit SHA) the pipeline was triggered for.
    • web_url - URL to view the pipeline in GitLab.

Dependencies

  • GitLab API key credential for authentication

Troubleshooting

  • Ensure the project ID and ref parameters are correctly set and URL-encoded if necessary.
  • Authentication errors may occur if the GitLab API key is missing or invalid; verify credentials.
  • The pipeline trigger may fail if the ref does not exist or the user lacks permissions to trigger pipelines on the project.

Links

Discussion