BuildDefinition
Manages a Build Definition within Azure DevOps.
Relevant Links
Create a BuildDefinition Resource
new BuildDefinition(name: string, args: BuildDefinitionArgs, opts?: CustomResourceOptions);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);func NewBuildDefinition(ctx *Context, name string, args BuildDefinitionArgs, opts ...ResourceOption) (*BuildDefinition, error)public BuildDefinition(string name, BuildDefinitionArgs args, CustomResourceOptions? opts = null)- 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:
- Project
Id string The project ID or project name.
- Repository
Pulumi.
Azure Dev Ops. Build. Inputs. Build Definition Repository Args A
repositoryblock as documented below.- Agent
Pool stringName The agent pool that should execute the build. Defaults to
Hosted Ubuntu 1604.- Ci
Trigger Pulumi.Azure Dev Ops. Build. Inputs. Build Definition Ci Trigger Args Continuous Integration Integration trigger.
- Name string
The name of the build definition.
- Path string
- Pull
Request Pulumi.Trigger Azure Dev Ops. Build. Inputs. Build Definition Pull Request Trigger Args Pull Request Integration Integration trigger.
- Variable
Groups List<int> A list of variable group IDs (integers) to link to the build definition.
- Variables
List<Pulumi.
Azure Dev Ops. Build. Inputs. Build Definition Variable Args> A list of
variableblocks, as documented below.
- Project
Id string The project ID or project name.
- Repository
Build
Definition Repository A
repositoryblock as documented below.- Agent
Pool stringName The agent pool that should execute the build. Defaults to
Hosted Ubuntu 1604.- Ci
Trigger BuildDefinition Ci Trigger Continuous Integration Integration trigger.
- Name string
The name of the build definition.
- Path string
- Pull
Request BuildTrigger Definition Pull Request Trigger Pull Request Integration Integration trigger.
- Variable
Groups []int A list of variable group IDs (integers) to link to the build definition.
- Variables
[]Build
Definition Variable A list of
variableblocks, as documented below.
- project
Id string The project ID or project name.
- repository
Build
Definition Repository A
repositoryblock as documented below.- agent
Pool stringName The agent pool that should execute the build. Defaults to
Hosted Ubuntu 1604.- ci
Trigger BuildDefinition Ci Trigger Continuous Integration Integration trigger.
- name string
The name of the build definition.
- path string
- pull
Request BuildTrigger Definition Pull Request Trigger Pull Request Integration Integration trigger.
- variable
Groups number[] A list of variable group IDs (integers) to link to the build definition.
- variables
Build
Definition Variable[] A list of
variableblocks, as documented below.
- project_
id str The project ID or project name.
- repository
Dict[Build
Definition Repository] A
repositoryblock as documented below.- agent_
pool_ strname The agent pool that should execute the build. Defaults to
Hosted Ubuntu 1604.- ci_
trigger Dict[BuildDefinition Ci Trigger] Continuous Integration Integration trigger.
- name str
The name of the build definition.
- path str
- pull_
request_ Dict[Buildtrigger Definition Pull Request Trigger] Pull Request Integration Integration trigger.
- variable_
groups List[Integer] A list of variable group IDs (integers) to link to the build definition.
- variables
List[Build
Definition Variable] A list of
variableblocks, as documented below.
Outputs
All input properties are implicitly available as output properties. Additionally, the BuildDefinition resource produces the following output properties:
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): BuildDefinitionstatic 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:
- Agent
Pool stringName The agent pool that should execute the build. Defaults to
Hosted Ubuntu 1604.- Ci
Trigger Pulumi.Azure Dev Ops. Build. Inputs. Build Definition Ci Trigger Args Continuous Integration Integration trigger.
- Name string
The name of the build definition.
- Path string
- Project
Id string The project ID or project name.
- Pull
Request Pulumi.Trigger Azure Dev Ops. Build. Inputs. Build Definition Pull Request Trigger Args Pull Request Integration Integration trigger.
- Repository
Pulumi.
Azure Dev Ops. Build. Inputs. Build Definition Repository Args A
repositoryblock as documented below.- Revision int
The revision of the build definition
- Variable
Groups List<int> A list of variable group IDs (integers) to link to the build definition.
- Variables
List<Pulumi.
Azure Dev Ops. Build. Inputs. Build Definition Variable Args> A list of
variableblocks, as documented below.
- Agent
Pool stringName The agent pool that should execute the build. Defaults to
Hosted Ubuntu 1604.- Ci
Trigger BuildDefinition Ci Trigger Continuous Integration Integration trigger.
- Name string
The name of the build definition.
- Path string
- Project
Id string The project ID or project name.
- Pull
Request BuildTrigger Definition Pull Request Trigger Pull Request Integration Integration trigger.
- Repository
Build
Definition Repository A
repositoryblock as documented below.- Revision int
The revision of the build definition
- Variable
Groups []int A list of variable group IDs (integers) to link to the build definition.
- Variables
[]Build
Definition Variable A list of
variableblocks, as documented below.
- agent
Pool stringName The agent pool that should execute the build. Defaults to
Hosted Ubuntu 1604.- ci
Trigger BuildDefinition Ci Trigger Continuous Integration Integration trigger.
- name string
The name of the build definition.
- path string
- project
Id string The project ID or project name.
- pull
Request BuildTrigger Definition Pull Request Trigger Pull Request Integration Integration trigger.
- repository
Build
Definition Repository A
repositoryblock as documented below.- revision number
The revision of the build definition
- variable
Groups number[] A list of variable group IDs (integers) to link to the build definition.
- variables
Build
Definition Variable[] A list of
variableblocks, as documented below.
- agent_
pool_ strname The agent pool that should execute the build. Defaults to
Hosted Ubuntu 1604.- ci_
trigger Dict[BuildDefinition Ci Trigger] 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_ Dict[Buildtrigger Definition Pull Request Trigger] Pull Request Integration Integration trigger.
- repository
Dict[Build
Definition Repository] A
repositoryblock 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[Build
Definition Variable] A list of
variableblocks, as documented below.
Supporting Types
BuildDefinitionCiTrigger
- Override
Pulumi.
Azure Dev Ops. Build. Inputs. Build Definition Ci Trigger Override Args Override the azure-pipeline file and use a this configuration for all builds.
- Use
Yaml bool Use the azure-pipeline file for the build configuration. Defaults to
false.
- Override
Build
Definition Ci Trigger Override Override the azure-pipeline file and use a this configuration for all builds.
- Use
Yaml bool Use the azure-pipeline file for the build configuration. Defaults to
false.
- override
Build
Definition Ci Trigger Override Override the azure-pipeline file and use a this configuration for all builds.
- use
Yaml boolean Use the azure-pipeline file for the build configuration. Defaults to
false.
- override
Dict[Build
Definition Ci Trigger Override] Override the azure-pipeline file and use a this configuration for all builds.
- use
Yaml bool Use the azure-pipeline file for the build configuration. Defaults to
false.
BuildDefinitionCiTriggerOverride
- 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.- Branch
Filters List<Pulumi.Azure Dev Ops. Build. Inputs. Build Definition Ci Trigger Override Branch Filter Args> The branches to include and exclude from the trigger.
- Max
Concurrent intBuilds Per Branch The number of max builds per branch. Defaults to
1.- Path
Filters List<Pulumi.Azure Dev Ops. Build. Inputs. Build Definition Ci Trigger Override Path Filter Args> Specify file paths to include or exclude. Note that the wildcard syntax is different between branches/tags and file paths.
- Polling
Interval int How often the external repository is polled. Defaults to
0.- Polling
Job stringId 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.- Branch
Filters []BuildDefinition Ci Trigger Override Branch Filter The branches to include and exclude from the trigger.
- Max
Concurrent intBuilds Per Branch The number of max builds per branch. Defaults to
1.- Path
Filters []BuildDefinition Ci Trigger Override Path Filter Specify file paths to include or exclude. Note that the wildcard syntax is different between branches/tags and file paths.
- Polling
Interval int How often the external repository is polled. Defaults to
0.- Polling
Job stringId 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.- branch
Filters BuildDefinition Ci Trigger Override Branch Filter[] The branches to include and exclude from the trigger.
- max
Concurrent numberBuilds Per Branch The number of max builds per branch. Defaults to
1.- path
Filters BuildDefinition Ci Trigger Override Path Filter[] Specify file paths to include or exclude. Note that the wildcard syntax is different between branches/tags and file paths.
- polling
Interval number How often the external repository is polled. Defaults to
0.- polling
Job stringId 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.- branch
Filters List[BuildDefinition Ci Trigger Override Branch Filter] The branches to include and exclude from the trigger.
- max
Concurrent floatBuilds Per Branch The number of max builds per branch. Defaults to
1.- path
Filters List[BuildDefinition Ci Trigger Override Path Filter] Specify file paths to include or exclude. Note that the wildcard syntax is different between branches/tags and file paths.
- polling
Interval float How often the external repository is polled. Defaults to
0.- polling
Job strId 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
- Excludes List<string>
List of branch patterns to exclude.
- Includes List<string>
List of branch patterns to include.
BuildDefinitionCiTriggerOverridePathFilter
- Excludes List<string>
List of branch patterns to exclude.
- Includes List<string>
List of branch patterns to include.
BuildDefinitionPullRequestTrigger
- Forks
Pulumi.
Azure Dev Ops. Build. Inputs. Build Definition Pull Request Trigger Forks Args Set permissions for Forked repositories.
- Comment
Required string - Initial
Branch string - Override
Pulumi.
Azure Dev Ops. Build. Inputs. Build Definition Pull Request Trigger Override Args Override the azure-pipeline file and use a this configuration for all builds.
- Use
Yaml bool Use the azure-pipeline file for the build configuration. Defaults to
false.
- Forks
Build
Definition Pull Request Trigger Forks Set permissions for Forked repositories.
- Comment
Required string - Initial
Branch string - Override
Build
Definition Pull Request Trigger Override Override the azure-pipeline file and use a this configuration for all builds.
- Use
Yaml bool Use the azure-pipeline file for the build configuration. Defaults to
false.
- forks
Build
Definition Pull Request Trigger Forks Set permissions for Forked repositories.
- comment
Required string - initial
Branch string - override
Build
Definition Pull Request Trigger Override Override the azure-pipeline file and use a this configuration for all builds.
- use
Yaml boolean Use the azure-pipeline file for the build configuration. Defaults to
false.
- forks
Dict[Build
Definition Pull Request Trigger Forks] Set permissions for Forked repositories.
- comment
Required str - initial
Branch str - override
Dict[Build
Definition Pull Request Trigger Override] Override the azure-pipeline file and use a this configuration for all builds.
- use
Yaml bool Use the azure-pipeline file for the build configuration. Defaults to
false.
BuildDefinitionPullRequestTriggerForks
BuildDefinitionPullRequestTriggerOverride
- Auto
Cancel bool . Defaults to
true.- Branch
Filters List<Pulumi.Azure Dev Ops. Build. Inputs. Build Definition Pull Request Trigger Override Branch Filter Args> The branches to include and exclude from the trigger.
- Path
Filters List<Pulumi.Azure Dev Ops. Build. Inputs. Build Definition Pull Request Trigger Override Path Filter Args> Specify file paths to include or exclude. Note that the wildcard syntax is different between branches/tags and file paths.
- Auto
Cancel bool . Defaults to
true.- Branch
Filters []BuildDefinition Pull Request Trigger Override Branch Filter The branches to include and exclude from the trigger.
- Path
Filters []BuildDefinition Pull Request Trigger Override Path Filter Specify file paths to include or exclude. Note that the wildcard syntax is different between branches/tags and file paths.
- auto
Cancel boolean . Defaults to
true.- branch
Filters BuildDefinition Pull Request Trigger Override Branch Filter[] The branches to include and exclude from the trigger.
- path
Filters BuildDefinition Pull Request Trigger Override Path Filter[] Specify file paths to include or exclude. Note that the wildcard syntax is different between branches/tags and file paths.
- auto
Cancel bool . Defaults to
true.- branch
Filters List[BuildDefinition Pull Request Trigger Override Branch Filter] The branches to include and exclude from the trigger.
- path
Filters List[BuildDefinition Pull Request Trigger Override Path Filter] Specify file paths to include or exclude. Note that the wildcard syntax is different between branches/tags and file paths.
BuildDefinitionPullRequestTriggerOverrideBranchFilter
- Excludes List<string>
List of branch patterns to exclude.
- Includes List<string>
List of branch patterns to include.
BuildDefinitionPullRequestTriggerOverridePathFilter
- Excludes List<string>
List of branch patterns to exclude.
- Includes List<string>
List of branch patterns to include.
BuildDefinitionRepository
- Repo
Id string The id of the repository. For
TfsGitrepos, this is simply the ID of the repository. ForGithubrepos, this will take the form of<GitHub Org>/<Repo Name>. ForBitbucketrepos, this will take the form of<Workspace ID>/<Repo Name>.- Repo
Type string The repository type. Valid values:
GitHuborTfsGitorBitbucket. Defaults toGithub.- Yml
Path string The path of the Yaml file describing the build definition.
- Branch
Name string The branch name for which builds are triggered. Defaults to
master.- Service
Connection stringId The service connection ID. Used if the
repo_typeisGitHub.
- Repo
Id string The id of the repository. For
TfsGitrepos, this is simply the ID of the repository. ForGithubrepos, this will take the form of<GitHub Org>/<Repo Name>. ForBitbucketrepos, this will take the form of<Workspace ID>/<Repo Name>.- Repo
Type string The repository type. Valid values:
GitHuborTfsGitorBitbucket. Defaults toGithub.- Yml
Path string The path of the Yaml file describing the build definition.
- Branch
Name string The branch name for which builds are triggered. Defaults to
master.- Service
Connection stringId The service connection ID. Used if the
repo_typeisGitHub.
- repo
Id string The id of the repository. For
TfsGitrepos, this is simply the ID of the repository. ForGithubrepos, this will take the form of<GitHub Org>/<Repo Name>. ForBitbucketrepos, this will take the form of<Workspace ID>/<Repo Name>.- repo
Type string The repository type. Valid values:
GitHuborTfsGitorBitbucket. Defaults toGithub.- yml
Path string The path of the Yaml file describing the build definition.
- branch
Name string The branch name for which builds are triggered. Defaults to
master.- service
Connection stringId The service connection ID. Used if the
repo_typeisGitHub.
- repo
Id str The id of the repository. For
TfsGitrepos, this is simply the ID of the repository. ForGithubrepos, this will take the form of<GitHub Org>/<Repo Name>. ForBitbucketrepos, this will take the form of<Workspace ID>/<Repo Name>.- repo
Type str The repository type. Valid values:
GitHuborTfsGitorBitbucket. Defaults toGithub.- yml
Path str The path of the Yaml file describing the build definition.
- branch
Name str The branch name for which builds are triggered. Defaults to
master.- service
Connection strId The service connection ID. Used if the
repo_typeisGitHub.
BuildDefinitionVariable
- Name string
The name of the variable.
- Allow
Override bool True if the variable can be overridden. Defaults to
true.- Is
Secret bool True if the variable is a secret. Defaults to
false.- Secret
Value string The secret value of the variable. Used when
is_secretset totrue.- Value string
The value of the variable.
- Name string
The name of the variable.
- Allow
Override bool True if the variable can be overridden. Defaults to
true.- Is
Secret bool True if the variable is a secret. Defaults to
false.- Secret
Value string The secret value of the variable. Used when
is_secretset totrue.- Value string
The value of the variable.
- name string
The name of the variable.
- allow
Override boolean True if the variable can be overridden. Defaults to
true.- is
Secret boolean True if the variable is a secret. Defaults to
false.- secret
Value string The secret value of the variable. Used when
is_secretset totrue.- value string
The value of the variable.
- name str
The name of the variable.
- allow
Override bool True if the variable can be overridden. Defaults to
true.- is
Secret bool True if the variable is a secret. Defaults to
false.- secret
Value str The secret value of the variable. Used when
is_secretset totrue.- 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
azuredevopsTerraform Provider.