I am looking to run some CURL commands (GET mainly) in an Azure Pipeline Task to list/download some artifacts from a few sources. Would appreciate some help with any examples of how I can achieve this through a Pipeline Task using CURL, Powershell, Windows Command or any other appropriate method.
Thanks
The easiest way to do this is to use the Command Line task. For a YAML pipeline, this would look like
- task: CmdLine@2
displayName: Curl Example
inputs:
script: 'curl google.com'
For a "Classic UI" pipeline, it would look like
Note that for either of these options you must be using a Linux build agent. If you are using a Windows build agent, you should use Invoke-WebRequest
.