-
Notifications
You must be signed in to change notification settings - Fork 431
BuildTasks Task YAML
rfennell edited this page Dec 22, 2022
·
11 revisions
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
Set Retension on a Build
# Set Retension on a Build
# Description - Set Retension on a Build
- task: BuildRetensionTask@3
inputs:
# Required arguments
mode: Prime
usePSCore: False
-
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
-
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
-
Argument: usePSCore
- Description: On a Windows agent, if set will run Pester tests with 'pwsh', if false will use 'PowerShell.exe'. On Non-Windows agents 'pwsh' always used
- Type: boolean
- Required: true
- Default (if defined): False
Set variable on a build defintion
# Set variable on a build defintion
# Description - Set variable on a build defintion
- task: BuildVariableTask@3
inputs:
# Required arguments
buildmode: Prime
variable:
mode: Manual
value:
usePSCore: False
-
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):
-
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
-
Argument: usePSCore
- Description: On a Windows agent, if set will run Pester tests with 'pwsh', if false will use 'PowerShell.exe'. On Non-Windows agents 'pwsh' always used
- Type: boolean
- Required: true
- Default (if defined): False
Get the current value of a specified build defintion variable.
# Get Build Definition Variable
# Description - Get the current value of a specified build defintion variable.
- task: GetBuildDefinitionVariableValueTask@3
inputs:
# Required arguments
builddefinitionname:
variable:
localVariable:
usePSCore: False
-
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):
-
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
-
Argument: usePSCore
- Description: On a Windows agent, if set will run Pester tests with 'pwsh', if false will use 'PowerShell.exe'. On Non-Windows agents 'pwsh' always used
- Type: boolean
- Required: true
- Default (if defined): False