0
votes

I've created a pipeline and release in azure devops, but before i perform a swap of the slots i need to copy files from 'production' slot to my 'staging' slot. This is because our customer uploads file to the webapp itself (at least for now).

I've been doing some research and i dont think this is possible with a task in azure devops. I think its possible using powershell though.

Have anyone done this before?

1

1 Answers

1
votes

This won't be possible out of the box. But you can do this over FTP. Here you have an example how to configure FTP access to you web app. And it would be the same for slot. So what you need is:

  • configure FTP access on your production slot
  • configure FTP access on your slot
  • copy files from production slot - here unfortunately there is no out of the box task to do this, so you need to use powershell like here
  • upload task to your slot using FTP Upload task

It would getting worse a bit if your slot is not long lived and you create it automatically. I'm not 100% sure, but it came to my mind that actually credential for you production slot may work also for other slots. So then you can skip second bullet and it should not be an issue with dynamically created slots.

Example powershell task: enter image description here