GitLab API

GitlabTool

Actions1000

Overview

This node interacts with the GitLab API to upload artifacts for a specific job identified by its ID. It is useful in CI/CD pipelines where you need to programmatically add or update job artifacts in GitLab. For example, after a build job completes, you can use this node to upload build artifacts to GitLab for storage or further processing.

Use Case Examples

  1. Uploading build artifacts to a GitLab job after a CI pipeline run.
  2. Automating artifact management in GitLab jobs via n8n workflows.

Properties

Name Meaning
Skip Authentication Determines whether to skip the authentication step for the API request.
Authentication Specifies the authentication method to use, defaulting to GitLab API key authentication.
baseUrl The base URL of the GitLab instance to which the API request is sent.
Method The HTTP method used for the API request, default is GET but can be POST, PUT, DELETE, HEAD, or PATCH.
Path Parameters Parameters included in the API request path, specifically the job ID for which artifacts are being uploaded.

Output

JSON

  • id - The ID of the job for which artifacts were uploaded.
  • status - The status of the artifact upload operation.
  • message - Any message returned by the API regarding the upload operation.

Dependencies

  • GitLab API key credential

Troubleshooting

  • Ensure the job ID provided in the path parameters is valid and exists in the GitLab project.
  • Verify that the API key used for authentication has sufficient permissions to upload artifacts to the job.
  • Check the base URL to ensure it points to the correct GitLab instance.
  • Common error messages include authentication failures, invalid job ID, or insufficient permissions. Resolving these typically involves verifying credentials, job existence, and user permissions.

Discussion