GitLab API

GitlabTool

Actions1000

Overview

This node operation uploads or updates a specific Conan package file in a GitLab project using the GitLab API. It is useful for managing Conan package files within a project's package registry, allowing users to programmatically maintain package versions and revisions. For example, it can be used to upload a 'conaninfo.txt' file for a particular package version and revision in a CI/CD pipeline.

Use Case Examples

  1. Uploading a new revision of a Conan package file to a GitLab project.
  2. Updating the 'conanmanifest.txt' file for a specific package version in a project.

Properties

Name Meaning
Skip Authentication Whether to skip authentication for the API request.
baseUrl The base URL of the GitLab instance, defaulting to https://gitlab.com.
Method HTTP method to use for the request, default is GET with options including POST, PUT, DELETE, HEAD, PATCH.
Path Parameters Parameters required in the API path to identify the project and package details, including project ID, package name, version, username, channel, recipe revision, Conan package reference, package revision, and file name.

Output

JSON

  • statusCode - HTTP status code returned by the API after the request.
  • body - Response body containing details about the uploaded or updated package file.

Dependencies

  • GitLab API authentication token or credentials

Troubleshooting

  • Ensure all required path parameters are correctly provided and URL-encoded if necessary.
  • Verify that the authentication token has sufficient permissions to upload or update package files in the specified project.
  • Check that the file name is one of the allowed values: 'conanfile.py', 'conanmanifest.txt', 'conan_sources.tgz', 'conan_export.tgz', 'conaninfo.txt', or 'conan_package.tgz'.
  • Common errors include 401 Unauthorized (authentication issues), 404 Not Found (incorrect project ID or package details), and 400 Bad Request (invalid parameters).

Discussion