GitLab API

GitlabTool

Actions1000

Overview

This node operation allows users to create or update variables for a specific pipeline schedule within a GitLab project. It is useful for automating the management of pipeline schedule variables, enabling dynamic configuration of CI/CD pipelines in GitLab projects. For example, users can programmatically add or modify environment variables that a scheduled pipeline uses, facilitating automated deployment or testing workflows.

Use Case Examples

  1. Automate adding variables to a scheduled pipeline in a GitLab project.
  2. Update pipeline schedule variables as part of a CI/CD automation process.

Properties

Name Meaning
Skip Authentication Option to skip authentication for the request.
Authentication Type of authentication used for the request, defaulting to 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 for the API path, including project ID and pipeline schedule ID.

Output

JSON

  • id - The ID of the created or updated pipeline schedule variable.
  • key - The key/name of the pipeline schedule variable.
  • value - The value assigned to the pipeline schedule variable.
  • variable_type - The type of the variable (e.g., env_var).
  • protected - Indicates if the variable is protected.
  • masked - Indicates if the variable is masked.
  • environment_scope - The environment scope where the variable is applied.

Dependencies

  • GitLab API key credential

Troubleshooting

  • Ensure the project ID and pipeline schedule ID are correctly provided and exist in GitLab.
  • Verify that the API key used has sufficient permissions to modify pipeline schedule variables.
  • 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 (404), and validation errors for variable data. Resolving these involves verifying credentials, IDs, and request body format.

Links

Discussion