I am trying to deploy multiple webjobs in a single release definition on VSTS.
My issue is that files contained in my webjobs can change (add/update/remove). By default, when a new version is deployed by using the task Azure app service deploy
, no existing files are removed from the server. This result in deprecated files inside my webjob staying on my server and causing errors.
In order to fix my issue, I tried to enable the "Remove additional files at destination". But as I have to deploy each webjob in a separate task (Azure app service deploy
supports only a single web package), each consecutive deployment deletes the files of the previously deployed webjob(s).
Any idea on how to solve this easily?
Currently my only guess is to Connect to web app through powershell and delete existing webjob with commandlet Remove-AzureWebsiteJob
.
But my main concern with this is about deleting entire webjob(s) which I presume will also delete their logs and execution history...