GitLab API

GitlabTool

Actions905

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 after code merges or updates. For example, it can be used in CI/CD workflows to programmatically register deployments in GitLab.

Use Case Examples

  1. Creating a deployment record for a project after a successful build.
  2. Automating deployment tracking in GitLab projects via n8n workflows.

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 HTTP method to use for the request, default is GET but POST is used for creating deployments.
Path Parameters Parameters to specify the project ID or URL-encoded path for which the deployment is created.

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 to which the deployment was made.
  • deployable - Details about the deployable job related to the deployment.

Dependencies

  • Requires GitLab API authentication credentials.

Troubleshooting

  • Ensure the project ID or URL-encoded path is correct to avoid 404 errors.
  • Verify that the authentication credentials are valid and have sufficient permissions to create deployments.
  • Check the request body schema to ensure all required fields for deployment creation are provided.

Links

Discussion