GitLab API

GitlabTool

Actions1000

Overview

This node operation interacts with the GitLab API to obtain upload URLs for a Conan package within a specific project. It is useful for automating the process of uploading Conan packages to GitLab's package registry, particularly when managing package versions, usernames, and channels programmatically. For example, it can be used in CI/CD pipelines to streamline package uploads after builds.

Use Case Examples

  1. Uploading a new version of a Conan package to a GitLab project.
  2. Automating package uploads for different channels (e.g., stable, beta) in a project.

Properties

Name Meaning
Skip Authentication Determines whether to skip API authentication for the request.
Authentication Specifies the authentication method to use, typically an API key credential for GitLab.
baseUrl The base URL of the GitLab instance, defaulting to https://gitlab.com.
Method The HTTP method to use for the request, defaulting to GET but can be set to POST, PUT, DELETE, HEAD, or PATCH.
Path Parameters Parameters required in the API path to specify the project and package details, including project ID, package name, version, username, and channel.

Output

JSON

  • upload_urls - The URLs returned by the API for uploading the Conan package files.

Dependencies

  • GitLab API key credential

Troubleshooting

  • Ensure all path parameters (id, package_name, package_version, package_username, package_channel) are correctly provided and URL-encoded if necessary.
  • If authentication is skipped, the request may fail due to lack of permissions.
  • Verify the baseUrl is correct and accessible.
  • Common error messages include 401 Unauthorized (check API credentials), 404 Not Found (check project and package details), and 400 Bad Request (check parameter formats).

Links

Discussion