GitLab API

GitlabTool

Actions905

Overview

This node performs an HTTP PUT request to update a specific job in GitLab using the GitLab API. It is useful for automating job updates in GitLab CI/CD pipelines, such as modifying job attributes or statuses programmatically.

Use Case Examples

  1. Updating a job's status or attributes in a GitLab CI/CD pipeline.
  2. Automating job management tasks in GitLab projects.

Properties

Name Meaning
Skip Authentication Determines whether to skip authentication for the request.
Authentication Specifies the authentication method to use, defaulting to GitLab API authentication.
baseUrl The base URL of the GitLab instance to which the request is sent.
Method The HTTP method to use for the request, default is PUT for this operation.
Path Parameters Parameters to specify the job ID in the request path.

Output

JSON

  • id - The unique identifier of the job.
  • status - The status of the job after update.
  • name - The name of the job.
  • stage - The stage of the job in the pipeline.
  • created_at - Timestamp when the job was created.
  • started_at - Timestamp when the job started.
  • finished_at - Timestamp when the job finished.
  • duration - Duration of the job execution.
  • user - User who triggered the job.
  • pipeline - Pipeline information associated with the job.

Dependencies

  • GitLab API authentication token or credentials

Troubleshooting

  • Ensure the job ID provided in the path parameters is valid and exists in the GitLab project.
  • Verify that the authentication credentials are correct and have sufficient permissions to update jobs.
  • Check the base URL to ensure it points to the correct GitLab instance.
  • Common error messages include 401 Unauthorized (authentication failure), 404 Not Found (invalid job ID), and 400 Bad Request (invalid request body). Resolving these involves correcting credentials, job ID, or request payload.

Links

Discussion