GitLab API

GitlabTool

Actions905

Overview

This node operation triggers the 'play' action on a specific job within a GitLab project using the GitLab API. It is useful for automating CI/CD workflows by programmatically starting a job in a project pipeline. For example, it can be used to restart a failed job or trigger a manual job in a pipeline.

Use Case Examples

  1. Trigger a job to start running in a GitLab project pipeline by specifying the project ID and job ID.
  2. Automate the execution of specific jobs in GitLab CI/CD pipelines as part of a larger workflow.

Properties

Name Meaning
Skip Authentication Option to skip authentication for the request, default is false.
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.
Path Parameters Parameters to specify the project ID and job ID for the job to be played.

Output

JSON

  • response - The response from the GitLab API after triggering the job play action.

Dependencies

  • GitLab API key credential

Troubleshooting

  • Ensure the project ID and job ID are correct and exist in the GitLab instance.
  • Verify that the API key has sufficient permissions to trigger jobs in the project.
  • Check the base URL if using a self-hosted GitLab instance to ensure it is correct.
  • Common error messages include authentication failures, resource not found (invalid project or job ID), and permission denied errors. Verify credentials and IDs to resolve these.

Links

  • GitLab API - Play a Job - Official GitLab API documentation for the 'play a job' endpoint used by this node operation.

Discussion