Module Build

This page documents the language specification for the azuredevops package. If you're looking for help working with the inputs, outputs, or functions of azuredevops resources in a Pulumi program, please see the resource documentation for examples and API reference.

Resources

Others

Resources

Resource BuildDefinition

class BuildDefinition extends CustomResource

Manages a Build Definition within Azure DevOps.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as azuredevops from "@pulumi/azuredevops";

const project = new azuredevops.Core.Project("project", {
    projectName: "Sample Project",
    visibility: "private",
    versionControl: "Git",
    workItemTemplate: "Agile",
});
const repository = new azuredevops.Repository.Git("repository", {
    projectId: project.id,
    initialization: {
        initType: "Clean",
    },
});
const vars = new azuredevops.Pipeline.VariableGroup("vars", {
    projectId: project.id,
    description: "Managed by Terraform",
    allowAccess: true,
    variable: [{
        name: "FOO",
        value: "BAR",
    }],
});
const build = new azuredevops.Build.BuildDefinition("build", {
    projectId: project.id,
    path: "\\ExampleFolder",
    ci_trigger: {
        useYaml: true,
    },
    repository: {
        repoType: "TfsGit",
        repoId: repository.id,
        branchName: repository.defaultBranch,
        ymlPath: "azure-pipelines.yml",
    },
    variableGroups: [vars.id],
    variable: [
        {
            name: "PipelineVariable",
            value: "Go Microsoft!",
        },
        {
            name: "PipelineSecret",
            secretValue: "ZGV2cw",
            isSecret: true,
        },
    ],
});

constructor

new BuildDefinition(name: string, args: BuildDefinitionArgs, opts?: pulumi.CustomResourceOptions)

Create a BuildDefinition resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: BuildDefinitionState, opts?: pulumi.CustomResourceOptions): BuildDefinition

Get an existing BuildDefinition resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): obj is BuildDefinition

Returns true if the given object is an instance of BuildDefinition. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property agentPoolName

public agentPoolName: pulumi.Output<string | undefined>;

The agent pool that should execute the build. Defaults to Hosted Ubuntu 1604.

property ciTrigger

public ciTrigger: pulumi.Output<BuildDefinitionCiTrigger | undefined>;

Continuous Integration Integration trigger.

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property name

public name: pulumi.Output<string>;

The name of the build definition.

property path

public path: pulumi.Output<string | undefined>;

property projectId

public projectId: pulumi.Output<string>;

The project ID or project name.

property pullRequestTrigger

public pullRequestTrigger: pulumi.Output<BuildDefinitionPullRequestTrigger | undefined>;

Pull Request Integration Integration trigger.

property repository

public repository: pulumi.Output<BuildDefinitionRepository>;

A repository block as documented below.

property revision

public revision: pulumi.Output<number>;

The revision of the build definition

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

property variableGroups

public variableGroups: pulumi.Output<number[] | undefined>;

A list of variable group IDs (integers) to link to the build definition.

property variables

public variables: pulumi.Output<BuildDefinitionVariable[] | undefined>;

A list of variable blocks, as documented below.

Others

interface BuildDefinitionArgs

interface BuildDefinitionArgs

The set of arguments for constructing a BuildDefinition resource.

property agentPoolName

agentPoolName?: pulumi.Input<string>;

The agent pool that should execute the build. Defaults to Hosted Ubuntu 1604.

property ciTrigger

ciTrigger?: pulumi.Input<BuildDefinitionCiTrigger>;

Continuous Integration Integration trigger.

property name

name?: pulumi.Input<string>;

The name of the build definition.

property path

path?: pulumi.Input<string>;

property projectId

projectId: pulumi.Input<string>;

The project ID or project name.

property pullRequestTrigger

pullRequestTrigger?: pulumi.Input<BuildDefinitionPullRequestTrigger>;

Pull Request Integration Integration trigger.

property repository

repository: pulumi.Input<BuildDefinitionRepository>;

A repository block as documented below.

property variableGroups

variableGroups?: pulumi.Input<pulumi.Input<number>[]>;

A list of variable group IDs (integers) to link to the build definition.

property variables

variables?: pulumi.Input<pulumi.Input<BuildDefinitionVariable>[]>;

A list of variable blocks, as documented below.

interface BuildDefinitionState

interface BuildDefinitionState

Input properties used for looking up and filtering BuildDefinition resources.

property agentPoolName

agentPoolName?: pulumi.Input<string>;

The agent pool that should execute the build. Defaults to Hosted Ubuntu 1604.

property ciTrigger

ciTrigger?: pulumi.Input<BuildDefinitionCiTrigger>;

Continuous Integration Integration trigger.

property name

name?: pulumi.Input<string>;

The name of the build definition.

property path

path?: pulumi.Input<string>;

property projectId

projectId?: pulumi.Input<string>;

The project ID or project name.

property pullRequestTrigger

pullRequestTrigger?: pulumi.Input<BuildDefinitionPullRequestTrigger>;

Pull Request Integration Integration trigger.

property repository

repository?: pulumi.Input<BuildDefinitionRepository>;

A repository block as documented below.

property revision

revision?: pulumi.Input<number>;

The revision of the build definition

property variableGroups

variableGroups?: pulumi.Input<pulumi.Input<number>[]>;

A list of variable group IDs (integers) to link to the build definition.

property variables

variables?: pulumi.Input<pulumi.Input<BuildDefinitionVariable>[]>;

A list of variable blocks, as documented below.