GitLab API

GitlabTool

Actions1000

Overview

This node operation retrieves a specific artifact file from a job within a GitLab project using the GitLab API. It is useful for automation workflows that need to access build or deployment artifacts generated by CI/CD jobs in GitLab projects. For example, it can be used to download test reports, compiled binaries, or other files stored as job artifacts.

Use Case Examples

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

Properties

Name Meaning
Skip Authentication Option to skip authentication for the request, useful for public or unauthenticated access scenarios.
Authentication Type of authentication to use, defaulting 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, defaulting to GET.
Query Parameters Query parameters for the request, including the artifact path inside the job artifacts archive and an optional job token for multi-project pipelines.
Path Parameters Path parameters for the request, including the project ID or URL-encoded path and the job ID.

Output

JSON

  • artifact - The artifact file content or metadata 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 authentication.
  • Verify that the artifact_path query parameter correctly specifies the file path inside the job artifacts archive.
  • Check that the GitLab instance URL (baseUrl) is correct and reachable.
  • If using job_token, ensure it is valid and the GitLab tier supports it (Premium or Ultimate).
  • Common error messages include 404 Not Found if the project, job, or artifact path does not exist, and 401 Unauthorized if authentication fails.

Links

Discussion