I'm currently working on a script that changes some configuration on a build definition. One of these changes is to add a trigger that schedules a build to run every weekday at 2 am.
My approach was to manually add the trigger first and then reproduce it with API calls. The configuration leads to the following in the build definition:
"triggers": [
{
"schedules": [
{
"branchFilters": [
"+$/<removed>"
],
"timeZoneId": "W. Europe Standard Time",
"startHours": 2,
"startMinutes": 0,
"daysToBuild": 31,
"scheduleJobId": "f3bf0e7e-8cde-4d91-8e3d-63bf3e29d256",
"scheduleOnlyWithChanges": true
}
],
"triggerType": "schedule"
}
],
My problem is that when I make this change through the API there are no changes.
I PUT
the edited JSON definition to "${vstsBaseUrl}/build/definitions/${id}?api-version=5.0-preview.4"
(PowerShell script) and still receive a 200 OK, but my change has not been commited.
The revision number also does not increase. But the latest version of the build definition is sent as response.
Updating without a "scheduleJobId"
does not help.
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments