Why we delete deployment in continuous integration & deployment in data factory release pipeline?

KUMAR Abhishek 51 Reputation points
2020-06-11T10:53:38.18+00:00

while deploying in other environment like staging env data factory, there is script mentioned in microsoft documentation:

https://learn.microsoft.com/en-us/azure/data-factory/continuous-integration-deployment#script

this will auto stop all triggers in pre stage and in post stage it should activate all triggers but it is deleting all the resources and the result is there is nothing left in staging data factory.

is there any explanation why we deleting all the resources in this powershell script ?

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
9,534 questions
0 comments No comments
{count} votes

Accepted answer
  1. MartinJaffer-MSFT 26,021 Reputation points
    2020-06-12T05:33:46.773+00:00

    The actual deployment only creates / updates resources. It does not delete resources.

    That is why the delete deployment section is in the script. This section iterates through the extant resources, looking for those whose name does not exist in the deployment template. These it deletes.

    If you would like to disable this feature, call the script with -deleteDeployment $false.

    The fact that everything is being deleted, suggests the script was unable to read the resources. This could happen if the wrong file was passed to the script.

    I tried running the script without passing any arguments. I saw that it continued to try to execute even when it was unable to read the (missing) arm template file. I will suggest a change to the developer on how to make it safer.


0 additional answers

Sort by: Most helpful