GitLab API icon

GitLab API

Gitlab

Actions917

Overview

This node operation retrieves a specific artifact file from a job within a GitLab project using the GitLab API. It is useful for automating the download of build or test artifacts generated by CI/CD pipelines in GitLab projects. For example, it can be used to fetch logs, reports, or compiled binaries from a particular job's artifacts for further processing or storage.

Use Case Examples

  1. Download a test report artifact from a CI job in a GitLab project to analyze test results automatically.
  2. Fetch a compiled binary artifact from a build job to deploy it to a staging environment.

Properties

Name Meaning
Skip Authentication Option to skip authentication when making the API request.
Authentication Type of authentication used for the API request, defaulting to GitLab API key authentication.
baseUrl Base URL of the GitLab instance, defaulting to https://gitlab.com.
Method HTTP method used for the API request, default is GET.
Parameter Schema Defines the required path and query parameters for the API call, including project ID, job ID, artifact path, and optional job token.
Query Parameters Collection of query parameters including artifact_path (path to the artifact file inside the archive) and optional job_token for multi-project pipelines.
Path Parameters Collection of path parameters including project ID and job ID to specify the exact job artifact to retrieve.

Output

JSON

  • artifact - The artifact file content retrieved from the specified job in the project.

Dependencies

  • GitLab API key credential for authentication

Troubleshooting

  • Ensure the project ID and job ID are correct and accessible with the provided credentials.
  • Verify that the artifact_path query parameter correctly specifies the path inside the artifact archive.
  • If using job_token, confirm that the GitLab tier supports multi-project pipeline triggers and the token is valid.
  • Common errors include 404 Not Found if the project, job, or artifact path does not exist, and 401 Unauthorized if authentication fails.

Links

Discussion