GitLab API

GitlabTool

Actions1000

Overview

This node operation interacts with the GitLab API to keep artifacts from a specific job within a project. It is useful in scenarios where you want to prevent job artifacts from being automatically deleted by GitLab's cleanup policies, ensuring that important build or deployment artifacts are retained for future use or auditing.

Use Case Examples

  1. A DevOps engineer uses this node to keep artifacts from a successful CI/CD job to ensure they are available for deployment or debugging.
  2. A project manager automates artifact retention for critical jobs in a GitLab project to comply with audit requirements.

Properties

Name Meaning
Skip Authentication Determines whether to skip the authentication process for the API request.
Authentication Specifies the authentication method to use, typically a GitLab API key credential.
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 can be set to POST, PUT, DELETE, HEAD, or PATCH.
Path Parameters Parameters required in the API path to identify the project and job whose artifacts are to be kept.

Output

JSON

  • response - The JSON response from the GitLab API confirming the artifact retention action.

Dependencies

  • GitLab API key credential for authentication

Troubleshooting

  • Ensure the project ID and job ID are correctly specified and exist in the GitLab instance to avoid 404 errors.
  • Verify that the authentication credentials are valid and have sufficient permissions to modify job artifacts.
  • Check the base URL to ensure it points to the correct GitLab instance, especially if using a self-hosted GitLab server.

Links

Discussion