GitLab API

GitlabTool

Actions905

Overview

This node operation uploads a specific file related to a Conan package to a GitLab package registry using the GitLab API. It is designed for managing Conan packages in GitLab, allowing users to update or add files such as conanfile.py, conanmanifest.txt, or conaninfo.txt for a given package version and revision. This is useful in continuous integration and package management workflows where automated package updates are required.

Use Case Examples

  1. Uploading a new conaninfo.txt file for a specific Conan package version to GitLab.
  2. Updating the conanfile.py of a Conan package to fix build instructions.
  3. Adding a new conan_sources.tgz archive to a package revision in the GitLab Conan registry.

Properties

Name Meaning
Skip Authentication Whether to skip authentication for the API request (boolean). Defaults to false.
Authentication The authentication method used for the API request, typically a GitLab API key credential. Hidden unless Skip Authentication is false.
baseUrl The base URL of the GitLab instance to which the request is sent. Defaults to https://gitlab.com.
Method HTTP method used for the request. For this operation, it is PUT.
Path Parameters Collection of parameters required in the API path to identify the package and file to upload. Includes package_name, package_version, package_username, package_channel, recipe_revision, conan_package_reference, package_revision, and file_name.

Output

JSON

  • statusCode - HTTP status code of the API response.
  • body - Response body from the GitLab API, typically containing details about the uploaded file or operation result.

Dependencies

  • Requires GitLab API authentication credentials (an API key or token).

Troubleshooting

  • Ensure all required path parameters are correctly provided and valid; missing or incorrect parameters will cause API errors.
  • Authentication errors may occur if the GitLab API token is missing, invalid, or lacks necessary permissions.
  • File upload may fail if the file_name parameter is not one of the allowed values or if the file content is missing or malformed.
  • Network or baseUrl misconfiguration can cause connection failures; verify the baseUrl is correct for your GitLab instance.

Links

Discussion