modules/teamcityExtensions/MetaRunners/PSCI_InvokeSql.xml
<?xml version="1.0" encoding="UTF-8"?>
<meta-runner name="PSCI: Invoke SQL"> <description>Invoke SQL command at specified SQL Server database</description> <settings> <parameters> <param name="sqlRun.databaseServer" value="" spec="text description='Name of database server' validationMode='not_empty' label='Database Server' display='normal'" /> <param name="sqlRun.databaseName" value="" spec="text description='Name of database' validationMode='any' label='Database Name' display='normal'" /> <param name="sqlRun.integratedSecurity" value="$false" spec="checkbox checkedValue='$true' description='Check for Windows Authentication, uncheck for SQL Server Authentication' uncheckedValue='$false' label='Integrated Security' display='normal'" /> <param name="sqlRun.username" value="" spec="text description='Username - leave empty for agent service credentials' validationMode='any' label='Username' display='normal'" /> <param name="sqlRun.password" value="" spec="password description='Password - leave empty for agent service credentials' label='Password' display='normal'" /> <param name="sqlRun.query" value="" spec="text description='SQL query to run' validationMode='any' label='SQL query' display='normal'" /> <param name="sqlRun.file" value="" spec="text description='Filename containing SQL query to run' validationMode='any' label='SQL file to run' display='normal'" /> <param name="sqlRun.timeout" value="" spec="text description='Query timeout in seconds (default 120)' validationMode='any' label='Query timeout' display='normal'" /> </parameters> <build-runners> <runner name="Run SQL" type="jetbrains_powershell"> <parameters> <param name="jetbrains_powershell_bitness" value="x64" /> <param name="jetbrains_powershell_errorToError" value="false" /> <param name="jetbrains_powershell_execution" value="PS1" /> <param name="jetbrains_powershell_script_code"><![CDATA[. c:\PSCI\Boot\PSCI.boot.ps1 try { $params = @{ 'DatabaseServer' = '%sqlRun.databaseServer%'; 'DatabaseName' = '%sqlRun.databaseName%'; 'Query' = @' %sqlRun.query% '@; 'InputFile' = '%sqlRun.file%'; 'IntegratedSecurity' = %sqlRun.integratedSecurity%; 'Username' = '%sqlRun.username%'; 'Password' = '%sqlRun.password%'; 'QueryTimeoutInSeconds' = '%sqlRun.timeout%'; 'Mode' = 'sqlcmd' } Write-Host 'inputfile: %sqlRun.file%' [void](Invoke-SqlMetaRunner @params) } catch { Write-ErrorRecord }]]></param> <param name="jetbrains_powershell_script_mode" value="CODE" /> <param name="teamcity.step.mode" value="default" /> </parameters> </runner> </build-runners> <requirements /> </settings> </meta-runner> |