/
task.json
122 lines (122 loc) · 5.74 KB
/
task.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
{
"id": "6FEC3938-DF52-4C01-9F5A-8ED5F66C377E",
"name": "MysqlDeploymentOnMachineGroup",
"friendlyName": "MySQL database deploy",
"description": "Run scripts and make changes to a MySQL Database",
"helpUrl": "https://docs.microsoft.com/azure/devops/pipelines/tasks",
"helpMarkDown": "[Learn more about this task](https://aka.ms/mysql-deployment-on-machine-group)",
"category": "Deploy",
"visibility": [
"Release"
],
"runsOn": [
"Agent",
"DeploymentGroup"
],
"author": "Microsoft Corporation",
"version": {
"Major": 1,
"Minor": 156,
"Patch": 1
},
"demands": [],
"minimumAgentVersion": "1.100.0",
"groups": [],
"inputs": [
{
"name": "TaskNameSelector",
"type": "pickList",
"label": "Deploy MySql Using",
"required": false,
"helpMarkDown": "Select one of the options between Script File & Inline Script.",
"defaultValue": "SqlTaskFile",
"options": {
"SqlTaskFile": "MySQL Script File",
"InlineSqlTask": "Inline MySQL Script"
}
},
{
"name": "SqlFile",
"type": "filePath",
"label": "MySQL Script",
"required": true,
"defaultValue": "",
"helpMarkDown": "Full path of the script file on the automation agent or on a UNC path accessible to the automation agent like, \\\\\\\\BudgetIT\\DeployBuilds\\script.sql. Also, predefined system variables like, $(agent.releaseDirectory) can also be used here. A file containing SQL statements can be used here.",
"visibleRule": "TaskNameSelector = SqlTaskFile"
},
{
"name": "SqlInline",
"type": "multiLine",
"label": "Inline MySQL Script",
"required": true,
"defaultValue": "",
"helpMarkDown": "Enter the MySQL script to execute on the Database selected above.",
"visibleRule": "TaskNameSelector = InlineSqlTask",
"properties": {
"resizable": "true",
"rows": "10"
}
},
{
"name": "ServerName",
"type": "string",
"label": "Host Name",
"required": true,
"defaultValue": "localhost",
"helpMarkDown": "Server name of 'Database for MySQL'.Example: localhost. When you connect using MySQL Workbench, this is the same value that is used for 'Hostname' in 'Parameters'"
},
{
"name": "DatabaseName",
"type": "string",
"label": "Database Name",
"required": false,
"defaultValue": "",
"helpMarkDown": "The name of database, if you already have one, on which the below script is needed to be run, else the script itself can be used to create the database."
},
{
"name": "SqlUsername",
"type": "string",
"label": "Mysql User Name",
"required": true,
"defaultValue": "",
"helpMarkDown": "When you connect using MySQL Workbench, this is the same value that is used for 'Username' in 'Parameters'."
},
{
"name": "SqlPassword",
"type": "string",
"label": "Password",
"required": true,
"defaultValue": "",
"helpMarkDown": "Password for MySQL Database.<br>It can be variable defined in the pipeline. Example : $(password).<br>Also, you may mark the variable type as 'secret' to secure it."
},
{
"name": "SqlAdditionalArguments",
"type": "string",
"label": "Additional Arguments",
"required": false,
"defaultValue": "",
"helpMarkDown": "Additional options supported by MySQL simple SQL shell. These options will be applied when executing the given file on the Database for MySQL.<br>Example: You can change to default tab separated output format to HTML or even XML format. Or if you have problems due to insufficient memory for large result sets, use the --quick option."
}
],
"instanceNameFormat": "Deploy Using : $(TaskNameSelector)",
"execution": {
"Node": {
"target": "mysqldeploy.js"
}
},
"messages": {
"ARGD_ConstructorFailed": "The task failed while initializing. Error: %s .",
"MysqlServerNameCannotBeEmpty": "The MySQL server name cannot be null.",
"NotAbleToGetInstalledLocationOfMysqlFromPath": "The MySQL client is missing on the agent machine.",
"UnableToFindMysqlFromRegistryOnMachineError": "Unable to find MySQL using the registry on the machine.",
"UnableToFindMysqlFromRegistry": "Unable to find MySQL using the registry. Error: %s .",
"UnableToFindTheLocationOfMysqlFromRegistryOnMachineError": "Unable to find the location of MySQL using the registry on the machine. Error: %s .",
"MysqlTaskParameterCannotBeEmpty": "The MySQL task parameter cannot be null.",
"ToolPathCannotBeNull": "Tool path cannot be null.",
"SqlExecutionException": "A SQL execution exception occurred. Please check the SQL script. Error: %s .",
"CallbackCannotBeNull": "The callback cannot be null.",
"UnableToCreateDatabaseException": "Unable to create database.",
"WindowMysqlClientMissingError": "MySQL client is missing on the Windows agent machine. Please install it by running the MySQL client installer 'https://aka.ms/window-mysqlcli-installer' script file on the agent machine.",
"LinuxMysqlClientMissingError": "MySQL client is missing on the Linux agent machine. Please install it by running 'sudo apt-get install mysql-client'."
}
}