PipelineScheduleArgs

data class PipelineScheduleArgs(val active: Output<Boolean>? = null, val cron: Output<String>? = null, val cronTimezone: Output<String>? = null, val description: Output<String>? = null, val project: Output<String>? = null, val ref: Output<String>? = null, val takeOwnership: Output<Boolean>? = null) : ConvertibleToJava<PipelineScheduleArgs>

The gitlab.PipelineSchedule resource allows to manage the lifecycle of a scheduled pipeline. Upstream API: GitLab REST API docs

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as gitlab from "@pulumi/gitlab";
const example = new gitlab.PipelineSchedule("example", {
project: "12345",
description: "Used to schedule builds",
ref: "refs/heads/main",
cron: "0 1 * * *",
});
import pulumi
import pulumi_gitlab as gitlab
example = gitlab.PipelineSchedule("example",
project="12345",
description="Used to schedule builds",
ref="refs/heads/main",
cron="0 1 * * *")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using GitLab = Pulumi.GitLab;
return await Deployment.RunAsync(() =>
{
var example = new GitLab.PipelineSchedule("example", new()
{
Project = "12345",
Description = "Used to schedule builds",
Ref = "refs/heads/main",
Cron = "0 1 * * *",
});
});
package main
import (
"github.com/pulumi/pulumi-gitlab/sdk/v8/go/gitlab"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := gitlab.NewPipelineSchedule(ctx, "example", &gitlab.PipelineScheduleArgs{
Project: pulumi.String("12345"),
Description: pulumi.String("Used to schedule builds"),
Ref: pulumi.String("refs/heads/main"),
Cron: pulumi.String("0 1 * * *"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gitlab.PipelineSchedule;
import com.pulumi.gitlab.PipelineScheduleArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var example = new PipelineSchedule("example", PipelineScheduleArgs.builder()
.project("12345")
.description("Used to schedule builds")
.ref("refs/heads/main")
.cron("0 1 * * *")
.build());
}
}
resources:
example:
type: gitlab:PipelineSchedule
properties:
project: '12345'
description: Used to schedule builds
ref: refs/heads/main
cron: 0 1 * * *

Import

Starting in Terraform v1.5.0 you can use an import block to import gitlab_pipeline_schedule. For example: terraform import { to = gitlab_pipeline_schedule.example id = "see CLI command below for ID" } Import using the CLI is supported using the following syntax: GitLab pipeline schedules can be imported using an id made up of {project_id}:{pipeline_schedule_id}, e.g.

$ pulumi import gitlab:index/pipelineSchedule:PipelineSchedule test 1:3

Constructors

Link copied to clipboard
constructor(active: Output<Boolean>? = null, cron: Output<String>? = null, cronTimezone: Output<String>? = null, description: Output<String>? = null, project: Output<String>? = null, ref: Output<String>? = null, takeOwnership: Output<Boolean>? = null)

Properties

Link copied to clipboard
val active: Output<Boolean>? = null

The activation of pipeline schedule. If false is set, the pipeline schedule will deactivated initially.

Link copied to clipboard
val cron: Output<String>? = null

The cron (e.g. 0 1 * * *).

Link copied to clipboard
val cronTimezone: Output<String>? = null

The timezone.

Link copied to clipboard
val description: Output<String>? = null

The description of the pipeline schedule.

Link copied to clipboard
val project: Output<String>? = null

The name or id of the project to add the schedule to.

Link copied to clipboard
val ref: Output<String>? = null

The branch/tag name to be triggered. This must be the full branch reference, for example: refs/heads/main, not main.

Link copied to clipboard
val takeOwnership: Output<Boolean>? = null

Functions

Link copied to clipboard
open override fun toJava(): PipelineScheduleArgs