GitLab API

GitlabTool

Actions1000

Overview

This node operation allows importing a project into GitLab from an S3 remote source. It is useful for automating the import of projects stored in AWS S3 buckets into GitLab, enabling seamless migration or backup restoration workflows. For example, a user can specify the S3 bucket details and project parameters to import a project directly into their GitLab namespace.

Use Case Examples

  1. Import a project from an S3 bucket by providing AWS region, bucket name, file key, and access credentials along with the desired project path and optional parameters like project name and namespace.
  2. Overwrite an existing project in the same namespace by setting the overwrite flag to true during import.

Properties

Name Meaning
Skip Authentication Whether to skip authentication for the request (boolean). Defaults to false.
Authentication The authentication method used, defaulting to GitLab API key authentication.
baseUrl The base URL of the GitLab instance, defaulting to https://gitlab.com.
Method HTTP method to use for the request, defaulting to GET but typically POST for this operation.
Parameter Schema Schema defining the form data parameters required for the S3 remote import operation, including AWS credentials, bucket details, project path, and various optional override parameters to customize the imported project.

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 - The status of the import operation.
  • created_at - Timestamp when the project was created.
  • errors - Any errors encountered during the import process.

Dependencies

  • GitLab API key credential

Troubleshooting

  • Ensure all required AWS S3 parameters (region, bucket_name, file_key, access_key_id, secret_access_key) are correctly provided to avoid authentication or access errors.
  • Verify that the GitLab base URL is correct and accessible.
  • If the import fails, check the error messages returned in the output for details on missing or invalid parameters.
  • Make sure the overwrite flag is used carefully to avoid unintentional data loss by overwriting existing projects.

Links

Discussion