GitLab API icon

GitLab API

Gitlab

Actions917

Overview

This node operation deletes tags from a container registry repository within a GitLab project. It is useful for managing and cleaning up container images by removing specific tags based on criteria such as tag name patterns, age, or quantity to keep. For example, it can delete all tags matching a regex or keep only the latest N tags, helping maintain a tidy and efficient container registry.

Use Case Examples

  1. Delete all tags matching a specific pattern from a repository.
  2. Keep only the latest 5 tags and delete older ones.
  3. Delete tags older than a specified duration, e.g., 1 month.

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.
Parameter Schema Defines required and optional path and query parameters for the delete operation, including project ID, repository ID, and tag filtering criteria.
Query Parameters Collection of optional query parameters to filter tags for deletion, such as name regex patterns, number of tags to keep, and age threshold.
Path Parameters Collection of required path parameters including project ID and repository ID.

Output

JSON

  • statusCode - HTTP status code of the delete operation response.
  • body - Response body from the GitLab API after deleting tags, typically empty or confirmation message.

Dependencies

  • GitLab API key credential for authentication

Troubleshooting

  • Ensure the project ID and repository ID are correct and accessible with the provided credentials.
  • Verify that the tag name regex patterns are valid and correctly formatted.
  • Check that the authentication credentials are valid and have sufficient permissions to delete tags.
  • If deletion fails, review the HTTP status code and error message returned by the GitLab API for specific issues.

Links

Discussion