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.
build¶
This provider is a derived work of the Terraform Provider distributed under MPL 2.0. If you encounter a bug or missing feature, first check the pulumi/pulumi-azuredevops repo; however, if that doesn’t turn up anything, please consult the source terraform-providers/terraform-provider-azuredevops repo.
- class
pulumi_azuredevops.build.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__=None, __opts__=None)¶ Manages a Build Definition within Azure DevOps.
import pulumi import pulumi_azuredevops as azuredevops project = azuredevops.core.Project("project", project_name="Sample Project", visibility="private", version_control="Git", work_item_template="Agile") repository = azuredevops.repository.Git("repository", project_id=project.id, initialization={ "initType": "Clean", }) vars = azuredevops.pipeline.VariableGroup("vars", project_id=project.id, description="Managed by Terraform", allow_access=True, variable=[{ "name": "FOO", "value": "BAR", }]) build = azuredevops.build.BuildDefinition("build", project_id=project.id, path="\ExampleFolder", ci_trigger={ "useYaml": True, }, repository={ "repoType": "TfsGit", "repoId": repository.id, "branchName": repository.default_branch, "ymlPath": "azure-pipelines.yml", }, variable_groups=[vars.id], variable=[ { "name": "PipelineVariable", "value": "Go Microsoft!", }, { "name": "PipelineSecret", "secretValue": "ZGV2cw", "isSecret": True, }, ])
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
agent_pool_name (pulumi.Input[str]) – The agent pool that should execute the build. Defaults to
Hosted Ubuntu 1604.ci_trigger (pulumi.Input[dict]) – Continuous Integration Integration trigger.
name (pulumi.Input[str]) – The name of the build definition.
project_id (pulumi.Input[str]) – The project ID or project name.
pull_request_trigger (pulumi.Input[dict]) – Pull Request Integration Integration trigger.
repository (pulumi.Input[dict]) – A
repositoryblock as documented below.variable_groups (pulumi.Input[list]) – A list of variable group IDs (integers) to link to the build definition.
variables (pulumi.Input[list]) – A list of
variableblocks, as documented below.
The ci_trigger object supports the following:
override(pulumi.Input[dict]) - Override the azure-pipeline file and use a this configuration for all builds.batch(pulumi.Input[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 totrue.branchFilters(pulumi.Input[list]) - The branches to include and exclude from the trigger.excludes(pulumi.Input[list]) - List of branch patterns to exclude.includes(pulumi.Input[list]) - List of branch patterns to include.
maxConcurrentBuildsPerBranch(pulumi.Input[float]) - The number of max builds per branch. Defaults to1.pathFilters(pulumi.Input[list]) - Specify file paths to include or exclude. Note that the wildcard syntax is different between branches/tags and file paths.excludes(pulumi.Input[list]) - List of branch patterns to exclude.includes(pulumi.Input[list]) - List of branch patterns to include.
pollingInterval(pulumi.Input[float]) - How often the external repository is polled. Defaults to0.pollingJobId(pulumi.Input[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.
useYaml(pulumi.Input[bool]) - Use the azure-pipeline file for the build configuration. Defaults tofalse.
The pull_request_trigger object supports the following:
commentRequired(pulumi.Input[str])forks(pulumi.Input[dict]) - Set permissions for Forked repositories.enabled(pulumi.Input[bool]) - Build pull requests form forms of this repository.shareSecrets(pulumi.Input[bool]) - Make secrets available to builds of forks.
initialBranch(pulumi.Input[str])override(pulumi.Input[dict]) - Override the azure-pipeline file and use a this configuration for all builds.autoCancel(pulumi.Input[bool]) - . Defaults totrue.branchFilters(pulumi.Input[list]) - The branches to include and exclude from the trigger.excludes(pulumi.Input[list]) - List of branch patterns to exclude.includes(pulumi.Input[list]) - List of branch patterns to include.
pathFilters(pulumi.Input[list]) - Specify file paths to include or exclude. Note that the wildcard syntax is different between branches/tags and file paths.excludes(pulumi.Input[list]) - List of branch patterns to exclude.includes(pulumi.Input[list]) - List of branch patterns to include.
useYaml(pulumi.Input[bool]) - Use the azure-pipeline file for the build configuration. Defaults tofalse.
The repository object supports the following:
branchName(pulumi.Input[str]) - The branch name for which builds are triggered. Defaults tomaster.repoId(pulumi.Input[str]) - The id of the repository. ForTfsGitrepos, 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>.repoType(pulumi.Input[str]) - The repository type. Valid values:GitHuborTfsGitorBitbucket. Defaults toGithub.serviceConnectionId(pulumi.Input[str]) - The service connection ID. Used if therepo_typeisGitHub.ymlPath(pulumi.Input[str]) - The path of the Yaml file describing the build definition.
The variables object supports the following:
allowOverride(pulumi.Input[bool]) - True if the variable can be overridden. Defaults totrue.isSecret(pulumi.Input[bool]) - True if the variable is a secret. Defaults tofalse.name(pulumi.Input[str]) - The name of the variable.secretValue(pulumi.Input[str]) - The secret value of the variable. Used whenis_secretset totrue.value(pulumi.Input[str]) - The value of the variable.
agent_pool_name: pulumi.Output[str] = None¶The agent pool that should execute the build. Defaults to
Hosted Ubuntu 1604.
ci_trigger: pulumi.Output[dict] = None¶Continuous Integration Integration trigger.
override(dict) - Override the azure-pipeline file and use a this configuration for all builds.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 totrue.branchFilters(list) - The branches to include and exclude from the trigger.excludes(list) - List of branch patterns to exclude.includes(list) - List of branch patterns to include.
maxConcurrentBuildsPerBranch(float) - The number of max builds per branch. Defaults to1.pathFilters(list) - Specify file paths to include or exclude. Note that the wildcard syntax is different between branches/tags and file paths.excludes(list) - List of branch patterns to exclude.includes(list) - List of branch patterns to include.
pollingInterval(float) - How often the external repository is polled. Defaults to0.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.
useYaml(bool) - Use the azure-pipeline file for the build configuration. Defaults tofalse.
name: pulumi.Output[str] = None¶The name of the build definition.
project_id: pulumi.Output[str] = None¶The project ID or project name.
pull_request_trigger: pulumi.Output[dict] = None¶Pull Request Integration Integration trigger.
commentRequired(str)forks(dict) - Set permissions for Forked repositories.enabled(bool) - Build pull requests form forms of this repository.shareSecrets(bool) - Make secrets available to builds of forks.
initialBranch(str)override(dict) - Override the azure-pipeline file and use a this configuration for all builds.autoCancel(bool) - . Defaults totrue.branchFilters(list) - The branches to include and exclude from the trigger.excludes(list) - List of branch patterns to exclude.includes(list) - List of branch patterns to include.
pathFilters(list) - Specify file paths to include or exclude. Note that the wildcard syntax is different between branches/tags and file paths.excludes(list) - List of branch patterns to exclude.includes(list) - List of branch patterns to include.
useYaml(bool) - Use the azure-pipeline file for the build configuration. Defaults tofalse.
repository: pulumi.Output[dict] = None¶A
repositoryblock as documented below.branchName(str) - The branch name for which builds are triggered. Defaults tomaster.repoId(str) - The id of the repository. ForTfsGitrepos, 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>.repoType(str) - The repository type. Valid values:GitHuborTfsGitorBitbucket. Defaults toGithub.serviceConnectionId(str) - The service connection ID. Used if therepo_typeisGitHub.ymlPath(str) - The path of the Yaml file describing the build definition.
revision: pulumi.Output[float] = None¶The revision of the build definition
variable_groups: pulumi.Output[list] = None¶A list of variable group IDs (integers) to link to the build definition.
variables: pulumi.Output[list] = None¶A list of
variableblocks, as documented below.allowOverride(bool) - True if the variable can be overridden. Defaults totrue.isSecret(bool) - True if the variable is a secret. Defaults tofalse.name(str) - The name of the variable.secretValue(str) - The secret value of the variable. Used whenis_secretset totrue.value(str) - The value of the variable.
- 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)¶ Get an existing BuildDefinition resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
agent_pool_name (pulumi.Input[str]) – The agent pool that should execute the build. Defaults to
Hosted Ubuntu 1604.ci_trigger (pulumi.Input[dict]) – Continuous Integration Integration trigger.
name (pulumi.Input[str]) – The name of the build definition.
project_id (pulumi.Input[str]) – The project ID or project name.
pull_request_trigger (pulumi.Input[dict]) – Pull Request Integration Integration trigger.
repository (pulumi.Input[dict]) – A
repositoryblock as documented below.revision (pulumi.Input[float]) – The revision of the build definition
variable_groups (pulumi.Input[list]) – A list of variable group IDs (integers) to link to the build definition.
variables (pulumi.Input[list]) – A list of
variableblocks, as documented below.
The ci_trigger object supports the following:
override(pulumi.Input[dict]) - Override the azure-pipeline file and use a this configuration for all builds.batch(pulumi.Input[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 totrue.branchFilters(pulumi.Input[list]) - The branches to include and exclude from the trigger.excludes(pulumi.Input[list]) - List of branch patterns to exclude.includes(pulumi.Input[list]) - List of branch patterns to include.
maxConcurrentBuildsPerBranch(pulumi.Input[float]) - The number of max builds per branch. Defaults to1.pathFilters(pulumi.Input[list]) - Specify file paths to include or exclude. Note that the wildcard syntax is different between branches/tags and file paths.excludes(pulumi.Input[list]) - List of branch patterns to exclude.includes(pulumi.Input[list]) - List of branch patterns to include.
pollingInterval(pulumi.Input[float]) - How often the external repository is polled. Defaults to0.pollingJobId(pulumi.Input[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.
useYaml(pulumi.Input[bool]) - Use the azure-pipeline file for the build configuration. Defaults tofalse.
The pull_request_trigger object supports the following:
commentRequired(pulumi.Input[str])forks(pulumi.Input[dict]) - Set permissions for Forked repositories.enabled(pulumi.Input[bool]) - Build pull requests form forms of this repository.shareSecrets(pulumi.Input[bool]) - Make secrets available to builds of forks.
initialBranch(pulumi.Input[str])override(pulumi.Input[dict]) - Override the azure-pipeline file and use a this configuration for all builds.autoCancel(pulumi.Input[bool]) - . Defaults totrue.branchFilters(pulumi.Input[list]) - The branches to include and exclude from the trigger.excludes(pulumi.Input[list]) - List of branch patterns to exclude.includes(pulumi.Input[list]) - List of branch patterns to include.
pathFilters(pulumi.Input[list]) - Specify file paths to include or exclude. Note that the wildcard syntax is different between branches/tags and file paths.excludes(pulumi.Input[list]) - List of branch patterns to exclude.includes(pulumi.Input[list]) - List of branch patterns to include.
useYaml(pulumi.Input[bool]) - Use the azure-pipeline file for the build configuration. Defaults tofalse.
The repository object supports the following:
branchName(pulumi.Input[str]) - The branch name for which builds are triggered. Defaults tomaster.repoId(pulumi.Input[str]) - The id of the repository. ForTfsGitrepos, 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>.repoType(pulumi.Input[str]) - The repository type. Valid values:GitHuborTfsGitorBitbucket. Defaults toGithub.serviceConnectionId(pulumi.Input[str]) - The service connection ID. Used if therepo_typeisGitHub.ymlPath(pulumi.Input[str]) - The path of the Yaml file describing the build definition.
The variables object supports the following:
allowOverride(pulumi.Input[bool]) - True if the variable can be overridden. Defaults totrue.isSecret(pulumi.Input[bool]) - True if the variable is a secret. Defaults tofalse.name(pulumi.Input[str]) - The name of the variable.secretValue(pulumi.Input[str]) - The secret value of the variable. Used whenis_secretset totrue.value(pulumi.Input[str]) - The value of the variable.
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str