GitLab API

GitlabTool

Actions905

Overview

This node operation allows importing a project into GitLab from an S3 bucket using the GitLab API. It is useful for automating the import of remote projects stored in AWS S3 into a GitLab instance, supporting detailed project configuration and override parameters. Practical examples include migrating projects from external storage to GitLab or setting up new projects with specific settings programmatically.

Use Case Examples

  1. Import a project from an S3 bucket by specifying AWS region, bucket name, file key, and AWS credentials, along with the desired project path and optional project settings.
  2. Overwrite an existing project in a namespace by enabling the overwrite flag and providing detailed override parameters such as visibility, CI configuration, and access levels.

Properties

Name Meaning
Skip Authentication Whether to skip authentication for the API request.
baseUrl The base URL of the GitLab instance to which the request is sent.
Method HTTP method to use for the request (GET, POST, PUT, DELETE, HEAD, PATCH).
Parameter Schema Defines the form data parameters required for the S3 remote import, including AWS credentials, project path, and optional override parameters for project settings.

Output

JSON

  • id - The unique identifier of the imported project.
  • name - The name of the imported project.
  • path - The path of the imported project.
  • namespace - The namespace into which the project is imported.
  • import_status - Status of the import operation.
  • created_at - Timestamp when the project was created.
  • web_url - URL to access the imported project in GitLab.

Dependencies

  • GitLab API authentication token or credentials

Troubleshooting

  • Ensure AWS credentials (access key ID and secret access key) are correct and have sufficient permissions to access the specified S3 bucket.
  • Verify that the GitLab API base URL is correct and accessible from the environment where the node runs.
  • Check that the project path and namespace are valid and that the user has permissions to create or overwrite projects in the target namespace.
  • If the import fails, review the error message returned by the GitLab API for details such as invalid parameters or authentication issues.

Links

Discussion