GitLab API

GitlabTool

Actions905

Overview

This node operation updates a specific CI variable in the GitLab Admin API by its key. It is useful for managing CI/CD variables programmatically, such as modifying environment variables used in GitLab pipelines. For example, it can be used to update a secret token or configuration value for CI jobs without manual intervention.

Use Case Examples

  1. Updating a CI variable key 'DEPLOY_TOKEN' with a new value to automate deployment credentials rotation.
  2. Modifying a CI variable to change environment-specific settings in a GitLab project pipeline.

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 HTTP method used for the request, defaulting to PUT for this operation.
Path Parameters Collection of path parameters required for the API endpoint, specifically the 'key' of the CI variable to update.

Output

JSON

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

Dependencies

  • Requires GitLab API key credentials for authentication.

Troubleshooting

  • Ensure the 'key' path parameter is correctly set to the existing CI variable key; otherwise, the API will return an error indicating the variable was not found.
  • Verify that the GitLab API key has sufficient permissions to update admin CI variables.
  • If skipping authentication, the request may fail due to lack of authorization.
  • Check the baseUrl to ensure it points to the correct GitLab instance, especially if using a self-hosted GitLab server.

Links

Discussion