Skip to content

BuildTasks Task YAML

Richard Fennell edited this page Feb 13, 2019 · 11 revisions

BuildUpdating

The BuildUpdating package contains the following tasks. The table show the possible variables that can be used in YAML Azure DevOps Pipeline configurations

BuildRetensionTask

Set Retension on a Build

YAML snippet

# Set Retension on a Build
# Description - Set Retension on a Build
- task: BuildRetensionTask
  inputs: 
     # Required arguments
     mode: Prime

Arguments

  • Argument: mode
    • Description: Select the builds to update.
    • Type: pickList
      • AllArtifacts
      • NamedArtifacts
      • Prime
    • Required: True
    • Default (if defined): Prime
  • Argument: artifacts
    • Description: A comma separated list of artifacts
    • Type: string
    • Required: False
    • Default (if defined):
  • Argument: keepForever
    • Description: If true will set the build retension on the build
    • Type: boolean
    • Required: False
    • Default (if defined): True

Advanced

  • Argument: usedefaultcreds
    • Description: If true will use the credentials of the running agent as opposed to access token provided by build service.
    • Type: boolean
    • Required: False
    • Default (if defined): False

BuildVariableTask

Set variable on a build defintion

YAML snippet

# Set variable on a build defintion
# Description - Set variable on a build defintion
- task: BuildVariableTask
  inputs: 
     # Required arguments
     buildmode: Prime
     variable: 
     mode: Manual
     value: 

Arguments

  • Argument: buildmode
    • Description: Select the builds to update (Used in Releases only).
    • Type: pickList
      • AllArtifacts
      • NamedArtifacts
      • Prime
    • Required: True
    • Default (if defined): Prime
  • Argument: artifacts
    • Description: A comma separated list of artifacts
    • Type: string
    • Required: False
    • Default (if defined):
  • Argument: variable
    • Description: The name of the build variable to update
    • Type: string
    • Required: True
    • Default (if defined):
  • Argument: mode
    • Description: Select the mode to operate in.
    • Type: pickList
      • Manual
      • Autoincrement
    • Required: True
    • Default (if defined): Manual
  • Argument: value
    • Description: The value of the build variable to update
    • Type: string
    • Required: True
    • Default (if defined):

Advanced

  • Argument: usedefaultcreds
    • Description: If true will use the credentials of the running agent as opposed to access token provided by build service.
    • Type: boolean
    • Required: False
    • Default (if defined): False

GetBuildDefinitionVariableValueTask

Get the current value of a specified build defintion variable.

YAML snippet

# Set variable in current build from another build
# Description - Get the current value of a specified build defintion variable.
- task: GetBuildDefinitionVariableValueTask
  inputs: 
     # Required arguments
     builddefinitionname: 
     variable: 
     localVariable: 

Arguments

  • Argument: builddefinitionname
    • Description: The friendly name of the build definition containing the variable you wish to read the value of.
    • Type: string
    • Required: True
    • Default (if defined):
  • Argument: variable
    • Description: The name of the variable in the specified definition you wish to get the value of
    • Type: string
    • Required: True
    • Default (if defined):
  • Argument: localVariable
    • Description: The name of the build variable in this definition you wish to use to store the value of the remote variable
    • Type: string
    • Required: True
    • Default (if defined):

Advanced

  • Argument: usedefaultcreds
    • Description: If true will use the credentials of the running agent as opposed to access token provided by build service.
    • Type: boolean
    • Required: False
    • Default (if defined): False
Clone this wiki locally