-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
minor parameter improvements and ability to download and extract automatically from dev.sitecore.net #17
base: master
Are you sure you want to change the base?
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 -UseBasicParsing
Using 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
@@ -69,8 +69,8 @@ $params = @{ | |||
# CM instance and XConnect settings | |||
SiteName = $SiteName | |||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
won't it be installed once you have XP 9 on the machine?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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)