GitLab API

GitlabTool

Actions1000

Overview

This node operation retrieves specific files from a Conan package stored in GitLab's package registry using the GitLab API. It is useful for developers or CI/CD pipelines that need to access package metadata or contents such as conanfile.py, conanmanifest.txt, or conaninfo.txt for a given package version and revision. For example, it can be used to fetch the conaninfo.txt file of a particular package version to inspect its build information.

Use Case Examples

  1. Fetching the conaninfo.txt file for a specific Conan package version to verify build details.
  2. Retrieving the conanfile.py to analyze the package recipe used for building the package.

Properties

Name Meaning
Skip Authentication Whether to skip authentication when making the API request. Defaults to false, meaning authentication is used.
baseUrl The base URL of the GitLab instance to send the API request to. Defaults to https://gitlab.com.
Method The HTTP method to use for the API request. Defaults to GET. Options include GET, POST, PUT, DELETE, HEAD, PATCH.
Path Parameters Parameters required to specify the exact Conan package file to retrieve. Includes package_name, package_version, package_username, package_channel, recipe_revision, conan_package_reference, package_revision, and file_name.

Output

JSON

  • data - The content of the requested Conan package file retrieved from the GitLab API.

Dependencies

  • GitLab API authentication credentials (unless Skip Authentication is true)

Troubleshooting

  • Ensure all required path parameters are provided and correctly formatted; missing or incorrect parameters will cause the API request to fail.
  • If authentication is enabled, verify that the GitLab API credentials are valid and have sufficient permissions to access the package registry.
  • Check the baseUrl if using a self-hosted GitLab instance to ensure it is correct.
  • Common error messages include 404 Not Found if the package or file does not exist, and 401 Unauthorized if authentication fails.

Discussion