GitLab API

GitlabTool

Actions905

Overview

This node interacts with the GitLab API to stop stale environments for a specific project. It is useful in scenarios where you want to automate the cleanup of outdated or inactive environments in your GitLab projects, helping maintain a clean and efficient development environment. For example, after a deployment pipeline finishes, this node can be used to stop environments that are no longer needed.

Use Case Examples

  1. Automatically stop stale environments in a GitLab project after a deployment pipeline completes.
  2. Clean up inactive environments in a project to save resources and reduce clutter.

Properties

Name Meaning
Skip Authentication Option to skip authentication for the request.
Authentication Type of authentication used, default is 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 to be included in the request path, specifically the project ID or URL-encoded path.

Output

JSON

  • response - The JSON response from the GitLab API after stopping stale environments.

Dependencies

  • GitLab API key credential for authentication

Troubleshooting

  • Ensure the project ID provided in the path parameters is correct and accessible by the authenticated user.
  • Verify that the GitLab API key credential is valid and has sufficient permissions to stop environments.
  • Check the baseUrl if using a self-hosted GitLab instance to ensure it is correct.
  • Common error messages may include authentication failures, permission denied, or invalid project ID. Verify credentials and parameters accordingly.

Links

Discussion