2

I have a CI/CD pipeline in place to deploy notebooks from dev to production in an Azure databricks workspace.

However, it is not deleting the notebooks from production, when those notebooks have been removed from development and are no longer in Azure git repository.

I want to delete all notebooks which have been removed from source, as a part of build/release process. Is there a way to achieve this?

user961
  • 453
  • 6
  • 20
  • The "Repos" feature (former "Projects" feature) will solve this problem for you... https://docs.databricks.com/repos.html It's right now in private preview, but should be public in near time frame. For example, it's easy to do CI/CD with it: https://github.com/alexott/databricks-nutter-projects-demo – Alex Ott Mar 05 '21 at 17:36

1 Answers1

2

The easiest way is when there are new commits in Azure DevOps git repository, you could redeploy the notebooks by checked the Clean Workspace Folderoption:

enter image description here

Otherwise, you could add a powershell script task to compare files in two folders. The follow case may give you a start: Comparing folders and content with PowerShell

Cece Dong - MSFT
  • 29,631
  • 1
  • 24
  • 39