BuildDefinition

Manages a Build Definition within Azure DevOps.

Create a BuildDefinition Resource

def BuildDefinition(resource_name, opts=None, agent_pool_name=None, ci_trigger=None, name=None, path=None, project_id=None, pull_request_trigger=None, repository=None, variable_groups=None, variables=None, __props__=None);
name string
The unique name of the resource.
args BuildDefinitionArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args BuildDefinitionArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args BuildDefinitionArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

BuildDefinition Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The BuildDefinition resource accepts the following input properties:

ProjectId string

The project ID or project name.

Repository Pulumi.AzureDevOps.Build.Inputs.BuildDefinitionRepositoryArgs

A repository block as documented below.

AgentPoolName string

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

CiTrigger Pulumi.AzureDevOps.Build.Inputs.BuildDefinitionCiTriggerArgs

Continuous Integration Integration trigger.

Name string

The name of the build definition.

Path string
PullRequestTrigger Pulumi.AzureDevOps.Build.Inputs.BuildDefinitionPullRequestTriggerArgs

Pull Request Integration Integration trigger.

VariableGroups List<int>

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

Variables List<Pulumi.AzureDevOps.Build.Inputs.BuildDefinitionVariableArgs>

A list of variable blocks, as documented below.

ProjectId string

The project ID or project name.

Repository BuildDefinitionRepository

A repository block as documented below.

AgentPoolName string

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

CiTrigger BuildDefinitionCiTrigger

Continuous Integration Integration trigger.

Name string

The name of the build definition.

Path string
PullRequestTrigger BuildDefinitionPullRequestTrigger

Pull Request Integration Integration trigger.

VariableGroups []int

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

Variables []BuildDefinitionVariable

A list of variable blocks, as documented below.

projectId string

The project ID or project name.

repository BuildDefinitionRepository

A repository block as documented below.

agentPoolName string

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

ciTrigger BuildDefinitionCiTrigger

Continuous Integration Integration trigger.

name string

The name of the build definition.

path string
pullRequestTrigger BuildDefinitionPullRequestTrigger

Pull Request Integration Integration trigger.

variableGroups number[]

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

variables BuildDefinitionVariable[]

A list of variable blocks, as documented below.

project_id str

The project ID or project name.

repository Dict[BuildDefinitionRepository]

A repository block as documented below.

agent_pool_name str

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

ci_trigger Dict[BuildDefinitionCiTrigger]

Continuous Integration Integration trigger.

name str

The name of the build definition.

path str
pull_request_trigger Dict[BuildDefinitionPullRequestTrigger]

Pull Request Integration Integration trigger.

variable_groups List[Integer]

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

variables List[BuildDefinitionVariable]

A list of variable blocks, as documented below.

Outputs

All input properties are implicitly available as output properties. Additionally, the BuildDefinition resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Revision int

The revision of the build definition

Id string
The provider-assigned unique ID for this managed resource.
Revision int

The revision of the build definition

id string
The provider-assigned unique ID for this managed resource.
revision number

The revision of the build definition

id str
The provider-assigned unique ID for this managed resource.
revision float

The revision of the build definition

Look up an Existing BuildDefinition Resource

Get an existing BuildDefinition 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?: BuildDefinitionState, opts?: CustomResourceOptions): BuildDefinition
static get(resource_name, id, opts=None, agent_pool_name=None, ci_trigger=None, name=None, path=None, project_id=None, pull_request_trigger=None, repository=None, revision=None, variable_groups=None, variables=None, __props__=None);
func GetBuildDefinition(ctx *Context, name string, id IDInput, state *BuildDefinitionState, opts ...ResourceOption) (*BuildDefinition, error)
public static BuildDefinition Get(string name, Input<string> id, BuildDefinitionState? state, CustomResourceOptions? opts = null)
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.

The following state arguments are supported:

AgentPoolName string

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

CiTrigger Pulumi.AzureDevOps.Build.Inputs.BuildDefinitionCiTriggerArgs

Continuous Integration Integration trigger.

Name string

The name of the build definition.

Path string
ProjectId string

The project ID or project name.

PullRequestTrigger Pulumi.AzureDevOps.Build.Inputs.BuildDefinitionPullRequestTriggerArgs

Pull Request Integration Integration trigger.

Repository Pulumi.AzureDevOps.Build.Inputs.BuildDefinitionRepositoryArgs

A repository block as documented below.

Revision int

The revision of the build definition

VariableGroups List<int>

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

Variables List<Pulumi.AzureDevOps.Build.Inputs.BuildDefinitionVariableArgs>

A list of variable blocks, as documented below.

AgentPoolName string

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

CiTrigger BuildDefinitionCiTrigger

Continuous Integration Integration trigger.

Name string

The name of the build definition.

Path string
ProjectId string

