GitLab API icon

GitLab API

Gitlab

Actions917

Overview

This node operation deletes job artifacts from a specific job within a GitLab project. It is useful for automating cleanup of build artifacts generated by CI/CD jobs in GitLab projects, helping to manage storage and maintain project hygiene. For example, it can be used to delete artifacts from completed or failed jobs to free up space or enforce retention policies.

Use Case Examples

  1. Delete artifacts from a specific job in a GitLab project to free up storage.
  2. Automate cleanup of old job artifacts in CI/CD pipelines.

Properties

Name Meaning
Skip Authentication Whether to skip authentication for the request.
Authentication The authentication method used for the request, 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 GET but here DELETE is used for this operation.
Path Parameters Parameters required in the URL path to identify the project and job whose artifacts are to be deleted.

Output

JSON

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

Dependencies

  • GitLab API key credential for authentication

Troubleshooting

  • Ensure the project ID and job ID are correct and exist in the GitLab instance.
  • Verify that the API key has sufficient permissions to delete job artifacts.
  • Check network connectivity to the GitLab instance base URL.
  • If skipping authentication, ensure the GitLab instance allows unauthenticated requests for this operation.

Links

Discussion