GitLab API

GitlabTool

Actions905

Overview

This node operation deletes a specific Conan package version from a GitLab repository using the GitLab API. It is useful for managing and cleaning up package versions in a GitLab project, especially when certain package versions are no longer needed or need to be removed for maintenance or security reasons. For example, a user can delete an outdated or vulnerable Conan package version by specifying the package name, version, username, and channel.

Use Case Examples

  1. Deleting a specific Conan package version from a GitLab project to free up storage or remove deprecated packages.
  2. Automating cleanup of old package versions in a CI/CD pipeline to maintain repository hygiene.

Properties

Name Meaning
Skip Authentication Whether to skip authentication for the API request.
Authentication The authentication method used for the API request, typically an API key credential.
baseUrl The base URL of the GitLab instance, defaulting to https://gitlab.com.
Method The HTTP method used for the request, default is DELETE for this operation.
Path Parameters Parameters required in the request path to identify the specific Conan package version to delete.

Output

JSON

  • statusCode - HTTP status code of the delete operation response.
  • body - Response body from the GitLab API after attempting to delete the package.

Dependencies

  • GitLab API authentication credential

Troubleshooting

  • Ensure all path parameters (package_name, package_version, package_username, package_channel) are correctly provided and valid, as missing or incorrect parameters will cause the API call to fail.
  • Authentication errors may occur if the API key credential is missing, invalid, or lacks sufficient permissions to delete packages. Verify the API token and its scopes.
  • Network or base URL issues can cause request failures; confirm the baseUrl is correct and accessible.
  • The node may throw errors if the specified package does not exist or has already been deleted; check the package details before attempting deletion.

Links

Discussion