Skip to main content

DATASTAR: Write File

Writes a file whose contents reference pipeline variables. Typical use is producing a JSON properties file that later steps (or the release pipeline) read:

{
"WorkItem": "$(WorkItem)",
"Version": "$(Rev)",
"BuildId": "$(Build.BuildId)",
"BuildNumber": "$(Build.BuildNumber)"
}

Any pipeline variable can be used. $(Rev) is a task-specific shortcut: it resolves to the digits after the final period in $(Build.BuildNumber). For example, a build number of 1234.99 makes $(Rev) equal to 99.

Inputs​

Required inputs marked with *.

InputRequiredDescription
File Path*YesFull path to the output file, including filename.
File Content*YesThe file content, with any variables inline.

Advanced options​

InputDescription
Fail on Standard ErrorFail the task if anything is written to stderr.
Overwrite FileOverwrite the file if it already exists.

Support​

Report problems to support@absolute.technology.