GitLab API

GitlabTool

Actions1000

Overview

This node operation retrieves the latest pipeline for a specified project in GitLab. It is useful for developers and DevOps engineers who want to quickly check the status or details of the most recent pipeline run associated with a project. For example, it can be used to monitor CI/CD pipeline results or trigger actions based on the latest pipeline status.

Use Case Examples

  1. Get the latest pipeline for project ID 11 to check if the build passed.
  2. Fetch the latest pipeline for a project using a specific branch ref like 'develop'.

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.
Query Parameters Optional query parameters for the request, such as branch ref.
Path Parameters Path parameters for the request, specifically the project ID or URL-encoded path.

Output

JSON

  • id - The unique identifier of the pipeline.
  • status - The current status of the pipeline (e.g., running, success, failed).
  • ref - The branch or tag name the pipeline is associated with.
  • sha - The commit SHA the pipeline is running for.
  • web_url - The URL to view the pipeline in GitLab.

Dependencies

  • GitLab API key credential

Troubleshooting

  • Ensure the project ID provided in path parameters is correct and accessible with the provided authentication.
  • If authentication is skipped, the request might fail due to lack of permissions.
  • Check the baseUrl if using a self-hosted GitLab instance to ensure it is correct.
  • Verify that the branch ref (if provided) exists in the project to avoid empty or error responses.

Links

Discussion