GitLab API icon

GitLab API

Gitlab

Actions917

Overview

This node operation is designed to interact with the GitLab API to keep artifacts from a specific job within a project. It sends a POST request to the endpoint `/api/v4/projects/{id}/jobs/{job_id}/artifacts/keep`, which prevents the job artifacts from being deleted. This is useful in CI/CD pipelines where you want to preserve build artifacts for later use or auditing.

Use Case Examples

  1. In a CI/CD workflow, after a job completes successfully, use this node to keep the job artifacts so they can be downloaded or used in subsequent jobs.
  2. In a project management automation, preserve important job artifacts for compliance or backup purposes by marking them to be kept.

Properties

Name Meaning
Skip Authentication Option to skip authentication for the request, useful for public or unauthenticated endpoints.
Authentication Type of authentication used, defaults to GitLab API key authentication.
baseUrl Base URL of the GitLab instance, defaulting to https://gitlab.com.
Method HTTP method to use for the request, default is POST for this operation.
Path Parameters Parameters required in the URL path to identify the project and job whose artifacts are to be kept.

Output

JSON

  • response - The response from the GitLab API confirming the artifacts are kept

Dependencies

  • GitLab API key credential for authentication

Troubleshooting

  • Ensure the project ID and job ID are correct and exist in the GitLab instance to avoid 404 errors.
  • Authentication errors may occur if the API key is missing, invalid, or lacks sufficient permissions; verify the API key and its scopes.
  • Network or base URL misconfiguration can cause connection failures; confirm the base URL is correct and accessible.

Links

Discussion