The project ID or project name.

PullRequestTrigger BuildDefinitionPullRequestTrigger

Pull Request Integration Integration trigger.

Repository BuildDefinitionRepository

A repository block as documented below.

Revision int

The revision of the build definition

VariableGroups []int

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

Variables []BuildDefinitionVariable

A list of variable blocks, as documented below.

agentPoolName string

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

ciTrigger BuildDefinitionCiTrigger

Continuous Integration Integration trigger.

name string

The name of the build definition.

path string
projectId string

The project ID or project name.

pullRequestTrigger BuildDefinitionPullRequestTrigger

Pull Request Integration Integration trigger.

repository BuildDefinitionRepository

A repository block as documented below.

revision number

The revision of the build definition

variableGroups number[]

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

variables BuildDefinitionVariable[]

A list of variable blocks, as documented below.

agent_pool_name str

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

ci_trigger Dict[BuildDefinitionCiTrigger]

Continuous Integration Integration trigger.

name str

The name of the build definition.

path str
project_id str

The project ID or project name.

pull_request_trigger Dict[BuildDefinitionPullRequestTrigger]

Pull Request Integration Integration trigger.

repository Dict[BuildDefinitionRepository]

A repository block as documented below.

revision float

The revision of the build definition

variable_groups List[Integer]

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

variables List[BuildDefinitionVariable]

A list of variable blocks, as documented below.

Supporting Types

BuildDefinitionCiTrigger

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Override Pulumi.AzureDevOps.Build.Inputs.BuildDefinitionCiTriggerOverrideArgs

Override the azure-pipeline file and use a this configuration for all builds.

UseYaml bool

Use the azure-pipeline file for the build configuration. Defaults to false.

Override BuildDefinitionCiTriggerOverride

Override the azure-pipeline file and use a this configuration for all builds.

UseYaml bool

Use the azure-pipeline file for the build configuration. Defaults to false.

override BuildDefinitionCiTriggerOverride

Override the azure-pipeline file and use a this configuration for all builds.

useYaml boolean

Use the azure-pipeline file for the build configuration. Defaults to false.

override Dict[BuildDefinitionCiTriggerOverride]

Override the azure-pipeline file and use a this configuration for all builds.

useYaml bool

Use the azure-pipeline file for the build configuration. Defaults to false.

BuildDefinitionCiTriggerOverride

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Batch bool

If you set batch to true, when a pipeline is running, the system waits until the run is completed, then starts another run with all changes that have not yet been built. Defaults to true.

BranchFilters List<Pulumi.AzureDevOps.Build.Inputs.BuildDefinitionCiTriggerOverrideBranchFilterArgs>

The branches to include and exclude from the trigger.

MaxConcurrentBuildsPerBranch int

The number of max builds per branch. Defaults to 1.

PathFilters List<Pulumi.AzureDevOps.Build.Inputs.BuildDefinitionCiTriggerOverridePathFilterArgs>

Specify file paths to include or exclude. Note that the wildcard syntax is different between branches/tags and file paths.

PollingInterval int

How often the external repository is polled. Defaults to 0.

PollingJobId string

This is the ID of the polling job that polls the external repository. Once the build definition is saved/updated, this value is set.

Batch bool

If you set batch to true, when a pipeline is running, the system waits until the run is completed, then starts another run with all changes that have not yet been built. Defaults to true.

BranchFilters []BuildDefinitionCiTriggerOverrideBranchFilter

The branches to include and exclude from the trigger.

MaxConcurrentBuildsPerBranch int

The number of max builds per branch. Defaults to 1.

PathFilters []BuildDefinitionCiTriggerOverridePathFilter

Specify file paths to include or exclude. Note that the wildcard syntax is different between branches/tags and file paths.

PollingInterval int

How often the external repository is polled. Defaults to 0.

PollingJobId string

This is the ID of the polling job that polls the external repository. Once the build definition is saved/updated, this value is set.

batch boolean

If you set batch to true, when a pipeline is running, the system waits until the run is completed, then starts another run with all changes that have not yet been built. Defaults to true.

branchFilters BuildDefinitionCiTriggerOverrideBranchFilter[]

The branches to include and exclude from the trigger.

maxConcurrentBuildsPerBranch number

The number of max builds per branch. Defaults to 1.

pathFilters BuildDefinitionCiTriggerOverridePathFilter[]

Specify file paths to include or exclude. Note that the wildcard syntax is different between branches/tags and file paths.

pollingInterval number

How often the external repository is polled. Defaults to 0.

pollingJobId string

This is the ID of the polling job that polls the external repository. Once the build definition is saved/updated, this value is set.

batch bool

If you set batch to true, when a pipeline is running, the system waits until the run is completed, then starts another run with all changes that have not yet been built. Defaults to true.

