mmajcica / DeploySsrs

Build-Release task for VSTS/TFS that manages Microsoft's SQL Server Reporting Services
MIT License
21 stars 21 forks source link

Clean folders on deploy #46

Closed donalfenwick closed 4 years ago

donalfenwick commented 4 years ago

This change adds a configuration property named CleanExistingItems to the folder object. If this is set to true for a particular folder in the config file the task will remove all items in the folder with the exception of sub folders. This makes it easier to keep SSRS in sync with whats in source control if RDL's are being removed or renamed during development.

Addresses issue #37

donalfenwick commented 4 years ago

I'm not against what you are trying to add, I will be happy to merge this and deploy it, however, let's make sure it is well documented (add a word about it in the readme.md) and that it is not a breaking change. Thanks

Thanks @mmajcica. I've amended the config examples and readme.md file as requested. Let me know if the changes are OK.

Also, in regard to breaking changes. After this change, the task will only clean items from the SSRS server if explicitly configured to do so. Without setting the CleanExistingItems in the config it should behave exactly as is at the moment.

Thanks

mmajcica commented 4 years ago

@donalfenwick another question, if the cleanup is set, does it also take in consideration the subfolder to the folder it has nested, or it does only cleanup items in that folder? I think this is important to be specified in the readme file also.

donalfenwick commented 4 years ago

@donalfenwick another question, if the cleanup is set, does it also take in consideration the subfolder to the folder it has nested, or it does only cleanup items in that folder? I think this is important to be specified in the readme file also.

No it just removes the files and ignores sub directories. I've added a note to the readme to document this.

mmajcica commented 4 years ago

I'm not in the front of my pc right now, but if I do publish this in one of my organisations and grant you the necessary rights, would you be able to run a test or two?

On Tue, 28 Apr 2020, 20:28 Donal Fenwick, notifications@github.com wrote:

@donalfenwick commented on this pull request.

In task/task.ps1 https://github.com/mmajcica/DeploySsrs/pull/46#discussion_r416831862:

@@ -44,7 +44,7 @@ try { throw "Provided configuration file path $ssrsFilePath is not valid." }

  • Clear-SsrsFolderItems -Folder $folder -Proxy $proxy

Updated to do the clean within the publish folder cmdlet

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/mmajcica/DeploySsrs/pull/46#discussion_r416831862, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAXC4523QF3R6STPJUGPAK3RO4N4NANCNFSM4MRG2QFQ .

donalfenwick commented 4 years ago

Sure, no problem. I can check it once its been published.

mmajcica commented 4 years ago

Can you send me an MSA account that I can add in my AzDO test org via this form http://blog.majcica.com/contact/? Then we can continue in private via email.

Thanks

On Tue, 28 Apr 2020, 20:50 Donal Fenwick, notifications@github.com wrote:

Sure, no problem. I can check it once its been published.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/mmajcica/DeploySsrs/pull/46#issuecomment-620790188, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAXC456AXR6NLXRJFYPLCBTRO4QNZANCNFSM4MRG2QFQ .

donalfenwick commented 4 years ago

Sent

mmajcica commented 4 years ago

@donalfenwick one last thing, can you bump the task version manually (revision to +1)?