How To download an Artifact from AppVeyor without PowerShell

Besides the poplpular CI services Travis circleci there is AppVeyor which fills the Windows gap:

Continuous Delivery service for Windows

We cannot use Downloading AppVeyor build artifacts (PowerShell - basic example) due to the lack of PowerShell on our download server we "translated" the script to GNU Bash.

Declaring variables


$apiUrl = ''



GET a JSON file


$project = Invoke-RestMethod -Method Get -Headers @{ "Content-Type" = "application/json" } -Uri "$uri"


$PROJECT=$(curl -sS --header "Content-type: application/json" "$URI")

Parse JSON file

PowerShell (built-in):

$jobId = $[0].jobId

Bash (with jq)

JOB_ID=$(echo $PROJECT | jq -r '[0].jobId')

Note: You can download jq (a lightweight and flexible command-line JSON processor) here

With httpbin you can easily experiment with this setup on your own:

$ curl -sS | jq -r '.url'

For more detailed explanation in case you have more complex scenarios I highly recommend this post HTTP to HTTP with bash, curl and jq

Good luck with your migration!

Show Comments