You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 9, 2021. It is now read-only.
Copy file name to clipboardExpand all lines: README_azurepiplines.md
+14-1Lines changed: 14 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,9 +10,22 @@ Here is how to integrate with Azure Pipelines (VSTS).
10
10
"definition": {
11
11
"id": <build definitionId from url>
12
12
}
13
+
"reason": "pullRequest",
14
+
"sourceBranch": "${PULL_REQUEST_FROM_ID}",
15
+
"sourceVersion": "${PULL_REQUEST_FROM_HASH}",
16
+
"triggerInfo": {
17
+
"url": "${PULL_REQUEST_URL}",
18
+
"user": "${PULL_REQUEST_USER_EMAIL_ADDRESS}",
19
+
"title": "${PULL_REQUEST_TITLE}",
20
+
"version": "${PULL_REQUEST_VERSION}",
21
+
"author": "${PULL_REQUEST_AUTHOR_EMAIL}",
22
+
"reviewers": "${PULL_REQUEST_REVIEWERS_EMAIL}"
23
+
}
13
24
}
14
25
```
15
26
* Encode post content as JSON
16
27
* In **Headers** add "Content-Type" with value "application/json"
17
28
18
-
Additional data can be sent in the post. See [Azure API Docs](https://docs.microsoft.com/en-us/rest/api/azure/devops/build/Builds/Queue?view=azure-devops-rest-5.0) for more info. The build history will state 'Manual build for <ownerofpersonalaccesstoken>' for each build triggered by this method.
29
+
Additional data can be sent in the post. See [Azure API Docs](https://docs.microsoft.com/en-us/rest/api/azure/devops/build/Builds/Queue?view=azure-devops-rest-5.0) for more info. The triggerInfo collection is not shown in the VSTS UI, but is returned in API calls.
30
+
31
+
It's a good idea to use a personal access token from a service principal for authentication. The queued builds will all state that they were triggered by the owner of the token.
0 commit comments