azurecontinuous-integrationdatabricksazure-pipelines-release-pipelinespark-notebook

Azure databricks CI CD pipeline to delete notebooks on production


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?


Solution

  • 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