GitLab API icon

GitLab API

Gitlab

Actions917

Overview

This node operation updates a GitLab CI/CD variable by its key using the GitLab API. It is useful for managing CI/CD variables programmatically, such as updating environment variables or secrets in GitLab projects or groups. For example, it can be used to automate the update of deployment keys or tokens in a CI/CD pipeline.

Use Case Examples

  1. Updating a CI/CD variable key to change its value or scope in a GitLab project.
  2. Automating the management of environment variables for different deployment environments.

Properties

Name Meaning
Skip Authentication Whether to skip authentication for the API request.
Authentication The authentication method used for the API request, defaulting to GitLab API key.
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 here it is PUT for updating.
Path Parameters The key of the CI variable to update, required for the API path parameter.

Output

JSON

  • response - The JSON response from the GitLab API after updating the CI variable, containing details of the updated variable.

Dependencies

  • GitLab API key credential

Troubleshooting

  • Ensure the provided key parameter matches an existing CI variable key; otherwise, the update will fail.
  • Authentication errors may occur if the API key is missing or invalid; verify credentials are correctly configured.
  • Check the baseUrl if using a self-hosted GitLab instance to ensure the URL is correct.

Links

Discussion