0
votes

I have a Visual Studio solution which has various class libraries and several ASP.NET website projects. The website projects reference the class library projects, so for ease of working they need to be in the same solution.

The whole solution is version controlled through Visual Studio Team Services (now Azure DevOps).

When the solution is committed to VSTS, the solution is automatically built by VSTS.

I also want to use continuous integration and deploy the website projects in the solution to various web servers via FTP (FTP is the only option for this, MSDeploy etc is not available). The releases will be triggered by the build on commit.

The problem is that I need to publish the actual website files via FTP during a release triggered by the build, but the build artifact only contains .zip files.

For example, if the solution has a website project called 'MyWebsite' the build artifact has a zip called Mywebsite.zip, but no files are accessible. As such, I can deploy a zip file to the web server, but not the actual website files.

How can I deploy these files?

Furthermore, I don't want to deploy all of the files in the website project. I want to deploy a release version (similar to what is published using Visual Studio 2017's Publish tool), which the zip file seems to contain.

1

1 Answers

0
votes

VSTS/Azure Dev Ops has Tasks built in to Extract Files and FTP Upload. The release pipeline also has a variables which you can access via release tasks and powershell. $(System.DefaultWorkingDirectory) is where artifacts(built code) are downloaded to. An Agent Job with two tasks should be able to accomplish what you are looking for.

Tasks Tasks Details Extract Files Details enter image description here

Azure Dev Ops Release Variables