branchFilters List[BuildDefinitionCiTriggerOverrideBranchFilter]

The branches to include and exclude from the trigger.

maxConcurrentBuildsPerBranch float

The number of max builds per branch. Defaults to 1.

pathFilters List[BuildDefinitionCiTriggerOverridePathFilter]

Specify file paths to include or exclude. Note that the wildcard syntax is different between branches/tags and file paths.

pollingInterval float

How often the external repository is polled. Defaults to 0.

pollingJobId str

This is the ID of the polling job that polls the external repository. Once the build definition is saved/updated, this value is set.

BuildDefinitionCiTriggerOverrideBranchFilter

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Excludes List<string>

List of branch patterns to exclude.

Includes List<string>

List of branch patterns to include.

Excludes []string

List of branch patterns to exclude.

Includes []string

List of branch patterns to include.

excludes string[]

List of branch patterns to exclude.

includes string[]

List of branch patterns to include.

excludes List[str]

List of branch patterns to exclude.

includes List[str]

List of branch patterns to include.

BuildDefinitionCiTriggerOverridePathFilter

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Excludes List<string>

List of branch patterns to exclude.

Includes List<string>

List of branch patterns to include.

Excludes []string

List of branch patterns to exclude.

Includes []string

List of branch patterns to include.

excludes string[]

List of branch patterns to exclude.

includes string[]

List of branch patterns to include.

excludes List[str]

List of branch patterns to exclude.

includes List[str]

List of branch patterns to include.

BuildDefinitionPullRequestTrigger

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Forks Pulumi.AzureDevOps.Build.Inputs.BuildDefinitionPullRequestTriggerForksArgs

Set permissions for Forked repositories.

CommentRequired string
InitialBranch string
Override Pulumi.AzureDevOps.Build.Inputs.BuildDefinitionPullRequestTriggerOverrideArgs

Override the azure-pipeline file and use a this configuration for all builds.

UseYaml bool

Use the azure-pipeline file for the build configuration. Defaults to false.

Forks BuildDefinitionPullRequestTriggerForks

Set permissions for Forked repositories.

CommentRequired string
InitialBranch string
Override BuildDefinitionPullRequestTriggerOverride

Override the azure-pipeline file and use a this configuration for all builds.

UseYaml bool

Use the azure-pipeline file for the build configuration. Defaults to false.

forks BuildDefinitionPullRequestTriggerForks

Set permissions for Forked repositories.

commentRequired string
initialBranch string
override BuildDefinitionPullRequestTriggerOverride

Override the azure-pipeline file and use a this configuration for all builds.

useYaml boolean

Use the azure-pipeline file for the build configuration. Defaults to false.

forks Dict[BuildDefinitionPullRequestTriggerForks]

Set permissions for Forked repositories.

commentRequired str
initialBranch str
override Dict[BuildDefinitionPullRequestTriggerOverride]

Override the azure-pipeline file and use a this configuration for all builds.

useYaml bool

Use the azure-pipeline file for the build configuration. Defaults to false.

BuildDefinitionPullRequestTriggerForks

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Enabled bool

Build pull requests form forms of this repository.

ShareSecrets bool

Make secrets available to builds of forks.

Enabled bool

Build pull requests form forms of this repository.

ShareSecrets bool

Make secrets available to builds of forks.

enabled boolean

Build pull requests form forms of this repository.

shareSecrets boolean

Make secrets available to builds of forks.

enabled bool

Build pull requests form forms of this repository.

shareSecrets bool

Make secrets available to builds of forks.

BuildDefinitionPullRequestTriggerOverride

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

AutoCancel bool

. Defaults to true.

BranchFilters List<Pulumi.AzureDevOps.Build.Inputs.BuildDefinitionPullRequestTriggerOverrideBranchFilterArgs>

The branches to include and exclude from the trigger.

PathFilters List<Pulumi.AzureDevOps.Build.Inputs.BuildDefinitionPullRequestTriggerOverridePathFilterArgs>

Specify file paths to include or exclude. Note that the wildcard syntax is different between branches/tags and file paths.

AutoCancel bool

. Defaults to true.

BranchFilters []BuildDefinitionPullRequestTriggerOverrideBranchFilter

The branches to include and exclude from the trigger.

PathFilters []BuildDefinitionPullRequestTriggerOverridePathFilter

Specify file paths to include or exclude. Note that the wildcard syntax is different between branches/tags and file paths.

autoCancel boolean

. Defaults to true.

branchFilters BuildDefinitionPullRequestTriggerOverrideBranchFilter[]

The branches to include and exclude from the trigger.

pathFilters BuildDefinitionPullRequestTriggerOverridePathFilter[]

Specify file paths to include or exclude. Note that the wildcard syntax is different between branches/tags and file paths.

autoCancel bool

