GitLab API

GitlabTool

Actions905

Overview

This node operation retrieves specific Conan package files from a GitLab project using the GitLab API. It is useful for developers and DevOps engineers who need to access package files such as conanfile.py, conanmanifest.txt, or conaninfo.txt for managing Conan packages stored in GitLab. For example, it can be used to automate the retrieval of package metadata or source files during a CI/CD pipeline.

Use Case Examples

  1. Fetching the conaninfo.txt file of a specific Conan package version to verify package details before deployment.
  2. Downloading the conanfile.py recipe to inspect or modify the package build instructions programmatically.

Properties

Name Meaning
Skip Authentication Whether to skip authentication when making the API request.
baseUrl The base URL of the GitLab instance, defaulting to https://gitlab.com.
Method HTTP method to use for the request, default is GET.
Path Parameters Parameters required to specify the exact Conan package file to retrieve, including project ID, package name, version, username, channel, recipe revision, package reference, package revision, and file name.

Output

JSON

  • fileContent - The content of the requested Conan package file.
  • fileName - The name of the retrieved file.
  • projectId - The ID or path of the GitLab project.
  • packageName - The name of the Conan package.
  • packageVersion - The version of the Conan package.

Dependencies

  • GitLab API authentication token or API key credential

Troubleshooting

  • Ensure all required path parameters are correctly provided and URL-encoded if necessary.
  • Verify that the GitLab API token has sufficient permissions to access the project and package files.
  • Check the file_name parameter to ensure it matches one of the allowed file names (e.g., conanfile.py, conaninfo.txt).
  • Common error: 404 Not Found - This indicates the specified project, package, or file does not exist or is inaccessible.
  • Common error: 401 Unauthorized - This indicates missing or invalid authentication credentials.

Links

Discussion