GitLab API icon

GitLab API

Gitlab

Actions917

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 from a project by providing the project ID and pipeline ID to remove an unwanted or failed pipeline.
  2. Automate pipeline cleanup in a CI/CD workflow by deleting pipelines after certain conditions are met.

Properties

Name Meaning
Skip Authentication Whether to skip authentication for the API request.
Authentication The authentication method used for the API request, defaulting to GitLab API key authentication.
baseUrl The base URL of the GitLab instance, defaulting to https://gitlab.com.
Method The HTTP method used for the API request, defaulting to DELETE for this operation.
Path Parameters The path parameters required for the API request, including the project ID or URL-encoded path and the pipeline ID to identify the pipeline to delete.

Output

JSON

  • id - The ID of the deleted pipeline.
  • status - The status of the deleted pipeline.
  • ref - The branch or tag name associated with the pipeline.
  • sha - The commit SHA the pipeline was run for.
  • web_url - The URL to view the pipeline in GitLab.

Dependencies

  • GitLab API key credential for authentication

Troubleshooting

  • Ensure the project ID and pipeline ID are correct and exist in the GitLab instance to avoid 404 errors.
  • Verify that the API key has sufficient permissions to delete pipelines in the specified project.
  • Check the base URL if using a self-hosted GitLab instance to ensure the API endpoint is reachable.
  • Common error messages include authentication failures (401 Unauthorized) and resource not found (404 Not Found). Resolving these involves verifying credentials and resource identifiers.

Links

Discussion