0

I have a web based .Net application whose artifacts are being uploaded to Azure cloud through FTP Upload task. The issue is, it does upload the artifact but it is a zip file. How can I have it unzipped over the target location as there is no option of unzipping in FTP upload task. I do not have the FQDN or IP of the Azure cloud server as it a PaaS based infrastructure, all I have is FTP location.

Mudit
  • 31
  • 1
  • 5

3 Answers3

0

You cannot unzip file on FTP server. No matter what client/library/framework you are using. FTP protocol simply does not allow that.

See also:

Martin Prikryl
  • 188,800
  • 56
  • 490
  • 992
  • But there might be some way by which I can get that file unzipped over that ftp location? – Mudit Jan 10 '19 at 10:56
  • Yes there might be. But not via FTP. Only if you also have some other interface to that server. - See my answer to the *first* question linked in this answer. – Martin Prikryl Jan 10 '19 at 11:15
  • okay thanks.. Actually I do not have the hostname or FQDN, I just have the ftp to that location as it is PaaS based on Azure cloud, so wanted to know workaround around that only. – Mudit Jan 10 '19 at 11:24
  • What does it mean *"I just have the ftp to that location"*? For FTP, you **need a host name**. – Martin Prikryl Jan 10 '19 at 11:29
  • What I meant was that it is a PaaS based infrastructure which is maintained by Microsoft Azure only..We have been provided a FTP location and the credentials to connect to it where we can copy the artifacts..There is one dynamic IP but it can change anytime if Microsoft Azure does any upgrades or performs any security patches, so that is why I just have an option of FTP to transfer the files to that location.. – Mudit Jan 10 '19 at 15:06
  • I still do not understand, what you mean by "FTP location". Maybe an example of that would help us understand. - Though again, if all you have is FTP, you cannot extract ZIP there. – Martin Prikryl Jan 10 '19 at 15:12
0

Based on my understanding, if you want to use Azure DevOPs FTP Upload task you need a FTP server address, username and password.

If it is that case, you could use the Azure logic App FTP(add or modify file) trigger to extract the file.

enter image description here

If it is not working for you and Azure storage is acceptable.

My workaround is that you could use the [Azure File copy] task to copy the file to your azure storage. Then you can control it by yourselves, for example: you could use the Azure function blob trigger to extract the file with you customized code.

Tom Sun - MSFT
  • 24,161
  • 3
  • 30
  • 47
0

The question is quite vague, but it sound like you might be trying to upload to an Azure WebApp which has FTP and also zip deploy functionality that uses the Kudu interface.

https://learn.microsoft.com/en-us/cli/azure/webapp/deployment/source?view=azure-cli-latest#az-webapp-deployment-source-config-zip

Using this Azure CLI command it will push your zip and deploy/unpack it into the WebApp for you.

PS. It's impossible to FTP without a DNS name or IP so you will have one of them in specified in the FTP location you've been given

Bevan
  • 1,305
  • 1
  • 11
  • 17