GitLab API icon

GitLab API

Gitlab

Actions880

Overview

This node interacts with the GitLab API to create a new deployment for a specified project. It is useful for automating deployment processes within GitLab projects, such as triggering deployments programmatically after code changes or CI/CD pipeline completions.

Use Case Examples

  1. Automatically create a deployment record in GitLab after a successful build.
  2. Trigger deployments for specific projects by specifying project ID and deployment details.

Properties

Name Meaning
Skip Authentication Determines whether to skip API authentication for the request.
Authentication Specifies the authentication method to use for the API request.
baseUrl The base URL of the GitLab instance to which the API request is sent.
Method HTTP method to use for the API request.
Path Parameters Parameters to specify the project ID in the API path.

Output

JSON

  • id - The unique identifier of the created 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 (e.g., success, failed).
  • environment - The environment where the deployment is made (e.g., production, staging).
  • deployable - Details about the deployable job or pipeline related to the deployment.

Dependencies

  • GitLab API authentication token

Troubleshooting

  • Ensure the project ID provided in the path parameters is correct and accessible by the authenticated user.
  • Verify that the authentication token has sufficient permissions to create deployments in the specified project.
  • Check the base URL to confirm it points to the correct GitLab instance if using a self-hosted GitLab server.
  • Common error messages include 401 Unauthorized (authentication issues), 404 Not Found (invalid project ID), and 400 Bad Request (invalid request body). Resolving these involves correcting credentials, project ID, or request payload respectively.

Links

Discussion