GitLab API icon

GitLab API

Gitlab

Actions917

Overview

This node operation allows users to register a new 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 within GitLab projects, enabling continuous integration workflows to be dynamically configured and scaled.

Use Case Examples

  1. Automatically add a new runner to a project when a new project is created.
  2. Manage runners programmatically for multiple projects in GitLab to streamline CI/CD pipeline setups.

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 key authentication.
baseUrl The base URL of the GitLab instance to which the API request is sent, defaulting to https://gitlab.com.
Method The HTTP method used for the API request, defaulting 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 unique identifier of the registered runner.
  • description - Description of the runner.
  • active - Indicates if the runner is active.
  • is_shared - Indicates if the runner is shared across projects.
  • runner_type - Type of the runner (e.g., project, group, instance).
  • status - Current status of the runner.
  • tags - Tags associated with the runner.

Dependencies

  • GitLab API key credential

Troubleshooting

  • Ensure the project ID provided in the path parameters is correct and accessible by the authenticated user.
  • Verify that the API key credential has sufficient permissions to register runners for the project.
  • 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 verifying credentials, project existence, and request payload format.

Links

Discussion