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 *.
| Input | Required | Description |
|---|---|---|
| File Path* | Yes | Full path to the output file, including filename. |
| File Content* | Yes | The file content, with any variables inline. |
Advanced options
| Input | Description |
|---|---|
| Fail on Standard Error | Fail the task if anything is written to stderr. |
| Overwrite File | Overwrite the file if it already exists. |
Support
Report problems to support@absolute.technology.