GitLab API

GitlabTool

Actions1000

Overview

This node operation deletes a specific deployment from a project in GitLab using the GitLab API. It is useful for managing and cleaning up deployments within a project, especially when a deployment is no longer needed or was created by mistake. For example, a user can automate the removal of outdated deployments to keep the project environment clean.

Use Case Examples

  1. Automate deletion of a deployment by specifying the project ID and deployment ID.
  2. Remove a deployment from a project as part of a cleanup workflow after a release.

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 authentication.
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 can be set to DELETE for this operation.
Path Parameters Parameters required in the request path to identify the project and deployment to delete.

Output

JSON

  • statusCode - The HTTP status code returned by the API after attempting to delete the deployment.
  • responseBody - The body of the response from the API, typically empty for a successful delete operation.

Dependencies

  • GitLab API authentication token or credentials

Troubleshooting

  • Ensure the project ID and deployment ID are correct and exist in the GitLab instance.
  • Verify that the authentication credentials have sufficient permissions to delete deployments.
  • If skipping authentication, ensure the GitLab instance allows unauthenticated requests for this operation, which is uncommon.
  • Check the base URL to ensure it points to the correct GitLab instance, especially if using a self-hosted GitLab server.

Links

Discussion