GitLab API

GitlabTool

Actions1000

Overview

This node operation retrieves a specific Maven package file from a GitLab project using the GitLab API. It is useful for automating the download or inspection of Maven package files stored in GitLab projects, such as JAR files or other artifacts, by specifying the project ID, package path, and file name.

Use Case Examples

  1. Downloading a Maven package file from a GitLab project for use in a build pipeline.
  2. Automating the retrieval of specific Maven artifacts for deployment or analysis.

Properties

Name Meaning
Skip Authentication Option to skip authentication when making the API request.
Authentication Type of authentication used for the API request, defaulting to GitLab API key authentication.
baseUrl Base URL of the GitLab instance, defaulting to https://gitlab.com.
Method HTTP method used for the request, default is GET.
Query Parameters.path Package path within the Maven repository, e.g., foo/bar/mypkg/1.0-SNAPSHOT.
Path Parameters.id The ID or URL-encoded path of the GitLab project.
Path Parameters.file_name The name of the Maven package file to retrieve, e.g., mypkg-1.0-SNAPSHOT.jar.

Output

JSON

  • id - The ID or URL-encoded path of the project.
  • path - The package path within the Maven repository.
  • file_name - The Maven package file name.

Dependencies

  • GitLab API key credential

Troubleshooting

  • Ensure the project ID and file name are correctly URL-encoded to avoid 404 errors.
  • Verify that the authentication token has sufficient permissions to access the project's packages.
  • Check the baseUrl if using a self-hosted GitLab instance to ensure it is correct.

Links

Discussion