. Defaults to true.

branchFilters List[BuildDefinitionPullRequestTriggerOverrideBranchFilter]

The branches to include and exclude from the trigger.

pathFilters List[BuildDefinitionPullRequestTriggerOverridePathFilter]

Specify file paths to include or exclude. Note that the wildcard syntax is different between branches/tags and file paths.

BuildDefinitionPullRequestTriggerOverrideBranchFilter

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Excludes List<string>

List of branch patterns to exclude.

Includes List<string>

List of branch patterns to include.

Excludes []string

List of branch patterns to exclude.

Includes []string

List of branch patterns to include.

excludes string[]

List of branch patterns to exclude.

includes string[]

List of branch patterns to include.

excludes List[str]

List of branch patterns to exclude.

includes List[str]

List of branch patterns to include.

BuildDefinitionPullRequestTriggerOverridePathFilter

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Excludes List<string>

List of branch patterns to exclude.

Includes List<string>

List of branch patterns to include.

Excludes []string

List of branch patterns to exclude.

Includes []string

List of branch patterns to include.

excludes string[]

List of branch patterns to exclude.

includes string[]

List of branch patterns to include.

excludes List[str]

List of branch patterns to exclude.

includes List[str]

List of branch patterns to include.

BuildDefinitionRepository

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

RepoId string

The id of the repository. For TfsGit repos, this is simply the ID of the repository. For Github repos, this will take the form of <GitHub Org>/<Repo Name>. For Bitbucket repos, this will take the form of <Workspace ID>/<Repo Name>.

RepoType string

The repository type. Valid values: GitHub or TfsGit or Bitbucket. Defaults to Github.

YmlPath string

The path of the Yaml file describing the build definition.

BranchName string

The branch name for which builds are triggered. Defaults to master.

ServiceConnectionId string

The service connection ID. Used if the repo_type is GitHub.

RepoId string

The id of the repository. For TfsGit repos, this is simply the ID of the repository. For Github repos, this will take the form of <GitHub Org>/<Repo Name>. For Bitbucket repos, this will take the form of <Workspace ID>/<Repo Name>.

RepoType string

The repository type. Valid values: GitHub or TfsGit or Bitbucket. Defaults to Github.

YmlPath string

The path of the Yaml file describing the build definition.

BranchName string

The branch name for which builds are triggered. Defaults to master.

ServiceConnectionId string

The service connection ID. Used if the repo_type is GitHub.

repoId string

The id of the repository. For TfsGit repos, this is simply the ID of the repository. For Github repos, this will take the form of <GitHub Org>/<Repo Name>. For Bitbucket repos, this will take the form of <Workspace ID>/<Repo Name>.

repoType string

The repository type. Valid values: GitHub or TfsGit or Bitbucket. Defaults to Github.

ymlPath string

The path of the Yaml file describing the build definition.

branchName string

The branch name for which builds are triggered. Defaults to master.

serviceConnectionId string

The service connection ID. Used if the repo_type is GitHub.

repoId str

The id of the repository. For TfsGit repos, this is simply the ID of the repository. For Github repos, this will take the form of <GitHub Org>/<Repo Name>. For Bitbucket repos, this will take the form of <Workspace ID>/<Repo Name>.

repoType str

The repository type. Valid values: GitHub or TfsGit or Bitbucket. Defaults to Github.

ymlPath str

The path of the Yaml file describing the build definition.

branchName str

The branch name for which builds are triggered. Defaults to master.

serviceConnectionId str

The service connection ID. Used if the repo_type is GitHub.

BuildDefinitionVariable

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Name string

The name of the variable.

AllowOverride bool

True if the variable can be overridden. Defaults to true.

IsSecret bool

True if the variable is a secret. Defaults to false.

SecretValue string

The secret value of the variable. Used when is_secret set to true.

Value string

The value of the variable.

Name string

The name of the variable.

AllowOverride bool

True if the variable can be overridden. Defaults to true.

IsSecret bool

True if the variable is a secret. Defaults to false.

SecretValue string

The secret value of the variable. Used when is_secret set to true.

Value string

The value of the variable.

name string

The name of the variable.

allowOverride boolean

True if the variable can be overridden. Defaults to true.

isSecret boolean

True if the variable is a secret. Defaults to false.

secretValue string

The secret value of the variable. Used when is_secret set to true.

value string

The value of the variable.

name str

The name of the variable.

allowOverride bool

True if the variable can be overridden. Defaults to true.

isSecret bool

True if the variable is a secret. Defaults to false.

secretValue str

The secret value of the variable. Used when is_secret set to true.

value str

The value of the variable.

Package Details

Repository
https://github.com/pulumi/pulumi-azuredevops
License
Apache-2.0
Notes
This Pulumi package is based on the azuredevops Terraform Provider.