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 to handle package files related to Conan package management, such as conanfile.py, conanmanifest.txt, and others. This operation is useful for automating the management and distribution of Conan packages within GitLab projects, enabling continuous integration and deployment workflows involving package versioning and distribution.

Use Case Examples

  1. Uploading a new version of a Conan package file to a GitLab project to update the package repository.
  2. Automating the export of Conan package recipe files to GitLab as part of a CI/CD pipeline.

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, defaulting to https://gitlab.com.
Method The HTTP method used for the request, default is PUT for this operation.
Path Parameters Parameters required in the API path to identify the project and package details.

Output

JSON

  • statusCode - HTTP status code of the API response indicating success or failure.
  • body - The response body from the GitLab API, typically containing details about the uploaded file or error information.

Dependencies

  • GitLab API key credential for authentication

Troubleshooting

  • Ensure all required path parameters are correctly provided and URL-encoded if necessary.
  • Verify that the authentication token has sufficient permissions to upload package files to the specified project.
  • Check that the file_name parameter matches one of the allowed enum values to avoid invalid file errors.
  • Common errors include 401 Unauthorized (authentication issues), 404 Not Found (incorrect project or package identifiers), and 400 Bad Request (invalid parameters or payload).
  • To resolve errors, confirm the API endpoint path parameters, authentication credentials, and file content are correct.

Links

Discussion