GitLab API icon

GitLab API

Gitlab

Actions917

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, such as triggering CI/CD pipelines at regular intervals without manual intervention.

Use Case Examples

  1. Automate nightly builds by scheduling a pipeline to run every night.
  2. Set up a pipeline schedule to run tests every hour on a project.

Properties

Name Meaning
Skip Authentication Option to skip authentication for the request.
Authentication Type of authentication used, default is GitLab API key.
baseUrl Base URL of the GitLab instance, default is https://gitlab.com.
Method HTTP method to use for the request, default is POST for this operation.
Path Parameters Parameters to specify the project ID for which the pipeline schedule is created.

Output

JSON

  • id - ID of the created pipeline schedule.
  • description - Description of the pipeline schedule.
  • ref - Git reference (branch or tag) for the pipeline schedule.
  • 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.
  • created_at - Timestamp when the schedule was created.
  • updated_at - Timestamp when the schedule was last updated.

Dependencies

  • GitLab API key credential for authentication

Troubleshooting

  • Ensure the project ID is correctly specified and URL-encoded if necessary.
  • Verify that the authentication credentials are valid and have permission to create pipeline schedules.
  • Check that the request body includes all required fields as per GitLab API documentation for pipeline schedules.
  • Common error messages include 401 Unauthorized (invalid credentials), 404 Not Found (project ID does not exist), and 400 Bad Request (invalid request body). Resolving these involves correcting credentials, verifying project existence, and validating request data respectively.

Links

Discussion