Indipendent New Build webhook?

marocco2's Avatar

marocco2

27 Aug, 2016 05:03 PM

Hi!
I was wondering if I could start a new build without using Github webhook or the web interface.

Is there a webhook I could use?

Thanks a lot :)

  1. 1 Posted by Ilya Finkelshte... on 29 Aug, 2016 05:22 PM

    Ilya Finkelshteyn's Avatar

    Hello,

    You can use REST API for this. Please see below:
    https://www.appveyor.com/docs/api/projects-builds/#start-build-of-b...
    https://www.appveyor.com/docs/api/projects-builds/#start-build-of-s...

    Here is PowerShell script example:

    $token = <your_token>
    
    $headers = @{
      "Authorization" = "Bearer $token"
      "Content-type" = "application/json"
    }
    
    $body = @{
        accountName = <your_accountName>
        projectSlug = <your_projectSlug>
        branch = <your_branch>
        commitId = <your_commitId>
    }
    $body = $body | ConvertTo-Json
    
    Invoke-RestMethod -Uri 'https://ci.appveyor.com/api/builds' -Headers $headers  -Body $body -Method POST
    

    Hope this helps,
    Ilya.

  2. 2 Posted by marocco2 on 05 Sep, 2016 08:13 PM

    marocco2's Avatar

    Thanks :D

  3. Ilya Finkelshteyn closed this discussion on 25 Aug, 2018 02:08 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac