ReleaseArgs

data class ReleaseArgs(val assets: Output<ReleaseAssetsArgs>? = null, val description: Output<String>? = null, val milestones: Output<List<String>>? = null, val name: Output<String>? = null, val project: Output<String>? = null, val ref: Output<String>? = null, val releasedAt: Output<String>? = null, val tagMessage: Output<String>? = null, val tagName: Output<String>? = null) : ConvertibleToJava<ReleaseArgs>

The gitlab.Release resource allows to manage the lifecycle of releases in gitlab. Upstream API: GitLab REST API docs

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as gitlab from "@pulumi/gitlab";
// Create a project
const example = new gitlab.Project("example", {
name: "example",
description: "An example project",
});
// Create a release
const exampleRelease = new gitlab.Release("example", {
project: example.id,
name: "test-release",
tagName: "v1.0.0",
description: "Test release description",
ref: "main",
});
import pulumi
import pulumi_gitlab as gitlab
# Create a project
example = gitlab.Project("example",
name="example",
description="An example project")
# Create a release
example_release = gitlab.Release("example",
project=example.id,
name="test-release",
tag_name="v1.0.0",
description="Test release description",
ref="main")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using GitLab = Pulumi.GitLab;
return await Deployment.RunAsync(() =>
{
// Create a project
var example = new GitLab.Project("example", new()
{
Name = "example",
Description = "An example project",
});
// Create a release
var exampleRelease = new GitLab.Release("example", new()
{
Project = example.Id,
Name = "test-release",
TagName = "v1.0.0",
Description = "Test release description",
Ref = "main",
});
});
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 {
// Create a project
example, err := gitlab.NewProject(ctx, "example", &gitlab.ProjectArgs{
Name: pulumi.String("example"),
Description: pulumi.String("An example project"),
})
if err != nil {
return err
}
// Create a release
_, err = gitlab.NewRelease(ctx, "example", &gitlab.ReleaseArgs{
Project: example.ID(),
Name: pulumi.String("test-release"),
TagName: pulumi.String("v1.0.0"),
Description: pulumi.String("Test release description"),
Ref: pulumi.String("main"),
})
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.Project;
import com.pulumi.gitlab.ProjectArgs;
import com.pulumi.gitlab.Release;
import com.pulumi.gitlab.ReleaseArgs;
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) {
// Create a project
var example = new Project("example", ProjectArgs.builder()
.name("example")
.description("An example project")
.build());
// Create a release
var exampleRelease = new Release("exampleRelease", ReleaseArgs.builder()
.project(example.id())
.name("test-release")
.tagName("v1.0.0")
.description("Test release description")
.ref("main")
.build());
}
}
resources:
# Create a project
example:
type: gitlab:Project
properties:
name: example
description: An example project
# Create a release
exampleRelease:
type: gitlab:Release
name: example
properties:
project: ${example.id}
name: test-release
tagName: v1.0.0
description: Test release description
ref: main

Import

Starting in Terraform v1.5.0 you can use an import block to import gitlab_release. For example: terraform import { to = gitlab_release.example id = "see CLI command below for ID" } Import using the CLI is supported using the following syntax: Gitlab release link can be imported with a key composed of <project>:<tag_name>, e.g.

$ pulumi import gitlab:index/release:Release example "12345:test"

Constructors

Link copied to clipboard
constructor(assets: Output<ReleaseAssetsArgs>? = null, description: Output<String>? = null, milestones: Output<List<String>>? = null, name: Output<String>? = null, project: Output<String>? = null, ref: Output<String>? = null, releasedAt: Output<String>? = null, tagMessage: Output<String>? = null, tagName: Output<String>? = null)

Properties

Link copied to clipboard
val assets: Output<ReleaseAssetsArgs>? = null

The release assets.

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

The description of the release. You can use Markdown.

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

The title of each milestone the release is associated with. GitLab Premium customers can specify group milestones.

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

The name of the release.

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

The ID or full path of the project.

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

If a tag specified in tagname doesn't exist, the release is created from ref and tagged with tagname. It can be a commit SHA, another tag name, or a branch name.

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

Date and time for the release. Defaults to the current time. Expected in ISO 8601 format (2019-03-15T08:00:00Z). Only provide this field if creating an upcoming or historical release.

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

Message to use if creating a new annotated tag.

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

The tag where the release is created from.

Functions

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