You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
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!
Maybe instead of pushing an entire git repo to the azure app service, why not use an executable like Jar to run your app. An extra web. config is needed to instruct the app service to run the executable. and both the slots will have both files and maybe we won't have this out-of-sync problem.
Whenever a new executable with a different name is deployed, azure stores the old jar along with new ones. We can also automatically rename the executable and change it on the web. config through pipelines, using Linux sed command and deploy both renamed executable and modified web. config. This enables the auto app restarts after deployment without manual intervention.