GitLab API

GitlabTool

Actions905

Overview

This node operation deletes a specific pipeline from a GitLab project using the GitLab API. It is useful for automating the management of CI/CD pipelines by programmatically removing pipelines that are no longer needed or were created by mistake. For example, a DevOps engineer can use this node to clean up old or failed pipelines in a project to maintain a tidy pipeline history.

Use Case Examples

  1. Deleting a pipeline with ID 18 from project with ID 11 to remove obsolete CI/CD runs.
  2. Automating pipeline cleanup in a GitLab project after a deployment.

Properties

Name Meaning
Skip Authentication Determines whether to skip authentication for the API request.
Authentication Specifies the authentication method to use, defaulting to GitLab API key authentication.
baseUrl The base URL of the GitLab instance, defaulting to https://gitlab.com.
Method The HTTP method to use for the request, defaulting to DELETE for this operation.
Path Parameters Parameters required in the URL path to identify the project and pipeline to delete.

Output

JSON

  • success - Indicates whether the pipeline deletion was successful
  • statusCode - HTTP status code returned by the API
  • message - Additional message or error information from the API response

Dependencies

  • GitLab API key credential for authentication

Troubleshooting

  • Ensure the project ID and pipeline ID are correct and exist in the GitLab instance.
  • Verify that the API key used has sufficient permissions to delete pipelines in the project.
  • Check the base URL to ensure it points to the correct GitLab instance if using a self-hosted GitLab.
  • Common error messages include 404 Not Found if the project or pipeline does not exist, and 403 Forbidden if the API key lacks permissions.

Links

Discussion