-
Notifications
You must be signed in to change notification settings - Fork 431
File Copier Tasks YAML
Richard Fennell edited this page Oct 25, 2018
·
7 revisions
The FileUtilities package contains the following tasks. The table show the possible variables that can be used in YAML Azure DevOps Pipeline configurations
Copies files between locations
# File Copy with filters
# Description - Copies files between locations
- task: FileCopy
inputs:
# Required arguments
sourceFolder:
targetFolder:
include: *
filter: *
-
Argument: sourceFolder
- Description: The source folders, comma delimited
- Type: string
- Required: True
- Default (if defined):
-
Argument: targetFolder
- Description: The target folder
- Type: string
- Required: True
- Default (if defined):
-
Argument: include
- Description: The files types to match, comma delimited
- Type: string
- Required: True
- Default (if defined): *
-
Argument: filter
- Description: The file pattern to match
- Type: string
- Required: True
- Default (if defined): *
Gets the contents of a remote TFS server build's drop location
# Get Artifact From UNC Share
# Description - Gets the contents of a remote TFS server build's drop location
- task: GetArtifactFromUncShare
inputs:
# Required arguments
tfsUri:
teamproject:
defname:
artifactname:
localdir: $(SYSTEM.ARTIFACTSDIRECTORY)
-
Argument: tfsUri
- Description: The URI of the TFS server e.g. http://myserver:8080/tfs/defaultcollection
- Type: string
- Required: True
- Default (if defined):
-
Argument: teamproject
- Description: The name of the source team project
- Type: string
- Required: True
- Default (if defined):
-
Argument: defname
- Description: The name of the build definition.
- Type: string
- Required: True
- Default (if defined):
-
Argument: artifactname
- Description: The name of the build artifact.
- Type: string
- Required: True
- Default (if defined):
-
Argument: buildnumber
- Description: Number of the build to download (if blank latest complete build used)
- Type: string
- Required: False
- Default (if defined):
-
Argument: username
- Description: User name to access remote server (if blank default creds. used)
- Type: string
- Required: False
- Default (if defined):
-
Argument: password
- Description: Password to access remote server (if blank default creds. used)
- Type: string
- Required: False
- Default (if defined):
-
Argument: localdir
- Description: The root directory to store the artifact in, defaults to $(SYSTEM.ARTIFACTSDIRECTORY)
- Type: string
- Required: True
- Default (if defined): $(SYSTEM.ARTIFACTSDIRECTORY)
Update an attribute in an Xml file based on XPath filter
# Update XML file attribute
# Description - Update an attribute in an Xml file based on XPath filter
- task: XmlFileUpdateTask
inputs:
# Required arguments
filename:
xpath:
value:
-
Argument: filename
- Description: The file to update e.g: $(SYSTEM.ARTIFACTSDIRECTORY)\myfile.dll.config
- Type: string
- Required: True
- Default (if defined):
-
Argument: xpath
- Description: The Xpath query to select a node e.g: /configuration/appSettings/add[@key='A variable']
- Type: string
- Required: True
- Default (if defined):
-
Argument: attribute
- Description: The attribute name to update e.g. value (if not set InnerText of node will be updated)
- Type: string
- Required: False
- Default (if defined):
-
Argument: value
- Description: The new value to set e.g. 'new value'
- Type: string
- Required: True
- Default (if defined):
-
Argument: recurse
- Description: If true will search for files recursivally, default is true.
- Type: boolean
- Required: False
- Default (if defined): True