GitLab API

GitlabTool

Actions905

Overview

This node operation retrieves a raw artifact file from a specific job in a GitLab project. It is useful for automating the download of build or test artifacts generated by CI/CD pipelines in GitLab projects. For example, you can use it 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 server or cloud environment.

Properties

Name Meaning
Skip Authentication If set to true, the node will skip using authentication for the request.
Authentication Specifies the authentication method to use, defaulting to GitLab API key authentication.
baseUrl The base URL of the GitLab instance, defaulting to https://gitlab.com.
Method HTTP method to use for the request, default is GET.
Parameter Schema Defines the required path and query parameters for the API call, including project ID, branch or tag name, job name, artifact path, and optional job token.
Request Body Schema Schema for the request body, not used in this GET operation.
Request Path The API endpoint path template for fetching the raw artifact file.
Query Parameters Collection of query parameters including job name, artifact path inside the archive, and optional job token for multi-project pipelines.
Path Parameters Collection of path parameters including project ID and branch or tag name.

Output

JSON

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

Dependencies

  • An API key credential for GitLab authentication

Troubleshooting

  • Ensure the project ID and branch/tag name are correct and URL-encoded if necessary.
  • Verify the job name and artifact path exist in the specified job's artifacts.
  • Check that the GitLab API key has sufficient permissions to access the project and job artifacts.
  • If using job_token, confirm that the GitLab tier supports multi-project pipeline triggers and the token is valid.

Links

Discussion