GitLab API

GitlabTool

Actions1000

Overview

This node operation allows users to register a runner to a specific GitLab project by making a POST request to the GitLab API endpoint `/api/v4/projects/{id}/runners`. It is useful for automating the management of CI/CD runners associated with projects, enabling continuous integration workflows. For example, a DevOps engineer can use this node to programmatically add runners to projects as part of their deployment pipeline.

Use Case Examples

  1. Registering a new runner to a project to enable CI/CD pipelines.
  2. Automating runner assignments across multiple projects in GitLab.

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, defaulting to https://gitlab.com.
Method The HTTP method to use for the request, defaulting to GET but can be set to POST for this operation.
Path Parameters The path parameters for the API request, specifically the project ID or URL-encoded path owned by the authenticated user.

Output

JSON

  • id - The ID of the registered runner.
  • description - Description of the runner.
  • active - Indicates if the runner is active.
  • is_shared - Indicates if the runner is shared.
  • runner_type - Type of the runner.
  • status - Current status of the runner.

Dependencies

  • GitLab API authentication

Troubleshooting

  • Ensure the project ID provided in the path parameters is correct and accessible by the authenticated user.
  • Verify that the authentication credentials are valid and have the necessary permissions to register runners.
  • Check the base URL to ensure it points to the correct GitLab instance.
  • Common error messages include 401 Unauthorized (authentication issues), 404 Not Found (invalid project ID), and 400 Bad Request (invalid request body). Resolving these involves correcting credentials, project ID, or request payload.

Links

Discussion