minor parameter improvements and ability to download and extract automatically from dev.sitecore.net#17
Conversation
…ations) - Added assets folder and changed paths to point to the new folder (keeps the 9.0.1 Commerce-level folder cleaner)
|
@jeanfrancoislarente I'm reviewing atm |
| $cred = Invoke-FetchSitecoreCredentials | ||
| $cookie = Invoke-FetchDownloadAuthentication $cred | ||
|
|
||
| Invoke-SitecoreFileDownload -Uri $url -OutputFile $target -Cookies $cookie |
There was a problem hiding this comment.
This all Invoke-FetchDownloadAuthentication, Invoke-SitecoreFileDownload
can be replaced with:
$loginRequest = Invoke-RestMethod -Uri https://dev.sitecore.net/api/authorization -Method Post -ContentType "application/json" -Body "{username: '$user', password: '$password'}" -SessionVariable session -UseBasicParsing
Invoke-WebRequest -Uri $package_url -WebSession $session -OutFile $package_zip_path -UseBasicParsingUsing this approach in sitecore-packer
https://github.com/asmagin/sitecore-packer/blob/5af9ed72746d3bb64fe598373594db2eb5458f95/src/components/commerce/chef/cookbooks/scp_commerce/resources/901.rb#L20-L23
| SiteHostHeader = $siteHostHeader | ||
| SiteInstallDir = "$($Drive)\inetpub\wwwroot\$Prefix.local" | ||
| XConnectInstallDir = "$($Drive)\inetpub\wwwroot\$Prefix.xconnect" | ||
| SiteInstallDir = "$(Join-Path $WebRoot $Prefix.local)" |
There was a problem hiding this comment.
no need to wrap Join-Path in a string interpolation
| Write-Host "Saving $netCoreSDKUrl to $netCoreSDKPackageDestination - if required" -ForegroundColor Green | ||
| if (!(Test-Path $netCoreSDKPackageDestination)) { | ||
| Start-BitsTransfer -source $netCoreSDKUrl -Destination $netCoreSDKPackageDestination | ||
| } |
There was a problem hiding this comment.
Why not take the latest version of the .net core runtime and sdk of 2.1.0? And I think we need to explicitly add something to the readme file that these installers (pre-reqs) need to be installed first before running the deploy script
There was a problem hiding this comment.
won't it be installed once you have XP 9 on the machine?
There was a problem hiding this comment.
XP 9 doesn't require .NET core, that's why it was part of my XC 9 install.
Parameterized WebRoot (to avoid having to change it in multiple locations)
Added assets folder and changed paths to point to the new folder (keeps the 9.0.1 Commerce-level folder cleaner)