GitLab API

GitlabTool

Actions905

Overview

This node operation allows users to create a new pipeline schedule for a specific project in GitLab by making a POST request to the GitLab API endpoint `/api/v4/projects/{id}/pipeline_schedules`. It is useful for automating pipeline runs on a schedule within a GitLab project, such as triggering CI/CD pipelines at regular intervals or specific times.

Use Case Examples

  1. Automate running tests every night by scheduling a pipeline in a GitLab project.
  2. Set up a deployment pipeline to run every Monday morning automatically.

Properties

Name Meaning
Skip Authentication Option to skip authentication for the request, useful for public endpoints or testing.
Authentication Select the authentication method, defaulting to GitLab API key authentication.
baseUrl Base URL of the GitLab instance, defaulting to https://gitlab.com.
Method HTTP method to use for the request, default is POST for this operation.
Path Parameters Parameters to be included in the request path, specifically the project ID or URL-encoded path.

Output

JSON

  • id - The unique identifier of the created pipeline schedule.
  • description - Description of the pipeline schedule.
  • ref - The Git reference (branch or tag) the pipeline schedule runs on.
  • cron - Cron syntax defining the schedule timing.
  • cron_timezone - Timezone for the cron schedule.
  • next_run_at - Timestamp of the next scheduled run.
  • active - Boolean indicating if the schedule is active.
  • owner
    • id - ID of the user who owns the schedule.
    • username - Username of the schedule owner.
    • name - Full name of the schedule owner.

Dependencies

  • GitLab API key credential

Troubleshooting

  • Ensure the project ID provided in path parameters is correct and accessible with the authenticated user.
  • Verify that the authentication credentials (GitLab API key) are valid and have sufficient permissions to create pipeline schedules.
  • Check the request body schema for required fields and correct data types to avoid validation errors from the API.
  • If skipping authentication, confirm that the GitLab instance allows unauthenticated requests for this endpoint, otherwise the request will fail.

Links

Discussion