GitLab API

GitlabTool

Actions1000

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 successful deployment.
  2. Trigger a retry of a specific pipeline after fixing issues in the codebase without manual intervention.

Properties

Name Meaning
Skip Authentication Option to skip authentication for the API request.
Authentication Type of authentication used for the API request, defaulting to GitLab API key.
baseUrl Base URL of the GitLab instance, default is https://gitlab.com.
Method HTTP method used for the request, default is GET but POST is used for this operation.
Path Parameters Parameters for the API path including project ID and pipeline ID.

Output

JSON

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

Dependencies

  • GitLab API key credential

Troubleshooting

  • Ensure the project ID and pipeline ID are correct and exist in the GitLab instance.
  • Verify that the API key used for authentication has 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