Use this task on AzureDevOps in a build or release pipeline to run a NodeJS script.
Argument | Description | Required | Condition |
---|---|---|---|
Script Source | Target script type: FilePath or Inline | Yes | No |
Script path | Path of the file to execute | Yes | Script Source == FilePath |
Inline Script | Source code to execute, task create a temp file to execute | Yes | Script Source == Inline |
Arguments | Arguments passed to the script execution, more information see How to Parse NodeJS Arguments | No | No |
Working directory | The path where the script file runs, if empty the default path is $(System.DefaultWorkingDirectory), see Predefined Variables | No | No |
The task assumes the nodejs is available on the PATH, use the task Node.js Tool Installer task to install a specific version of node before execution.
For inline execution the task create a temp folder with the prefix taskrunner followed by a random code and put the script inside a randomly generated file using writeFileSync Method. The file name is identified by a uuid.
Temp directory is stored in $(Agent.TempDirectory) path.
v0.4.2 Change the working directory of the script by placing the path in the task field.
v0.3.2 Pass arguments to the script using the Arguments task field.
Images can be found in iconnin.com