Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Run CURL GET commands in Azure Pipeline Task

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

like image 217
hitman126 Avatar asked Oct 15 '25 18:10

hitman126


1 Answers

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

enter image description here

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.

like image 72
pirateofebay Avatar answered Oct 18 '25 14:10

pirateofebay



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!