Skip to content

Commit 1cfcf9d

Browse files
committed
Added servername input (#3706)
1 parent 87c0a83 commit 1cfcf9d

File tree

4 files changed

+26
-5
lines changed

4 files changed

+26
-5
lines changed

Tasks/SqlDacpacDeploymentOnMachineGroup/Main.ps1

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ $dacpacFile = Get-VstsInput -Name "dacpacFile"
4747
$sqlFile = Get-VstsInput -Name "sqlFile"
4848
$inlineSql = Get-VstsInput -Name "inlineSql"
4949
$targetMethod = Get-VstsInput -Name "targetMethod"
50+
$serverName = Get-VstsInput -Name "serverName" -Require
5051
$databaseName = Get-VstsInput -Name "databaseName" -Require
5152
$authscheme = Get-VstsInput -Name "authscheme" -Require
5253
$sqlUsername = Get-VstsInput -Name "sqlUsername"
@@ -60,7 +61,7 @@ Import-Module $PSScriptRoot\ps_modules\TaskModuleSqlUtility
6061

6162
Try
6263
{
63-
$serverName = "localhost"
64+
6465
if ($taskType -ne "dacpac")
6566
{
6667
$additionalArguments = $additionalArgumentsSql

Tasks/SqlDacpacDeploymentOnMachineGroup/Strings/resources.resjson/en-US/resources.resjson

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
"loc.input.help.InlineSql": "Sql Queries inline",
1414
"loc.input.label.TargetMethod": "Specify SQL Using",
1515
"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.",
16+
"loc.input.label.ServerName": "Server Name",
17+
"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.",
1618
"loc.input.label.DatabaseName": "Database Name",
1719
"loc.input.help.DatabaseName": "Provide the name of the SQL Server database.",
1820
"loc.input.label.AuthScheme": "Authentication",

Tasks/SqlDacpacDeploymentOnMachineGroup/task.json

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
"author": "Microsoft Corporation",
1515
"version": {
1616
"Major": 0,
17-
"Minor": 2,
18-
"Patch": 2
17+
"Minor": 3,
18+
"Patch": 0
1919
},
2020
"demands": [],
2121
"minimumAgentVersion": "1.102.0",
@@ -79,6 +79,15 @@
7979
},
8080
"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."
8181
},
82+
{
83+
"name": "ServerName",
84+
"type": "string",
85+
"label": "Server Name",
86+
"required": true,
87+
"defaultValue": "localhost",
88+
"visibleRule": "TargetMethod = server || TaskType = sqlQuery || TaskType = sqlInline",
89+
"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."
90+
},
8291
{
8392
"name": "DatabaseName",
8493
"type": "string",

Tasks/SqlDacpacDeploymentOnMachineGroup/task.loc.json

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
"author": "Microsoft Corporation",
1515
"version": {
1616
"Major": 0,
17-
"Minor": 2,
18-
"Patch": 2
17+
"Minor": 3,
18+
"Patch": 0
1919
},
2020
"demands": [],
2121
"minimumAgentVersion": "1.102.0",
@@ -79,6 +79,15 @@
7979
},
8080
"helpMarkDown": "ms-resource:loc.input.help.TargetMethod"
8181
},
82+
{
83+
"name": "ServerName",
84+
"type": "string",
85+
"label": "ms-resource:loc.input.label.ServerName",
86+
"required": true,
87+
"defaultValue": "localhost",
88+
"visibleRule": "TargetMethod = server || TaskType = sqlQuery || TaskType = sqlInline",
89+
"helpMarkDown": "ms-resource:loc.input.help.ServerName"
90+
},
8291
{
8392
"name": "DatabaseName",
8493
"type": "string",

0 commit comments

Comments
 (0)