GitLab API

GitlabTool

Actions1000

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 user can delete a pipeline by specifying the project ID or URL-encoded path and the pipeline ID to clean up pipeline history or manage resources.

Use Case Examples

  1. Delete a pipeline with ID 18 from project with ID 11 to remove an unwanted or failed pipeline.
  2. Automate pipeline cleanup in a CI/CD workflow by deleting old pipelines after successful deployment.

Properties

Name Meaning
Skip Authentication Whether to skip authentication for the API request (boolean). Defaults to false.
Authentication The authentication method used for the API request, defaulting to GitLab API key authentication.
baseUrl The base URL of the GitLab instance to which the API request is sent. Defaults to https://gitlab.com.
Method The HTTP method used for the API request. Defaults to GET but for this operation it should be DELETE.
Path Parameters Parameters used in the API request path to specify the project and pipeline to delete.

Output

JSON

  • success - Indicates whether the pipeline deletion was successful.

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 specified project.
  • Check the base URL to confirm it points to the correct GitLab instance.
  • 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