简体   繁体   中英

Azure: How do I disable the deployment an just create a package file?

We have a couple of cloud services and do a Continuous Delivery to a test environment via Team Build. For the production environment, we have our own deployment powershell script. This script needs a .cspkg file for deployment.

My problem is now that I haven't found a way to let team build just create a .cspkg file but not to publish it to Azure. I've used the AzureContinousDeployment.11.xaml template and it insists on publishing the package. I've tried to set the "Deployment Settings Name" to an empty string. The build runs without errors, but that way, no package is created.

Is there a way to stop it somewhere in between? Maybe something I could change in the .azurePubxml file to achieve that?

Environment: VS2012, Team Foundation Service (visualstudio.com)...

On the Process tab of the edit definition:

If you clear out the Deployment Settings Name and all the values under Publishing - Azure Cloud Service and Publishing - Azure Website (except you can leave True for the Allow Upgrade) the building template won't know where to publish the project.

Also on the Build Defaults tab of the edit definition:

Select the "Copy build output to the following Source Control folder (this folder will be created if it does not exist):" Add some name and path like: "$/your cloud service/drops"

That will cause all your builds to be moved to the drops folder after a successful build. In those drops folders, there will be a app.publish directory that will have your *.cspkg and *csfg files.

I have my custom build template xaml invoke the MSBuild task (Microsoft.TeamFoundation.Build.Workflow.Activities.MSBuild) on the Azure project (.ccproj file) with the "Publish" target.

(Despite having the same name as the UI command that pushes the package to Azure, the "Publish" target just means "generate the package without pushing it anywhere".)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM