GitLab API icon

GitLab API

Gitlab

Actions880

Overview

This node operation allows users to upload artifacts to a specific job in GitLab by making a POST request to the endpoint `/api/v4/jobs/{id}/artifacts`. It is useful for automating the process of attaching build or test artifacts to CI/CD jobs in GitLab pipelines, enabling better tracking and management of job outputs.

Use Case Examples

  1. Uploading build artifacts to a GitLab job after a CI pipeline run.
  2. Attaching test result files to a specific job for later review.

Properties

Name Meaning
Skip Authentication Option to skip authentication for the request.
Authentication Type of authentication used, default is GitLab API key.
baseUrl Base URL of the GitLab instance, default is https://gitlab.com.
Method HTTP method to use for the request, default is GET but POST is used for this operation.
Path Parameters Parameters to be included in the request path, specifically the job ID for this operation.

Output

JSON

  • id - The ID of the job to which artifacts are being uploaded.
  • artifacts - The artifacts data uploaded to the job.

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 authentication credentials (GitLab API key) are correctly configured and have sufficient permissions to upload artifacts.
  • Check the base URL if using a self-hosted GitLab instance to ensure it is correct.
  • Common error messages may include authentication failures, invalid job ID, or permission denied errors. Verify credentials and job ID to resolve these.

Links

Discussion