Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Deploying WebSite builds to Azure from VSTS Release Management

I'm kicking the tires on the preview for the Visual Studio Team Services new Release Management system. My scenario is a classic website (ASP.NET 4.5) with a Git repo hosted in VSTS. The build definition is successful as seen here:

enter image description here

It is set up to publish as an artifact that can be picked up by Release Manager as shown here:

enter image description here

On the Release Manager side I have that artifact linked properly as shown here:

enter image description here

And here you can see my environments as well as the associated tasks (all 3 are clones)

enter image description here

When I run the release the build publishes fine, it connects to my subscription but when it attempts to find the package file it has the following error on line 101 of the output log:

"No files were found to deploy with the search pattern 'C:\a\4fe43dd1a***.zip'"

Here is the full output:

enter image description here

This is where I am stuck as I assumed my artifact link via VSTS should resolve this path for me. Obviously I am missing an important piece of the puzzle somewhere, but I've followed the available documentation as best as I can.

If anyone has a solution or can point me in the right direction it would be much appreciated!

--- EDIT ---

I used the file picker to select a web deploy package (see below). I tried using the root website as well as the bin folder. Both attempts results in an error stating: "No files were found to deploy with search pattern 'C:\a\4fe43dd1a\Classic Website Definition\drop\ClassicWebsite\bin'"

enter image description here

--- EDIT 2 ---

I added an MSBuild task to my BUILD process with the following MSBuildArguments

/p:OutDir=$(build.stagingDirectory) /p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsSingleFile=true /p:SkipInvalidConfigurations=true

and in my Copy/Publish Artifacts task I limited my output to only copy .zip files. Now in my RELEASE process when I navigate to find a "Web Deploy Package" the "drop" folder is empty. Here is a screenshot:

enter image description here

I think I'm on the right path, I just need help figuring out to tune my BUILD tasks to generate the right artifacts for my RELEASE process to use. Any help would be appreciated.

like image 383
INNVTV Avatar asked Dec 03 '15 00:12

INNVTV


People also ask

How do you release build on Azure DevOps?

The Azure DevOps project created a release pipeline to manage deployments to Azure. Select the release pipeline, then choose Edit. Under Artifacts, select Drop. The build pipeline you examined in the previous steps produces the output used for the artifact.

What is the difference between Azure pipeline and release?

The Azure DevOps Server provides two different types of pipelines to perform build, deployment, testing and further actions. A Build Pipeline is used to generate Artifacts out of Source Code. A Release Pipeline consumes the Artifacts and conducts follow-up actions within a multi-staging system.

How do you set up a build and release pipeline with Azure DevOps and Azure app services?

Go to Pipeline -> Releases -> New Release Pipeline. Select a template. Choose Azure App Service deployment. Add the build pipeline result that you have created on step B by clicking add on Artifacts.


1 Answers

The deploy package isn't copied to artifacts folder. That's why the release management cannot find the package. Setting "Copy and Publish Build Artifacts" to the following should fix your problem: VSTS Copy and Publish Artifacts drop build step

like image 184
Eddie Chen - MSFT Avatar answered Oct 02 '22 23:10

Eddie Chen - MSFT