Skip to content

Commit

Permalink
using Get-VstsTaskVariable to override application parameters (#8003)
Browse files Browse the repository at this point in the history
* using Get-VstsTaskVariable to override params

* bumping up the task version
  • Loading branch information
dikhakha authored Aug 10, 2018
1 parent 7475bb9 commit 64b9992
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Tasks/ServiceFabricDeployV1/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"version": {
"Major": 1,
"Minor": 7,
"Patch": 21
"Patch": 22
},
"demands": [
"Cmd"
Expand Down
2 changes: 1 addition & 1 deletion Tasks/ServiceFabricDeployV1/task.loc.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"version": {
"Major": 1,
"Minor": 7,
"Patch": 21
"Patch": 22
},
"demands": [
"Cmd"
Expand Down
4 changes: 2 additions & 2 deletions Tasks/ServiceFabricDeployV1/utilities.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,8 @@ function Get-OverridenApplicationParameters
$applicationManifestXml = [Xml] (Get-Content -LiteralPath $ApplicationManifestPath)
foreach ($param in $applicationManifestXml.ApplicationManifest.Parameters.Parameter)
{
$paramName = $param.Name -replace "\.", '_' -replace " ", '_'
$paramValue = (Get-Item env:$paramName -ErrorAction Ignore).Value
$paramName = $param.Name
$paramValue = Get-VstsTaskVariable -Name $paramName -ErrorAction Ignore
if ($paramValue)
{
$overrideParameters.Add($paramName, $paramValue)
Expand Down

0 comments on commit 64b9992

Please sign in to comment.