Post Contents
In Part 2 I’ll walk through the Octopus Deploy configuration where we use PowerShell, Sitecore.Ship and Curl to install the Team Development for Sitecore Packages and publish the changes, if you are looking for the TeamCity configuration see Part 1
See the TeamCity documentation for more details on how to set up TeamCity as a NuGet server and to get your URL.
$ConnectionTimeOutInSeconds = 300 | |
$MaxTimeOutInSeconds = 900 | |
$siteHostName = $OctopusParameters["Your.SiteName.Parameter"] | |
$fileUploadUrl = "http://$siteHostName/services/package/install/fileupload" | |
$curlPath = "C:\Tools\curl-7.48\bin\curl.exe" | |
$releaseNumber = $OctopusParameters["Octopus.Release.Number"] | |
$environment = $OctopusParameters["Octopus.Environment.Name"] | |
$updatePackagePath = "C:\Octopus\Applications\$environment\RCN.TDS.UpdatePackage\$releaseNumber\RCN.TDS.update" | |
$curlCommand= "$curlPath --show-error --silent --connect-timeout $ConnectionTimeOutInSeconds --max-time $MaxTimeOutInSeconds --form ""filename=@$updatePackagePath"" $fileUploadUrl" | |
Write-Output "INFO: Starting Invoke-Expression: $curlCommand" | |
Invoke-Expression $curlCommand |
Note – Each Server where you wish to execute this script will need Curl installed – <a href="https://curl.haxx.se/download.html" target="blank">https://curl.haxx.se/download.html_
$siteHostName = $OctopusParameters["Your.SiteName.Parameter"] | |
$PublishMode = $OctopusParameters["PublishMode"] | |
$CmsUrl = "http://$siteHostName/services/publish/$PublishMode" | |
$CurlPath = "C:\Tools\curl-7.48\bin\curl.exe" | |
$CurlCommand= "$CurlPath --request POST --silent --form ""source=master"" ""languages=en"" $CmsUrl" | |
Write-Output "INFO: Starting Invoke-Expression: $CurlCommand" | |
Invoke-Expression $CurlCommand |
Note – Each Server where you wish to execute this script will need Curl installed – https://curl.haxx.se/download.html
With the steps from this post and Part 1 you will have a build process in place that will take your code, build it, run the unit tests, create the required NuGet packages and deploy them to the appropriate server roles, install the .update package and publish the changes. Happy Deployments!