GitLab API

GitlabTool

Actions905

Overview

This node operation retrieves a specific artifact file from a job within a GitLab project using the GitLab API. It is useful for accessing build or deployment artifacts generated by CI/CD jobs in GitLab projects. For example, you can use this node to download test reports, compiled binaries, or other files stored as job artifacts.

Use Case Examples

  1. Download a test report artifact from a CI job in a GitLab project.
  2. Fetch a compiled binary artifact from a specific job for deployment purposes.

Properties

Name Meaning
Skip Authentication Whether to skip authentication for the API request.
Authentication The authentication method used for the API request, typically an API key credential.
baseUrl The base URL of the GitLab instance, defaulting to https://gitlab.com.
Method The HTTP method to use for the API request, default is GET.
Query Parameters Query parameters for the API request, including the artifact file path and optional job token for multi-project pipelines.
Path Parameters Path parameters for the API request, including the project ID or URL-encoded path and the job ID.

Output

JSON

  • artifactContent - The content of the artifact file retrieved from the job.

Dependencies

  • GitLab API authentication credential

Troubleshooting

  • Ensure the project ID and job ID are correct and accessible with the provided authentication.
  • Verify that the artifact_path query parameter points to a valid file inside the job's artifacts archive.
  • If using job_token, ensure 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 is incorrect, and 401 Unauthorized if authentication fails.

Links

Discussion