Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
badges earned

Your Points Tracker
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How can I remove extraneous files from Azure Web App during deployment?

Using pipe: atlassian/azure-web-apps-deploy:0.2.1 (or newer) is there a way to remove old files from the Azure Web App during deployment? I do not see any option in the pipe to do so.

For example the following currently occurs:

  • Deployment #1 includes a file called "test.txt", deployed to Azure via the Pipe.
  • A subsequent commit removes this file from the repository
  • Deployment #2 does not currently delete this file that is now extraneous from the Azure Web App.

2 answers

2 accepted

0 votes
Answer accepted

Looking at the source this pipe performs the deployment using the kudu zip push deployment for a web app. In a zip push files and directories found in the site that aren’t being overwritten by the deployment will be preserved, such as files deployed via FTP, created in the Functions portal or created by your app during runtime. I would suggest the way to remove files would be to use staging environment and a slot swap as part of deployment. Alternatively you could use the azure cli pipe to clean up/remove or an advanced method might be to try KuduSync.NET

0 votes
Answer accepted

Thanks to David McGhee's answer I was led to this issue regarding the Azure CLI:

It turns out that my described issue was not true. In my case what had actually happened was that the original file I was attempted to delete was deployed using a different mechanism (it was actually originally deployed via a local Git repository). On subsequent attempts to recreate the issue it turns out that:

In short, my issue was a non-issue - I simply deleted the extraneous files from previous deployment mechanisms and now my web app file system is syncing in line with the Bitbucket repo.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Marketplace Apps & Integrations

Staying organized with Jira: best practices for a better project management

Project managers know this problem: A “mountain of work” lays in front of you, and you don’t know how and where to tackle them. Different to-dos lie ahead, but just one task after the other can be ha...

237 views 2 1
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you