Skip to content

Commit

Permalink
Added servername input (#3706)
Browse files Browse the repository at this point in the history
  • Loading branch information
mvvsubbu committed Mar 2, 2017
1 parent 87c0a83 commit 1cfcf9d
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 5 deletions.
3 changes: 2 additions & 1 deletion Tasks/SqlDacpacDeploymentOnMachineGroup/Main.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ $dacpacFile = Get-VstsInput -Name "dacpacFile"
$sqlFile = Get-VstsInput -Name "sqlFile"
$inlineSql = Get-VstsInput -Name "inlineSql"
$targetMethod = Get-VstsInput -Name "targetMethod"
$serverName = Get-VstsInput -Name "serverName" -Require
$databaseName = Get-VstsInput -Name "databaseName" -Require
$authscheme = Get-VstsInput -Name "authscheme" -Require
$sqlUsername = Get-VstsInput -Name "sqlUsername"
Expand All @@ -60,7 +61,7 @@ Import-Module $PSScriptRoot\ps_modules\TaskModuleSqlUtility

Try
{
$serverName = "localhost"

if ($taskType -ne "dacpac")
{
$additionalArguments = $additionalArgumentsSql
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
"loc.input.help.InlineSql": "Sql Queries inline",
"loc.input.label.TargetMethod": "Specify SQL Using",
"loc.input.help.TargetMethod": "Specify the option to connect to the target SQL Server Database. The options are either to provide the SQL Server Database details, or the SQL Server connection string, or the Publish profile XML file.",
"loc.input.label.ServerName": "Server Name",
"loc.input.help.ServerName": "Provide the SQL Server name like, machinename\\FabriakmSQL,1433 or localhost or .\\SQL2012R2. Specifying localhost will connect to the Default SQL Server instance on the machine.",
"loc.input.label.DatabaseName": "Database Name",
"loc.input.help.DatabaseName": "Provide the name of the SQL Server database.",
"loc.input.label.AuthScheme": "Authentication",
Expand Down
13 changes: 11 additions & 2 deletions Tasks/SqlDacpacDeploymentOnMachineGroup/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
"author": "Microsoft Corporation",
"version": {
"Major": 0,
"Minor": 2,
"Patch": 2
"Minor": 3,
"Patch": 0
},
"demands": [],
"minimumAgentVersion": "1.102.0",
Expand Down Expand Up @@ -79,6 +79,15 @@
},
"helpMarkDown": "Specify the option to connect to the target SQL Server Database. The options are either to provide the SQL Server Database details, or the SQL Server connection string, or the Publish profile XML file."
},
{
"name": "ServerName",
"type": "string",
"label": "Server Name",
"required": true,
"defaultValue": "localhost",
"visibleRule": "TargetMethod = server || TaskType = sqlQuery || TaskType = sqlInline",
"helpMarkDown": "Provide the SQL Server name like, machinename\\FabriakmSQL,1433 or localhost or .\\SQL2012R2. Specifying localhost will connect to the Default SQL Server instance on the machine."
},
{
"name": "DatabaseName",
"type": "string",
Expand Down
13 changes: 11 additions & 2 deletions Tasks/SqlDacpacDeploymentOnMachineGroup/task.loc.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
"author": "Microsoft Corporation",
"version": {
"Major": 0,
"Minor": 2,
"Patch": 2
"Minor": 3,
"Patch": 0
},
"demands": [],
"minimumAgentVersion": "1.102.0",
Expand Down Expand Up @@ -79,6 +79,15 @@
},
"helpMarkDown": "ms-resource:loc.input.help.TargetMethod"
},
{
"name": "ServerName",
"type": "string",
"label": "ms-resource:loc.input.label.ServerName",
"required": true,
"defaultValue": "localhost",
"visibleRule": "TargetMethod = server || TaskType = sqlQuery || TaskType = sqlInline",
"helpMarkDown": "ms-resource:loc.input.help.ServerName"
},
{
"name": "DatabaseName",
"type": "string",
Expand Down

0 comments on commit 1cfcf9d

Please sign in to comment.