GitLab API

GitlabTool

Actions905

Overview

This node operation retries a specific pipeline in a GitLab project by making a POST request to the GitLab API endpoint `/api/v4/projects/{id}/pipelines/{pipeline_id}/retry`. It is useful for automating the retry of failed or canceled pipelines in continuous integration workflows within GitLab projects.

Use Case Examples

  1. Automatically retry a failed pipeline in a GitLab project to ensure code changes are properly tested.
  2. Trigger a retry of a specific pipeline after fixing an issue without manually accessing the GitLab UI.

Properties

Name Meaning
Skip Authentication Whether to skip authentication for the API request.
Authentication The authentication method used for the API request, typically an API key credential for GitLab.
baseUrl The base URL of the GitLab instance, defaulting to https://gitlab.com.
Method The HTTP method used for the request, which is POST for this operation.
Path Parameters Parameters required in the URL path to identify the project and pipeline to retry.

Output

JSON

  • id - The ID of the retried pipeline.
  • status - The status of the retried pipeline.
  • ref - The Git reference (branch or tag) for the pipeline.
  • sha - The commit SHA associated with the pipeline.
  • web_url - The URL to view the pipeline in GitLab.

Dependencies

  • GitLab API with authentication credentials

Troubleshooting

  • Ensure the project ID and pipeline ID are correct and exist in the GitLab instance.
  • Verify that the API authentication credentials are valid and have sufficient permissions to retry pipelines.
  • Check the base URL if using a self-hosted GitLab instance to ensure it is correct.
  • Common error messages include 404 Not Found if the project or pipeline does not exist, and 401 Unauthorized if authentication fails.

Links

Discussion