gitlab.ProjectIntegrationJenkins
Explore with Pulumi AI
The gitlab.ProjectIntegrationJenkins
resource manages 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.ProjectIntegrationJenkins("jenkins", {
project: awesomeProject.id,
jenkinsUrl: "http://jenkins.example.com",
projectName: "my_project_name",
});
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.ProjectIntegrationJenkins("jenkins",
project=awesome_project.id,
jenkins_url="http://jenkins.example.com",
project_name="my_project_name")
package main
import (
"github.com/pulumi/pulumi-gitlab/sdk/v9/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.NewProjectIntegrationJenkins(ctx, "jenkins", &gitlab.ProjectIntegrationJenkinsArgs{
Project: awesomeProject.ID(),
JenkinsUrl: pulumi.String("http://jenkins.example.com"),
ProjectName: pulumi.String("my_project_name"),
})
if err != nil {
return err
}
return nil
})
}
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.ProjectIntegrationJenkins("jenkins", new()
{
Project = awesomeProject.Id,
JenkinsUrl = "http://jenkins.example.com",
ProjectName = "my_project_name",
});
});
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.ProjectIntegrationJenkins;
import com.pulumi.gitlab.ProjectIntegrationJenkinsArgs;
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 ProjectIntegrationJenkins("jenkins", ProjectIntegrationJenkinsArgs.builder()
.project(awesomeProject.id())
.jenkinsUrl("http://jenkins.example.com")
.projectName("my_project_name")
.build());
}
}
resources:
awesomeProject:
type: gitlab:Project
name: awesome_project
properties:
name: awesome_project
description: My awesome project.
visibilityLevel: public
jenkins:
type: gitlab:ProjectIntegrationJenkins
properties:
project: ${awesomeProject.id}
jenkinsUrl: http://jenkins.example.com
projectName: my_project_name
Create ProjectIntegrationJenkins Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ProjectIntegrationJenkins(name: string, args: ProjectIntegrationJenkinsArgs, opts?: CustomResourceOptions);
@overload
def ProjectIntegrationJenkins(resource_name: str,
args: ProjectIntegrationJenkinsArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ProjectIntegrationJenkins(resource_name: str,
opts: Optional[ResourceOptions] = None,
jenkins_url: Optional[str] = None,
project: Optional[str] = None,
project_name: Optional[str] = None,
enable_ssl_verification: Optional[bool] = None,
merge_request_events: Optional[bool] = None,
password: Optional[str] = None,
push_events: Optional[bool] = None,
tag_push_events: Optional[bool] = None,
username: Optional[str] = None)
func NewProjectIntegrationJenkins(ctx *Context, name string, args ProjectIntegrationJenkinsArgs, opts ...ResourceOption) (*ProjectIntegrationJenkins, error)
public ProjectIntegrationJenkins(string name, ProjectIntegrationJenkinsArgs args, CustomResourceOptions? opts = null)
public ProjectIntegrationJenkins(String name, ProjectIntegrationJenkinsArgs args)
public ProjectIntegrationJenkins(String name, ProjectIntegrationJenkinsArgs args, CustomResourceOptions options)
type: gitlab:ProjectIntegrationJenkins
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args ProjectIntegrationJenkinsArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args ProjectIntegrationJenkinsArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args ProjectIntegrationJenkinsArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ProjectIntegrationJenkinsArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ProjectIntegrationJenkinsArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var projectIntegrationJenkinsResource = new GitLab.ProjectIntegrationJenkins("projectIntegrationJenkinsResource", new()
{
JenkinsUrl = "string",
Project = "string",
ProjectName = "string",
EnableSslVerification = false,
MergeRequestEvents = false,
Password = "string",
PushEvents = false,
TagPushEvents = false,
Username = "string",
});
example, err := gitlab.NewProjectIntegrationJenkins(ctx, "projectIntegrationJenkinsResource", &gitlab.ProjectIntegrationJenkinsArgs{
JenkinsUrl: pulumi.String("string"),
Project: pulumi.String("string"),
ProjectName: pulumi.String("string"),
EnableSslVerification: pulumi.Bool(false),
MergeRequestEvents: pulumi.Bool(false),
Password: pulumi.String("string"),
PushEvents: pulumi.Bool(false),
TagPushEvents: pulumi.Bool(false),
Username: pulumi.String("string"),
})
var projectIntegrationJenkinsResource = new ProjectIntegrationJenkins("projectIntegrationJenkinsResource", ProjectIntegrationJenkinsArgs.builder()
.jenkinsUrl("string")
.project("string")
.projectName("string")
.enableSslVerification(false)
.mergeRequestEvents(false)
.password("string")
.pushEvents(false)
.tagPushEvents(false)
.username("string")
.build());
project_integration_jenkins_resource = gitlab.ProjectIntegrationJenkins("projectIntegrationJenkinsResource",
jenkins_url="string",
project="string",
project_name="string",
enable_ssl_verification=False,
merge_request_events=False,
password="string",
push_events=False,
tag_push_events=False,
username="string")
const projectIntegrationJenkinsResource = new gitlab.ProjectIntegrationJenkins("projectIntegrationJenkinsResource", {
jenkinsUrl: "string",
project: "string",
projectName: "string",
enableSslVerification: false,
mergeRequestEvents: false,
password: "string",
pushEvents: false,
tagPushEvents: false,
username: "string",
});
type: gitlab:ProjectIntegrationJenkins
properties:
enableSslVerification: false
jenkinsUrl: string
mergeRequestEvents: false
password: string
project: string
projectName: string
pushEvents: false
tagPushEvents: false
username: string
ProjectIntegrationJenkins Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The ProjectIntegrationJenkins resource accepts the following input properties:
- Jenkins
Url string - Jenkins URL like
http://jenkins.example.com
- Project string
- ID of the project you want to activate integration on.
- Project
Name string - The URL-friendly project name. Example:
my_project_name
. - Enable
Ssl boolVerification - Enable SSL verification. Defaults to
true
(enabled). - Merge
Request boolEvents - Enable notifications for merge request events.
- Password string
- Password for authentication with the Jenkins server, if authentication is required by the server.
- Push
Events bool - Enable notifications for push events.
- Tag
Push boolEvents - Enable notifications for tag push events.
- Username string
- Username for authentication with the Jenkins server, if authentication is required by the server.
- Jenkins
Url string - Jenkins URL like
http://jenkins.example.com
- Project string
- ID of the project you want to activate integration on.
- Project
Name string - The URL-friendly project name. Example:
my_project_name
. - Enable
Ssl boolVerification - Enable SSL verification. Defaults to
true
(enabled). - Merge
Request boolEvents - Enable notifications for merge request events.
- Password string
- Password for authentication with the Jenkins server, if authentication is required by the server.
- Push
Events bool - Enable notifications for push events.
- Tag
Push boolEvents - Enable notifications for tag push events.
- Username string
- Username for authentication with the Jenkins server, if authentication is required by the server.
- jenkins
Url String - Jenkins URL like
http://jenkins.example.com
- project String
- ID of the project you want to activate integration on.
- project
Name String - The URL-friendly project name. Example:
my_project_name
. - enable
Ssl BooleanVerification - Enable SSL verification. Defaults to
true
(enabled). - merge
Request BooleanEvents - Enable notifications for merge request events.
- password String
- Password for authentication with the Jenkins server, if authentication is required by the server.
- push
Events Boolean - Enable notifications for push events.
- tag
Push BooleanEvents - Enable notifications for tag push events.
- username String
- Username for authentication with the Jenkins server, if authentication is required by the server.
- jenkins
Url string - Jenkins URL like
http://jenkins.example.com
- project string
- ID of the project you want to activate integration on.
- project
Name string - The URL-friendly project name. Example:
my_project_name
. - enable
Ssl booleanVerification - Enable SSL verification. Defaults to
true
(enabled). - merge
Request booleanEvents - Enable notifications for merge request events.
- password string
- Password for authentication with the Jenkins server, if authentication is required by the server.
- push
Events boolean - Enable notifications for push events.
- tag
Push booleanEvents - Enable notifications for tag push events.
- username string
- Username for authentication with the Jenkins server, if authentication is required by the server.
- jenkins_
url str - Jenkins URL like
http://jenkins.example.com
- project str
- ID of the project you want to activate integration on.
- project_
name str - The URL-friendly project name. Example:
my_project_name
. - enable_
ssl_ boolverification - Enable SSL verification. Defaults to
true
(enabled). - merge_
request_ boolevents - Enable notifications for merge request events.
- password str
- Password for authentication with the Jenkins server, if authentication is required by the server.
- push_
events bool - Enable notifications for push events.
- tag_
push_ boolevents - Enable notifications for tag push events.
- username str
- Username for authentication with the Jenkins server, if authentication is required by the server.
- jenkins
Url String - Jenkins URL like
http://jenkins.example.com
- project String
- ID of the project you want to activate integration on.
- project
Name String - The URL-friendly project name. Example:
my_project_name
. - enable
Ssl BooleanVerification - Enable SSL verification. Defaults to
true
(enabled). - merge
Request BooleanEvents - Enable notifications for merge request events.
- password String
- Password for authentication with the Jenkins server, if authentication is required by the server.
- push
Events Boolean - Enable notifications for push events.
- tag
Push BooleanEvents - Enable notifications for tag push events.
- username String
- Username for authentication with the Jenkins server, if authentication is required by the server.
Outputs
All input properties are implicitly available as output properties. Additionally, the ProjectIntegrationJenkins resource produces the following output properties:
Look up Existing ProjectIntegrationJenkins Resource
Get an existing ProjectIntegrationJenkins resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: ProjectIntegrationJenkinsState, opts?: CustomResourceOptions): ProjectIntegrationJenkins
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
active: Optional[bool] = None,
enable_ssl_verification: Optional[bool] = None,
jenkins_url: Optional[str] = None,
merge_request_events: Optional[bool] = None,
password: Optional[str] = None,
project: Optional[str] = None,
project_name: Optional[str] = None,
push_events: Optional[bool] = None,
tag_push_events: Optional[bool] = None,
username: Optional[str] = None) -> ProjectIntegrationJenkins
func GetProjectIntegrationJenkins(ctx *Context, name string, id IDInput, state *ProjectIntegrationJenkinsState, opts ...ResourceOption) (*ProjectIntegrationJenkins, error)
public static ProjectIntegrationJenkins Get(string name, Input<string> id, ProjectIntegrationJenkinsState? state, CustomResourceOptions? opts = null)
public static ProjectIntegrationJenkins get(String name, Output<String> id, ProjectIntegrationJenkinsState state, CustomResourceOptions options)
resources: _: type: gitlab:ProjectIntegrationJenkins get: id: ${id}
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Active bool
- Whether the integration is active.
- Enable
Ssl boolVerification - Enable SSL verification. Defaults to
true
(enabled). - Jenkins
Url string - Jenkins URL like
http://jenkins.example.com
- Merge
Request boolEvents - Enable notifications for merge request events.
- Password string
- Password for authentication with the Jenkins server, if authentication is required by the server.
- Project string
- ID of the project you want to activate integration on.
- Project
Name string - The URL-friendly project name. Example:
my_project_name
. - Push
Events bool - Enable notifications for push events.
- Tag
Push boolEvents - Enable notifications for tag push events.
- Username string
- Username for authentication with the Jenkins server, if authentication is required by the server.
- Active bool
- Whether the integration is active.
- Enable
Ssl boolVerification - Enable SSL verification. Defaults to
true
(enabled). - Jenkins
Url string - Jenkins URL like
http://jenkins.example.com
- Merge
Request boolEvents - Enable notifications for merge request events.
- Password string
- Password for authentication with the Jenkins server, if authentication is required by the server.
- Project string
- ID of the project you want to activate integration on.
- Project
Name string - The URL-friendly project name. Example:
my_project_name
. - Push
Events bool - Enable notifications for push events.
- Tag
Push boolEvents - Enable notifications for tag push events.
- Username string
- Username for authentication with the Jenkins server, if authentication is required by the server.
- active Boolean
- Whether the integration is active.
- enable
Ssl BooleanVerification - Enable SSL verification. Defaults to
true
(enabled). - jenkins
Url String - Jenkins URL like
http://jenkins.example.com
- merge
Request BooleanEvents - Enable notifications for merge request events.
- password String
- Password for authentication with the Jenkins server, if authentication is required by the server.
- project String
- ID of the project you want to activate integration on.
- project
Name String - The URL-friendly project name. Example:
my_project_name
. - push
Events Boolean - Enable notifications for push events.
- tag
Push BooleanEvents - Enable notifications for tag push events.
- username String
- Username for authentication with the Jenkins server, if authentication is required by the server.
- active boolean
- Whether the integration is active.
- enable
Ssl booleanVerification - Enable SSL verification. Defaults to
true
(enabled). - jenkins
Url string - Jenkins URL like
http://jenkins.example.com
- merge
Request booleanEvents - Enable notifications for merge request events.
- password string
- Password for authentication with the Jenkins server, if authentication is required by the server.
- project string
- ID of the project you want to activate integration on.
- project
Name string - The URL-friendly project name. Example:
my_project_name
. - push
Events boolean - Enable notifications for push events.
- tag
Push booleanEvents - Enable notifications for tag push events.
- username string
- Username for authentication with the Jenkins server, if authentication is required by the server.
- active bool
- Whether the integration is active.
- enable_
ssl_ boolverification - Enable SSL verification. Defaults to
true
(enabled). - jenkins_
url str - Jenkins URL like
http://jenkins.example.com
- merge_
request_ boolevents - Enable notifications for merge request events.
- password str
- Password for authentication with the Jenkins server, if authentication is required by the server.
- project str
- ID of the project you want to activate integration on.
- project_
name str - The URL-friendly project name. Example:
my_project_name
. - push_
events bool - Enable notifications for push events.
- tag_
push_ boolevents - Enable notifications for tag push events.
- username str
- Username for authentication with the Jenkins server, if authentication is required by the server.
- active Boolean
- Whether the integration is active.
- enable
Ssl BooleanVerification - Enable SSL verification. Defaults to
true
(enabled). - jenkins
Url String - Jenkins URL like
http://jenkins.example.com
- merge
Request BooleanEvents - Enable notifications for merge request events.
- password String
- Password for authentication with the Jenkins server, if authentication is required by the server.
- project String
- ID of the project you want to activate integration on.
- project
Name String - The URL-friendly project name. Example:
my_project_name
. - push
Events Boolean - Enable notifications for push events.
- tag
Push BooleanEvents - Enable notifications for tag push events.
- username String
- Username for authentication with the Jenkins server, if authentication is required by the server.
Import
Starting in Terraform v1.5.0, you can use an import block to import gitlab_project_integration_jenkins
. For example:
terraform
import {
to = gitlab_project_integration_jenkins.example
id = “see CLI command below for ID”
}
Importing using the CLI is supported with the following syntax:
$ pulumi import gitlab:index/projectIntegrationJenkins:ProjectIntegrationJenkins You can import a gitlab_project_integration_jenkins state using `<resource> <project_id>`:
$ pulumi import gitlab:index/projectIntegrationJenkins:ProjectIntegrationJenkins jenkins 1
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- GitLab pulumi/pulumi-gitlab
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
gitlab
Terraform Provider.