GitLab API

GitlabTool

Actions1000

Overview

This node operation interacts with the GitLab API to upload Conan package files to a specific project. It constructs a POST request to the GitLab endpoint for Conan packages, allowing users to upload package files by specifying project and package details such as project ID, package name, version, username, channel, and Conan package reference. This is useful for automating package uploads in CI/CD pipelines or managing Conan packages programmatically within GitLab projects.

Use Case Examples

  1. Uploading a new version of a Conan package to a GitLab project as part of a build pipeline.
  2. Automating the distribution of Conan packages to multiple projects by specifying different project IDs and package details.

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. Hidden if Skip Authentication is true.
baseUrl The base URL of the GitLab instance to which the request is sent, 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 URL path to specify the project and Conan package details.

Output

JSON

  • upload_urls - The URLs returned by the GitLab API to which the Conan package files should be uploaded.

Dependencies

  • GitLab API authentication token or credentials

Troubleshooting

  • Ensure all required path parameters (project ID, package name, version, username, channel, and package reference) are correctly provided to avoid 404 or 400 errors.
  • Verify that the authentication token has sufficient permissions to upload packages to the specified project.
  • Check the base URL if using a self-hosted GitLab instance to ensure the API endpoint is reachable.
  • If skipping authentication, confirm that the GitLab instance allows unauthenticated uploads, which is uncommon.

Links

Discussion