question

KUMARAbhishek-2110 avatar image
0 Votes"
KUMARAbhishek-2110 asked KUMARAbhishek-2110 commented

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

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

https://docs.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
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

MartinJaffer-MSFT avatar image
0 Votes"
MartinJaffer-MSFT answered KUMARAbhishek-2110 commented

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.

· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@KUMARAbhishek-2110 Did this help?

We have not received a response from you. Are you still facing the issue? If you found a solution, would you please share it here with the community? Otherwise, let us know and we will continue to engage with you on the issue.

Thanks
Martin Jaffer
Please do consider to click on "Accept Answer" and "Up-vote" on the post that helps you, as it can be beneficial to other community members

1 Vote 1 ·

@majaffer


Issue is resolved now. thanks for the response.


1 Vote 1 ·