Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>While waiting for an answer I shared the question on twitter, this resulted being given a guiding hand by Stephen Pope (<strong><a href="https://twitter.com/stephenpope/status/257840440156512256" rel="noreferrer">his response</a></strong>) He suggested using the <a href="http://vsplugins.sitecore.net/Sitecore-PowerShell.ashx" rel="noreferrer">PowerShell enhancements</a> offered by Sitecore Rocks, it took a while (documentation is thin on the ground) but I have achieved the result I was after :)</p> <p>As a record of what I found, the following is provided as a potential answer to my own question, though big thanks to Jay S who's solution I would have used if not for this..</p> <p>Anyway.. Using an additional build step in the Teamcity build, I have the following:</p> <ul> <li><strong>Runner type:</strong> Powershell</li> <li><strong>Step name:</strong> Publish site</li> <li><strong>Powershell run mode:</strong> x64</li> <li><strong>script:</strong> Source code</li> <li><strong>script execution mode:</strong> Put script into powershell stdin with "-Command -" arguments</li> <li><strong>Additional command line parameters:</strong> -ExecutionPolicy Unrestricted</li> <li><p><strong>Script source:</strong></p> <p>import-module '.\build-modules\sitecore\sitecore.psd1';<br /> new-psdrive -name "rocks" -psp SitecoreRocks -root "" -host "%QA.Url%" -usr "%QA.sitecore.user%" -pwd "%QA.sitecore.password%" -databasename "master" -scope "Script"; <br />set-location rocks:<br /> Publish-SCDatabase;</p></li> </ul> <p>The magic happens within the Publish-SCDatabase commandlet which when you run Get-Help shows a bunch of parameters, it turns out that only two of the parameters are usable <em>-Name</em> and <em>-Mode</em></p> <p>Finding documentation beyond the vs-plugins link above was impossible, so a bit of .net reflection and a good dose of patiense showes that the parameters have the following options:</p> <ul> <li><strong>-Name</strong> The name of the database to run the publish against (default is the psdrive database</li> <li><strong>-Mode</strong> Sets the publish mode of the comandlet with the following options available: <ul> <li>0: Republish</li> <li>1: Incremental</li> <li>2: Smart </li> <li>3: Rebuild </li> </ul></li> </ul> <p>Of course better documentation, and possibly additional info via the Get-Help commandlet would be nice.. if the rocks project was open source, I may well have forked the project to generate the additional help.</p> <p>Now that there are two very good solutions to this question, I will let peoples votes decide on which is the best answer, in a few days I will check the votes and mark the most voted as the accepted answer.</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.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      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