GitLab API

GitlabTool

Actions905

Overview

This node operation uploads a specific Conan package file to a GitLab project using the GitLab API. It is designed for managing Conan packages within GitLab's package registry, 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 for developers and DevOps teams who manage C/C++ package dependencies and want to automate package file uploads as part of their CI/CD pipelines or package management workflows.

Use Case Examples

  1. Uploading a new conanfile.py to a Conan package version in a GitLab project.
  2. Updating the conaninfo.txt file for a specific Conan package revision to reflect new build information.

Properties

Name Meaning
Skip Authentication Whether to skip authentication for the API request.
Authentication The authentication method used for the API request, typically a GitLab API key.
baseUrl The base URL of the GitLab instance to which the request is sent.
Method The HTTP method used for the request, defaulting to PUT for this operation.
Path Parameters Parameters required in the URL path to identify the project, package, version, user, channel, revisions, and file name for the Conan package file upload.

Output

JSON

  • id - The ID or URL-encoded path of the project.
  • package_name - The name of the Conan package.
  • package_version - The version of the Conan package.
  • package_username - The username or group owning the package.
  • package_channel - The channel of the Conan package.
  • recipe_revision - The revision number of the Conan recipe.
  • conan_package_reference - The unique Conan package ID.
  • package_revision - The revision number of the Conan package.
  • file_name - The name of the file uploaded to the package.

Dependencies

  • GitLab API key credential

Troubleshooting

  • Ensure all required path parameters are correctly provided and URL-encoded if necessary.
  • Verify that the GitLab API key has sufficient permissions to upload package files.
  • Check that the file_name parameter matches one of the allowed file names (e.g., conanfile.py, conaninfo.txt).
  • If authentication is skipped, ensure the GitLab instance allows unauthenticated uploads, which is uncommon.

Links

Discussion