GitLab API

GitlabTool

Actions1000

Overview

This node operation updates a specific deployment in a GitLab project using the GitLab API. It is useful for scenarios where you need to modify deployment details such as status or environment for a given deployment ID within a project. For example, updating deployment information after a new release or correcting deployment metadata.

Use Case Examples

  1. Updating deployment status for a project deployment in GitLab.
  2. Modifying deployment environment details for a specific deployment ID.

Properties

Name Meaning
Skip Authentication Determines whether to skip authentication for the API request.
Authentication Specifies the authentication method to use, typically a GitLab API key.
baseUrl The base URL of the GitLab instance, defaulting to https://gitlab.com.
Method HTTP method to use for the request, default is PUT for this operation.
Path Parameters Parameters for the API path including project ID and deployment ID.

Output

JSON

  • id - The unique identifier of the deployment.
  • iid - Internal ID of the deployment within the project.
  • ref - The Git reference (branch or tag) associated with the deployment.
  • sha - The commit SHA associated with the deployment.
  • created_at - Timestamp when the deployment was created.
  • updated_at - Timestamp when the deployment was last updated.
  • status - Current status of the deployment.
  • environment - The environment to which the deployment was made.
  • deployable - Details about the deployable job or pipeline.

Dependencies

  • GitLab API key credential

Troubleshooting

  • Ensure the project ID and deployment ID are correctly specified and exist in the GitLab instance.
  • Verify that the API key used for authentication has sufficient permissions to update deployments.
  • Check the base URL if using a self-hosted GitLab instance to ensure it is correct.
  • Common error messages include 401 Unauthorized (authentication issues), 404 Not Found (invalid project or deployment ID), and 400 Bad Request (invalid request body). Resolving these involves verifying credentials, IDs, and request payload formats.

Links

Discussion