I am using a BitBucket Pipeline for the continuous integration of an Azure Web App, and for the most part, it works perfectly. I have been deploying directly into a staging slot, which I will then swap into a production slot once it's all been user tested. However, I've noticed that whenever I perform a slot swap on Azure, the next pipeline build will fail when trying to push the git repo to Azure. The error message I receive is:
bitbucket [remote rejected] master -> master "unable to migrate objects to permanent storage"
I have a feeling this is due to the Azure Web App repo becoming out of sync with the BitBucket repo, because if I perform a manual push from my local repo to the Azure repo, the pipeline starts working correctly again.
Has anyone else encountered this issue, or know of a possible solution to this? In the meantime, I'm just going to abandon swapping slots, and push it to the production slot manually, but it would be handy to know what's causing this problem!