GitLab API

GitlabTool

Actions1000

Overview

This node operation uploads a specific Conan package file to a GitLab instance using the GitLab API. It is designed for managing Conan packages within GitLab's package registry, allowing users to programmatically upload files such as conanfile.py, conanmanifest.txt, or conan_package.tgz to a specified package version and channel. This is useful for automating package management workflows in CI/CD pipelines or package distribution systems.

Use Case Examples

  1. Uploading a new conanfile.py to a specific package version and channel in GitLab.
  2. Automating the upload of conan_package.tgz files after a build process completes.

Properties

Name Meaning
Skip Authentication Determines whether to skip authentication for the API request.
Authentication Specifies the authentication method to use, defaulting to GitLab API authentication. This is 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 The HTTP method used for the request. Defaults to GET but can be set to POST, PUT, DELETE, HEAD, or PATCH.
Path Parameters Collection of parameters required to specify the exact Conan package file to upload, including package name, version, username, channel, recipe revision, and file name.

Output

JSON

  • response - The JSON response from the GitLab API after uploading the Conan package file.

Dependencies

  • GitLab API authentication credential

Troubleshooting

  • Ensure all path parameters are correctly set and match the package details in GitLab.
  • Verify that the authentication token has sufficient permissions to upload package files.
  • Check the baseUrl to ensure it points to the correct GitLab instance.
  • If skipping authentication, ensure the GitLab instance allows unauthenticated uploads (rare).
  • Common errors include 401 Unauthorized (authentication issues), 404 Not Found (incorrect package details), and 400 Bad Request (invalid file or parameters).

Links

Discussion