Integration Jenkins
The gitlab.IntegrationJenkins
resource allows to manage the lifecycle of a project integration with Jenkins. Upstream API: GitLab REST API docs
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as gitlab from "@pulumi/gitlab";
const awesomeProject = new gitlab.Project("awesome_project", {
name: "awesome_project",
description: "My awesome project.",
visibilityLevel: "public",
});
const jenkins = new gitlab.IntegrationJenkins("jenkins", {
project: awesomeProject.id,
jenkinsUrl: "http://jenkins.example.com",
projectName: "my_project_name",
});
Content copied to clipboard
import pulumi
import pulumi_gitlab as gitlab
awesome_project = gitlab.Project("awesome_project",
name="awesome_project",
description="My awesome project.",
visibility_level="public")
jenkins = gitlab.IntegrationJenkins("jenkins",
project=awesome_project.id,
jenkins_url="http://jenkins.example.com",
project_name="my_project_name")
Content copied to clipboard
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using GitLab = Pulumi.GitLab;
return await Deployment.RunAsync(() =>
{
var awesomeProject = new GitLab.Project("awesome_project", new()
{
Name = "awesome_project",
Description = "My awesome project.",
VisibilityLevel = "public",
});
var jenkins = new GitLab.IntegrationJenkins("jenkins", new()
{
Project = awesomeProject.Id,
JenkinsUrl = "http://jenkins.example.com",
ProjectName = "my_project_name",
});
});
Content copied to clipboard
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 {
awesomeProject, err := gitlab.NewProject(ctx, "awesome_project", &gitlab.ProjectArgs{
Name: pulumi.String("awesome_project"),
Description: pulumi.String("My awesome project."),
VisibilityLevel: pulumi.String("public"),
})
if err != nil {
return err
}
_, err = gitlab.NewIntegrationJenkins(ctx, "jenkins", &gitlab.IntegrationJenkinsArgs{
Project: awesomeProject.ID(),
JenkinsUrl: pulumi.String("http://jenkins.example.com"),
ProjectName: pulumi.String("my_project_name"),
})
if err != nil {
return err
}
return nil
})
}
Content copied to clipboard
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.IntegrationJenkins;
import com.pulumi.gitlab.IntegrationJenkinsArgs;
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 awesomeProject = new Project("awesomeProject", ProjectArgs.builder()
.name("awesome_project")
.description("My awesome project.")
.visibilityLevel("public")
.build());
var jenkins = new IntegrationJenkins("jenkins", IntegrationJenkinsArgs.builder()
.project(awesomeProject.id())
.jenkinsUrl("http://jenkins.example.com")
.projectName("my_project_name")
.build());
}
}
Content copied to clipboard
resources:
awesomeProject:
type: gitlab:Project
name: awesome_project
properties:
name: awesome_project
description: My awesome project.
visibilityLevel: public
jenkins:
type: gitlab:IntegrationJenkins
properties:
project: ${awesomeProject.id}
jenkinsUrl: http://jenkins.example.com
projectName: my_project_name
Content copied to clipboard
Import
Starting in Terraform v1.5.0 you can use an import block to import gitlab_integration_jenkins
. For example: terraform import { to = gitlab_integration_jenkins.example id = "see CLI command below for ID" } Import using the CLI is supported using the following syntax:
$ pulumi import gitlab:index/integrationJenkins:IntegrationJenkins You can import a gitlab_integration_jenkins state using `<resource> <project_id>`:
Content copied to clipboard
$ pulumi import gitlab:index/integrationJenkins:IntegrationJenkins jenkins 1
Content copied to clipboard
Properties
Link copied to clipboard
Enable SSL verification. Defaults to true
(enabled).
Link copied to clipboard
Jenkins URL like http://jenkins.example.com
Link copied to clipboard
Enable notifications for merge request events.
Link copied to clipboard
The URL-friendly project name. Example: my_project_name
.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Enable notifications for push events.
Link copied to clipboard
Enable notifications for tag push events.