PipelineSchedule

class PipelineSchedule : KotlinCustomResource

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", {
cron: "0 1 * * *",
description: "Used to schedule builds",
project: "12345",
ref: "master",
});
import pulumi
import pulumi_gitlab as gitlab
example = gitlab.PipelineSchedule("example",
cron="0 1 * * *",
description="Used to schedule builds",
project="12345",
ref="master")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using GitLab = Pulumi.GitLab;
return await Deployment.RunAsync(() =>
{
var example = new GitLab.PipelineSchedule("example", new()
{
Cron = "0 1 * * *",
Description = "Used to schedule builds",
Project = "12345",
Ref = "master",
});
});
package main
import (
"github.com/pulumi/pulumi-gitlab/sdk/v6/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{
Cron: pulumi.String("0 1 * * *"),
Description: pulumi.String("Used to schedule builds"),
Project: pulumi.String("12345"),
Ref: pulumi.String("master"),
})
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()
.cron("0 1 * * *")
.description("Used to schedule builds")
.project("12345")
.ref("master")
.build());
}
}
resources:
example:
type: gitlab:PipelineSchedule
properties:
cron: 0 1 * * *
description: Used to schedule builds
project: '12345'
ref: master

Import

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

Properties

Link copied to clipboard
val active: Output<Boolean>

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

Link copied to clipboard
val cron: Output<String>

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

Link copied to clipboard
val cronTimezone: Output<String>

The timezone.

Link copied to clipboard
val description: Output<String>

The description of the pipeline schedule.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val owner: Output<Int>

The ID of the user that owns the pipeline schedule.

Link copied to clipboard
val pipelineScheduleId: Output<Int>

The pipeline schedule id.

Link copied to clipboard
val project: Output<String>

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

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val ref: Output<String>

The branch/tag name to be triggered.

Link copied to clipboard
val takeOwnership: Output<Boolean>

When set to true, the user represented by the token running Terraform will take ownership of the scheduled pipeline prior to editing it. This can help when managing scheduled pipeline drift when other users are making changes outside Terraform.

Link copied to clipboard
val urn: Output<String>