GitLab API

GitlabTool

Actions905

Overview

This node interacts with the GitLab API to post artifacts to a specific job identified by its ID. It is useful for automating the upload of job artifacts in CI/CD pipelines or other GitLab job-related workflows. For example, it can be used to programmatically upload build artifacts or test results to a GitLab job.

Use Case Examples

  1. Uploading build artifacts to a GitLab job after a successful build.
  2. Automating the upload of test reports to a GitLab job for later review.

Properties

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

Output

JSON

  • id - The ID of the job to which artifacts are being posted.
  • artifacts - The artifacts data posted to the job, typically including files or metadata.

Dependencies

  • GitLab API authentication credential

Troubleshooting

  • Ensure the job ID provided in the path parameters is valid and exists in the GitLab instance.
  • Verify that the authentication credentials are correctly configured and have sufficient permissions to post artifacts to the job.
  • Check the base URL to ensure it points to the correct GitLab instance, especially if using a self-hosted GitLab server.
  • If the API request fails, review the HTTP method and request body to ensure they conform to the GitLab API specifications for posting job artifacts.

Links

Discussion