0

I need to create a step in our TFS build process that will fire off a POST request using basic auth.

How can I execute a POST web request using a TFS build step? Do I need to run a PowerShell script or is there another way? I would prefer not using PowerShell if possible due to permission restrictions on our build server.

Thank you!

Matei
  • 327
  • 5
  • 17

1 Answers1

1

Add an Agentless phase to your build and use the Invoke REST API task.

Daniel Mann
  • 57,011
  • 13
  • 100
  • 120
  • Thank you Daniel but I can't find where to add an agentless phase :( I am not using Azure. Our TFS instance is on-prem version 2017. – Matei Nov 27 '18 at 18:51
  • It may be called a "Server" phase in 2017 – Daniel Mann Nov 27 '18 at 18:53
  • The Agentless phase not available in TFS 2017. I think you must use PowerShell, do you know how? – Shayki Abramczyk Nov 28 '18 at 09:12
  • We updated to 2018 Update 3 and the "agentless phase" is now available. @ShaykiAbramczyk you can submit a POST request in PowerShell as described here [on Stack Overflow](https://stackoverflow.com/questions/17325293/invoke-webrequest-post-with-parameters) – Matei Dec 03 '18 at 14:44