-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Labels
Description
Using Atlantis 0.10.2 with DevOps
In DevOps when branch protection is enabled for the target branch, the Atlantis status updates are not recognized by DevOps to fulfill the required status checks.
It looks like the status checks are currently being posted to the latest commit of the source branch of the pull request.
{
"count": 2,
"value": [
{
"id": 3117312,
"state": "succeeded",
"description": "1/1 projects planned successfully.",
"context": {
"name": "atlantis/plan",
"genre": "Atlantis Bot"
},
"creationDate": "2019-12-11T05:55:47.03Z",
"createdBy": {
"displayName": "Atlantis Bot",
"url": "https://spsprodcus3.vssps.visualstudio.com/A49a26c68-cf72-446b-b7e3-1d9548e6303b/_apis/Identities/94d969d0-336f-601e-a289-78e66a5f70ed",
"_links": {
"avatar": {
"href": "https://dev.azure.com/mplehmann/_apis/GraphProfile/MemberAvatars/aad.OTRkOTY5ZDAtMzM2Zi03MDFlLWEyODktNzhlNjZhNWY3MGVk"
}
},
"id": "94d969d0-336f-601e-a289-78e66a5f70ed",
"uniqueName": "atlantis-bot@mplehmann.com",
"imageUrl": "https://dev.azure.com/mplehmann/_api/_common/identityImage?id=94d969d0-336f-601e-a289-78e66a5f70ed",
"descriptor": "aad.OTRkOTY5ZDAtMzM2Zi03MDFlLWEyODktNzhlNjZhNWY3MGVk"
}
},
{
"id": 3117304,
"state": "pending",
"description": "Plan in progress...",
"context": {
"name": "atlantis/plan",
"genre": "Atlantis Bot"
},
"creationDate": "2019-12-11T05:51:44.44Z",
"createdBy": {
"displayName": "Atlantis Bot",
"url": "https://spsprodcus3.vssps.visualstudio.com/A49a26c68-cf72-446b-b7e3-1d9548e6303b/_apis/Identities/94d969d0-336f-601e-a289-78e66a5f70ed",
"_links": {
"avatar": {
"href": "https://dev.azure.com/mplehmann/_apis/GraphProfile/MemberAvatars/aad.OTRkOTY5ZDAtMzM2Zi03MDFlLWEyODktNzhlNjZhNWY3MGVk"
}
},
"id": "94d969d0-336f-601e-a289-78e66a5f70ed",
"uniqueName": "atlantis-bot@mplehmann.com",
"imageUrl": "https://dev.azure.com/mplehmann/_api/_common/identityImage?id=94d969d0-336f-601e-a289-78e66a5f70ed",
"descriptor": "aad.OTRkOTY5ZDAtMzM2Zi03MDFlLWEyODktNzhlNjZhNWY3MGVk"
}
}
]
}
In the Branches view, this does show the status information on the branch. However, the pull request doesn't recognize this as fulfilling the branch protection requirements. It looks like the status checks instead need to be posted to the pull request API URL. If I manually post the same status information to the pull request, it does pass the branch protection requirements.
{
"value": [
{
"id": 1,
"state": "succeeded",
"description": "1/1 projects planned successfully.",
"context": {
"name": "atlantis/plan",
"genre": "Atlantis Bot"
},
"creationDate": "2019-12-11T06:30:27.5003658Z",
"updatedDate": "2019-12-11T06:30:27.5003658Z",
"createdBy": {
"displayName": "Michael Lehmann",
"url": "https://spsprodcus3.vssps.visualstudio.com/A49a26c68-cf72-446b-b7e3-1d9548e6303b/_apis/Identities/e6a43a8b-5325-4306-9944-7fd2b4ae168e",
"_links": {
"avatar": {
"href": "https://dev.azure.com/mplehmann/_apis/GraphProfile/MemberAvatars/aad.MzczY2U2ODUtOWEyNS03NzY3LWE3YjQtMWRjODVkNTI1Yzdh"
}
},
"id": "e6a43a8b-5325-4306-9944-7fd2b4ae168e",
"uniqueName": "mplehmann@outlook.com",
"imageUrl": "https://dev.azure.com/mplehmann/_apis/GraphProfile/MemberAvatars/aad.MzczY2U2ODUtOWEyNS03NzY3LWE3YjQtMWRjODVkNTI1Yzdh",
"descriptor": "aad.MzczY2U2ODUtOWEyNS03NzY3LWE3YjQtMWRjODVkNTI1Yzdh"
}
},
{
"id": 2,
"state": "pending",
"description": "apply pending.",
"context": {
"name": "atlantis/apply",
"genre": "Atlantis Bot"
},
"creationDate": "2019-12-11T06:33:43.172303Z",
"updatedDate": "2019-12-11T06:33:43.172303Z",
"createdBy": {
"displayName": "Michael Lehmann",
"url": "https://spsprodcus3.vssps.visualstudio.com/A49a26c68-cf72-446b-b7e3-1d9548e6303b/_apis/Identities/e6a43a8b-5325-4306-9944-7fd2b4ae168e",
"_links": {
"avatar": {
"href": "https://dev.azure.com/mplehmann/_apis/GraphProfile/MemberAvatars/aad.MzczY2U2ODUtOWEyNS03NzY3LWE3YjQtMWRjODVkNTI1Yzdh"
}
},
"id": "e6a43a8b-5325-4306-9944-7fd2b4ae168e",
"uniqueName": "mplehmann@outlook.com",
"imageUrl": "https://dev.azure.com/mplehmann/_apis/GraphProfile/MemberAvatars/aad.MzczY2U2ODUtOWEyNS03NzY3LWE3YjQtMWRjODVkNTI1Yzdh",
"descriptor": "aad.MzczY2U2ODUtOWEyNS03NzY3LWE3YjQtMWRjODVkNTI1Yzdh"
}
}
],
"count": 2
}