VSTS use API to set build parameters at queue time

前端 未结 1 1595
刺人心
刺人心 2020-12-11 08:40

I need to queue a VSTS build from the REST API Documented at https://docs.microsoft.com/en-us/rest/api/vsts/build/builds/queue?view=vsts-rest-4.1

This answer helped

1条回答
  •  时光说笑
    2020-12-11 09:05

    Using the Chrome Developer tools to capture the payload of a Queue action in the web UI, I'd hazard a guess the format you're looking for is:

    POST https://dev.azure.com/jessehouwing/6484ebc3-af16-4af9-aa66-6b3398db7214/_apis/build/builds
    {
    "queue": {
        "id": 27
    },
    "definition": {
        "id": 53
    },
    "project": {
        "id": "6484ebc3-af16-4af9-aa66-6b3398db7214"
    },
    "sourceBranch": "refs/heads/master",
    "reason": 1,
    "demands": [],
    "parameters": "{\"system.debug\":\"true\",\"DefinedVariable\":\"Override Value\"}"
    

    }

    0 讨论(0)
提交回复
热议问题