Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

BitBucket Pipeline failing after Azure slot swap

Deleted user Jan 29, 2018

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! 

4 answers

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.

Anyone work out a solution to this? I have a similar setup but when you swap slots and push it fails.  The only way I could work out was to disconnect and reconnect again. 

We're having the same problem. Were you able to fix this?

Maybe you can try a force push in your deployment script.

git push  -f https://$AZURE_LOGIN:$AZURE_PASSWORD@{APP_NAME}{APP_NAME}.git

tried -f on our instance, same error. FYI this occurs even on slots that aren't being swapped. And pushing locally always works.

Suggest an answer

Log in or Sign up to answer

Atlassian Community Events