Skip to content

DATASTAR: Write File

Overview

The task is used to write a file containing variables that are resolved when the file is written. Typically this is used to create a Json properties file for example:

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

Note you can include any variables, in addition a special variable substitution has been added \((REV) which will assign the value to the digits after the last period in the standard build number variable. For example if your build number is "1234.99" then the "\)(Rev)" variable will be replaced with "99".

Contact Information

Please report a problem to support@absolute.technology if you are facing problems in making this task work. You can also share feedback about the task like, what more functionality should be added to the task, what other tasks you would like to have, at the same place.

Task Parameters

The task can be used to write variables into a file. The task parameters are described in detail below. The parameters listed with a * are required parameters for the task.

  • File Path*: The full path of the file including the filename.

  • File Content*: The file content including any variables.

Advanced Options

The following parameters are selectively shown under the Advanced Options:

  • Fail on Standard Error: If this is true, this task will fail if any errors are written to the Standard Error stream.
  • Overwrite File: If this is true, the task will overwrite an existing file.

Known Issues:

None.