Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollback task - Change api version in use and handle redeploy scenarios #42

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Utilites/Rollback/Runpowershellwithtaskcontext.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Write-Verbose -Verbose "inlineScripe = $script"
import-module "Microsoft.TeamFoundation.DistributedTask.Task.Common"

# Construct the REST URL to obtain Build ID
$releasequeryuri = "$($env:SYSTEM_TEAMFOUNDATIONSERVERURI)$($env:SYSTEM_TEAMPROJECT)/_apis/release/releases/$($env:Release_ReleaseId)/environments/$($env:RELEASE_ENVIRONMENTURI.Split('/')[-1])/tasks?api-version=2.1-preview.1"
$releasequeryuri = "$($env:SYSTEM_TEAMFOUNDATIONSERVERURI)$($env:SYSTEM_TEAMPROJECT)/_apis/release/releases/$($env:Release_ReleaseId)/environments/$($env:RELEASE_ENVIRONMENTURI.Split('/')[-1])/tasks?attemptId=$($env:Release_AttemptNumber)&api-version=2.2-preview.1"
$taskexecutioninfo = @{}
$releasequeryresult = $null
$personalAccessToken = $null
Expand Down Expand Up @@ -123,4 +123,4 @@ if($type -eq "FilePath")
}
}

Write-Verbose -Verbose "Exitting script runpowershellwithtaskcontext"
Write-Verbose -Verbose "Exitting script runpowershellwithtaskcontext"
2 changes: 1 addition & 1 deletion Utilites/Rollback/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"version": {
"Major": 1,
"Minor": 1,
"Patch": 2
"Patch": 3
},
"minimumAgentVersion": "1.95.0",
"groups": [
Expand Down