GitLab API icon

GitLab API

Gitlab

Actions880

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 projects, especially when a deployment is no longer needed or was created by mistake. For example, a DevOps engineer might use this node to automate the removal of outdated or failed deployments in a CI/CD pipeline.

Use Case Examples

  1. Deleting a deployment by specifying the project ID and deployment ID to keep the project environment clean.
  2. Automating deployment cleanup in GitLab projects as part of a scheduled maintenance workflow.

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 URL path to identify the project and deployment to delete.

Output

JSON

  • statusCode - 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.
  • Check the base URL to confirm it points to the correct GitLab instance.
  • Common error messages include 404 Not Found if the deployment or project does not exist, and 403 Forbidden if the user lacks permission to delete the deployment.

Links

Discussion