Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I achieved this by customizing our build process template. Make a copy of your DefaultTemplate.xaml (DefaultTemplateV2.xaml for example) and open it. </p> <p>If you're new to working in the workflow xaml editor I find it helps to collapse all first.</p> <p>Once it's open, click on the root Sequence and click Arguments. Add three arguments:</p> <ol> <li>DeployBuild (Boolean) defaulted to False</li> <li>FromPath (String)</li> <li>InstallPath (String)</li> </ol> <p>Then, in your workflow open these sections:</p> <ul> <li>Run on Agent</li> <li>Try Compile, Test and...</li> <li>Under Try open the Sequence</li> </ul> <p>At the bottom of the Sequence after Get Impacted Tests,.. open your toolbox and drag in an "If" workflow item. Set the Condition to DeployBuild.</p> <p>In the Then section of the If drag in a CopyDirectory workflow item. Set the Destination to InstallPath and the Source to </p> <pre><code>String.Format("{0}\{1}", BinariesDirectory, FromPath). </code></pre> <p>Save it and check it in. You'll need to open a previous build and note the build subfolder you want to deploy. It'll be something like _PublishedWebsites\mywebsite\ </p> <p>Edit your build definition (you might have to close and reopen VS first) and go to the Process tab. Change the Build Process Template to your new version. </p> <p>Set the FromPath to the path you just noted. Set the InstallPath to the UNC path of the destination folder (you'll need to make sure that whatever service account your builds run under has access to that path) and set DeployBuild to True.</p> <p>Save, queue a build and test your deploy.</p> <p>You can also, in your workflow XAML, go to Arguments and edit the Metadata argument with each of your new arguments. You can set where they can be viewed. So you could, for example, set the FromPath and InstallPath to only be viewed when editing the definition but DeployBuild to be seen when queuing a build. That way you could turn it on or off when queuing.</p> <p>Good luck.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload