Quantcast
Channel: Team Foundation Server - General forum
Viewing all articles
Browse latest Browse all 6687

TFS 2015 RC - Run bash script as part of build on a Windows machine

$
0
0

We have an internal build of TFS 2015 RC at my company and I am trying to get a TFS Git build to execute a bash script as part of the build process.

I have a build agent available and working i.e. it executes builds that are added to the queue and succesfully pulls the branch from TFS. However, when it attempts to run my bash script it fails with the following error

"The definition for the task does not have a handler that matches any supported by this agent. Supported handlers: AzurePowerShell, AzurePowerShellHandler, PowerShell, PowerShellHandler, Process, ProcessHandler"

I cannot find a way of adding to this list to allow my bash script to run (the bash script contains calls to "npm install"). I have installed cygwin64 on the machine and i can happily RDP to the machine and execute scripts from a bash command line (or Powershell). Can anyone tell me how to get the build machine to run commands in bash?

I have added "sh" and "bash" as a capability in the web console and set the path to various values pointing to the cygwin64 installation folder, or the bin folder, or the sh.exe / bash.exe / cygwin.bat files. I have also added the same values to the path.

I tried changing the script to a Powershell command but then it complains about my script:

/cygdrive/c/Program Files/nodejs/npm: line 4: dirname: command not found
/cygdrive/c/Program Files/nodejs/npm: line 6: uname: command not found

I would prefer to execute the scripts in bash rather than Powershell -> Bash.

The build machine is running Windows Server 2012 R2.

Thanks

I should add that I'm attempting to build an AngularJS / Node app, using NPM.

Viewing all articles
Browse latest Browse all 6687

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>