Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding functionality to ignore SQL Server version check #33

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.vsix
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ param(
[string]$WsPassword,
[string]$UseVerbose,
[string]$OverrideExisting,
[string]$AddResourceExtension
[string]$AddResourceExtension,
[string]$IgnoreSQLVersion
)
function Verbose-WriteLine{
[cmdletbinding()]
Expand Down Expand Up @@ -50,6 +51,7 @@ param(
Verbose-WriteLine "Using following parameters:"
Verbose-WriteLine "ReportFiles: $ReportFiles";
Verbose-WriteLine "Upload path: $ReportUploadRootPath";
Verbose-WriteLine "Ignore SQL Version: $IgnoreSQLVersion";

Verbose-WriteLine "IncludeDataSource: $IncludeDataSource";
Verbose-WriteLine "DataSourcePath: $DataSourcePath";
Expand Down Expand Up @@ -336,9 +338,15 @@ param(


}catch [System.Exception]{
Write-Error $_.Exception.Message;
#Terminate script
exit -1;
if($_.Exception.Message -Match "The definition of this report is not valid or supported by this version of Reporting Services." -and $IgnoreSQLVersion -and $IgnoreSQLVersion -eq $true){
Write-Host $_.Exception.Message;
Write-Host "Ignore SQL Version errors is enabled, continuing...";
}
else {
Write-Error $_.Exception.Message;
#Terminate script
exit -1;
}
}

}
Expand Down
13 changes: 11 additions & 2 deletions SqlReportingServices/SqlReportingServicesDeployment/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
"demands": [],
"version": {
"Major": "1",
"Minor": "4",
"Patch": "3"
"Minor": "5",
"Patch": "5"
},
"minimumAgentVersion": "1.95.0",
"instanceNameFormat": "Deploy SQL Server reporting files",
Expand Down Expand Up @@ -228,6 +228,15 @@
"defaultValue": false,
"groupName": "advanced",
"helpMarkDown": "Enable or disable verbose logging"
},
{
"name": "IgnoreSQLVersion",
"type": "boolean",
"label": "Ignore SQL Version",
"required": false,
"defaultValue": false,
"groupName": "advanced",
"helpMarkDown": "Ignore SQL Version mismatch between Server and Reports"
}

],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ param(
[string]$WsPassword,
[string]$UseVerbose,
[string]$OverrideExisting,
[string]$AddResourceExtension
[string]$AddResourceExtension,
[string]$IgnoreSQLVersion
)
function Verbose-WriteLine{
[cmdletbinding()]
Expand Down Expand Up @@ -40,6 +41,7 @@ Add-Type -Path .\DirectoryHelpers.cs -ErrorAction SilentlyContinue; #Errors can
Verbose-WriteLine "Remote root path: $RemoteRootPath";
Verbose-WriteLine "Local root path: $LocalRootPath";
Verbose-WriteLine "Attempt to update the datasource path: $UpdateDataSourceToRemote";
Verbose-WriteLine "Ignore SQL Version: $IgnoreSQLVersion";

$hasWsPassword = "N/A";
if([System.String]::IsNullOrWhiteSpace($WsPassword) -eq $false){ #Check if the Webservice HAS a password and mark it with some stars
Expand Down Expand Up @@ -316,9 +318,15 @@ $reports | ForEach-Object{
}
}
}catch [System.Exception]{
Write-Error $_.Exception.Message;
#Terminate script
exit -1;
if($_.Exception.Message -Match "The definition of this report is not valid or supported by this version of Reporting Services." -and $IgnoreSQLVersion -and $IgnoreSQLVersion -eq $true){
Write-Host $_.Exception.Message;
Write-Host "Ignore SQL Version errors is enabled, continuing...";
}
else {
Write-Error $_.Exception.Message;
#Terminate script
exit -1;
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
"demands": [],
"version": {
"Major": "1",
"Minor": "0",
"Patch": "4"
"Minor": "5",
"Patch": "5"
},
"minimumAgentVersion": "1.95.0",
"instanceNameFormat": "Deploy SQL Server reporting folder structure",
Expand Down Expand Up @@ -124,6 +124,15 @@
"defaultValue": false,
"groupName": "advanced",
"helpMarkDown": "Enable or disable verbose logging"
},
{
"name": "IgnoreSQLVersion",
"type": "boolean",
"label": "Ignore SQL Version",
"required": false,
"defaultValue": false,
"groupName": "advanced",
"helpMarkDown": "Ignore SQL Version mismatch between Server and Reports"
}

],
Expand Down
2 changes: 1 addition & 1 deletion SqlReportingServices/vss-extension.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"manifestVersion": 1,
"id": "SqlReportngServices",
"name": "SQL Server Reporting Services Deployment",
"version": "1.5.3",
"version": "1.5.5",
"publisher": "tobania",
"targets": [
{
Expand Down