GitLab API

GitlabTool

Actions1000

Overview

This node operation retrieves detailed information about a specific pipeline within a GitLab project using the GitLab API. It is useful for scenarios where users need to monitor or analyze the status and details of CI/CD pipelines associated with their projects. For example, a DevOps engineer might use this node to fetch pipeline results to trigger further automation or notifications based on pipeline success or failure.

Use Case Examples

  1. Fetch pipeline details for project ID 11 and pipeline ID 18 to check the pipeline status and logs.
  2. Use the node to integrate GitLab pipeline data into a dashboard for real-time monitoring.

Properties

Name Meaning
Skip Authentication Determines whether to skip API authentication for the request.
Authentication Specifies the authentication method to use for the GitLab API request.
baseUrl The base URL of the GitLab instance to which the API request is sent.
Method The HTTP method used for the API request (GET, POST, PUT, DELETE, HEAD, PATCH).
Path Parameters Parameters used in the API request path to specify the project and pipeline IDs.

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 associated with the pipeline.
  • sha - The commit SHA the pipeline is running against.
  • web_url - The URL to view the pipeline in the GitLab web interface.

Dependencies

  • GitLab API key credential

Troubleshooting

  • Ensure the project ID and pipeline ID are correctly provided and URL-encoded if necessary.
  • Verify that the GitLab API key credential is valid and has sufficient permissions to access the project and pipeline data.
  • Check the baseUrl to ensure it points to the correct GitLab instance, especially if using a self-hosted GitLab server.
  • Common error messages include 404 Not Found if the project or pipeline does not exist, and 401 Unauthorized if authentication fails. Verify IDs and credentials to resolve these errors.

Links

Discussion