Skip to content

BuildTasks Task YAML

rfennell edited this page Aug 23, 2019 · 11 revisions

Build Updating Tasks

The 'Build Updating Tasks' 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
    • Required: true
    • Default (if defined): Prime
  • Argument: artifacts
    • Description: A comma separated list of build 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

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
    • 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
    • Required: true
    • Default (if defined): Manual
  • Argument: value
    • Description: The value of the build variable to update
    • Type: string
    • Required: true
    • Default (if defined):

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):
Clone this wiki locally