openalm / Extension-UtilitiesPack

Release Management utility tasks
Other
34 stars 38 forks source link

Rollback Redeploy status not updating #37

Closed petr-stupka closed 7 years ago

petr-stupka commented 8 years ago

Rollback status is not taking the right status on redeploy on specific environment. It always take the task statuses from the first Deploy attempt. The issue is Rollback task is not using the latest "Redeploy attempt" number from the release.

My idea is to adjust Api Uri to point to Release instead of Task:

$releasequeryuri = "$($env:SYSTEM_TEAMFOUNDATIONSERVERURI)$($env:SYSTEM_TEAMPROJECT)/_apis/release/releases/$($env:Release_ReleaseId)/environments/$($env:RELEASE_ENVIRONMENTURI.Split('/')[-1])?api-version=2.1-preview.1"

And select latest attempt number from which to get status on tasks:

$tasks = $releasequeryresult.deploySteps | Sort-Object attempt -Descending | select -First 1
$jobtasks = $tasks.tasks | Sort-Object dateStarted
harshil93 commented 7 years ago

@shashban Can we close this ? or something else has to done here ?

petr-stupka commented 7 years ago

i believe this has been solved