Commit a65255f8 authored by Viet Hoang's avatar Viet Hoang

Merge branch 'Release-3.0.0' into 'master'

Release 3.0.0

See merge request viet.hoang/my-simple-framework!99
parents 7267e857 9d108db1
......@@ -58,3 +58,4 @@ tools/*
/Docker/traefik/certs/*.pem
/Docker/data/*
/Docker/deploy/*
/Docker/.env
REGISTRY=
WINDOWSSERVERCORE_VERSION=1909
NANOSERVER_VERSION=1909
SITECORE_VERSION=9.3.0
SITECORE_LICENSE=
SQL_SA_PASSWORD=8Tombs-Given-Clock#-arming-Alva-debut-Spine-monica-Normal-Ted-About1-chard-Easily-granddad-5Context!
TELERIK_ENCRYPTION_KEY=qspJhcSmT5VQSfbZadFfzhCK6Ud7uRoS42Qcm8UofvVLiXciUBcUeZELsTo8KD9o6KderQr9Z8uZ9CHisFJNRz46WTZ5qCRufRFt
\ No newline at end of file
COMPOSE_PROJECT_NAME=sitecore-xp0
SITECORE_DOCKER_REGISTRY=scr.sitecore.com/sxp/
SITECORE_VERSION=10.0.0-ltsc2019
SITECORE_ADMIN_PASSWORD=
SQL_SA_PASSWORD=
REPORTING_API_KEY=
TELERIK_ENCRYPTION_KEY=
SITECORE_IDSECRET=
SITECORE_ID_CERTIFICATE=
SITECORE_ID_CERTIFICATE_PASSWORD=
SITECORE_LICENSE=
TRAEFIK_IMAGE=traefik:v2.2.0-windowsservercore-1809
TRAEFIK_ISOLATION=hyperv
ISOLATION=default
HOST_LICENSE_FOLDER=C:\license
SITECORE_TOOLS_REGISTRY=scr.sitecore.com/tools/
TOOLS_VERSION=10.0.0-1809
CM_HOST=cm.viethoang.local
ID_HOST=id.viethoang.local
SITE1_HOST=hoavi.viethoang.local
SITE2_HOST=demo.viethoang.local
LOCAL_DEPLOY_PATH=.\deploy
LOCAL_DATA_PATH=.\data
param(
[Parameter(Mandatory = $true)]
[ValidateScript( { Test-Path $_ -PathType "Leaf" })]
[string]$Path
,
[Parameter(Mandatory = $false)]
[switch]$PersistForCurrentUser
)
$licenseFileStream = [System.IO.File]::OpenRead($Path);
$licenseString = $null
try
{
$memory = [System.IO.MemoryStream]::new()
$gzip = [System.IO.Compression.GZipStream]::new($memory, [System.IO.Compression.CompressionLevel]::Optimal, $false);
$licenseFileStream.CopyTo($gzip);
$gzip.Close();
# base64 encode the gzipped content
$licenseString = [System.Convert]::ToBase64String($memory.ToArray())
}
finally
{
# cleanup
if ($null -ne $gzip)
{
$gzip.Dispose()
$gzip = $null
}
if ($null -ne $memory)
{
$memory.Dispose()
$memory = $null
}
$licenseFileStream = $null
}
# sanity check
if ($licenseString.Length -le 100)
{
throw "Unknown error, the gzipped and base64 encoded string '$licenseString' is too short."
}
# persist in current session
$env:SITECORE_LICENSE = $licenseString
if ($PersistForCurrentUser)
{
# persist on machine for future sessions
[Environment]::SetEnvironmentVariable("SITECORE_LICENSE", $licenseString, "User")
}
# Clean data folders
Get-ChildItem -Path (Join-Path $PSScriptRoot "\mssql-data") -Exclude ".gitkeep" -Recurse | Remove-Item -Force -Recurse -Verbose
Get-ChildItem -Path (Join-Path $PSScriptRoot "\solr-data") -Exclude ".gitkeep" -Recurse | Remove-Item -Force -Recurse -Verbose
Get-ChildItem -Path (Join-Path $PSScriptRoot "\data") -Directory | ForEach-Object {
$dataPath = $_.FullName
Get-ChildItem -Path $dataPath -Exclude ".gitkeep" -Recurse | Remove-Item -Force -Recurse -Verbose
}
\ No newline at end of file
# escape=`
ARG BASE_IMAGE
ARG TOOLING_IMAGE
FROM ${TOOLING_IMAGE} as tooling
FROM ${BASE_IMAGE}
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
# Copy development tools and entrypoint
COPY --from=tooling \tools\ \tools\
WORKDIR C:\inetpub\wwwroot
# Install IISRewrite Module
RUN Invoke-WebRequest https://download.microsoft.com/download/1/2/8/128E2E22-C1B9-44A4-BE2A-5859ED1D4592/rewrite_amd64_en-US.msi -OutFile c:/inetpub/rewrite_amd64_en-US.msi
RUN powershell -Command Start-Process c:/inetpub/rewrite_amd64_en-US.msi -ArgumentList "/qn" -Wait
\ No newline at end of file
version: "2.4"
services:
cm:
image: ${REGISTRY}${COMPOSE_PROJECT_NAME}-xp0-cm:${VERSION:-latest}
build:
context: ./cm
args:
BASE_IMAGE: ${SITECORE_DOCKER_REGISTRY}sitecore-xp0-cm:${SITECORE_VERSION}
TOOLING_IMAGE: ${SITECORE_TOOLS_REGISTRY}sitecore-docker-tools-assets:${TOOLS_VERSION}
volumes:
- ${LOCAL_DEPLOY_PATH}\website:C:\deploy
- ${LOCAL_DATA_PATH}\cm:C:\inetpub\wwwroot\App_Data\logs
- ..\seria:C:\Unicorn\seria
entrypoint: powershell -Command "& C:\tools\entrypoints\iis\Development.ps1"
labels:
- "traefik.http.routers.cm-secure.rule=Host(`${CM_HOST}`,`${SITE1_HOST}`,`${SITE2_HOST}`)"
- "sitecore_instance_url=https://${CM_HOST}/sitecore"
mem_limit: 4GB
\ No newline at end of file
This diff is collapsed.
[CmdletBinding(DefaultParameterSetName = "no-arguments")]
Param (
[Parameter(HelpMessage = "Enables initialization of values in the .env file, which may be placed in source control.",
ParameterSetName = "env-init")]
[switch]$InitEnv,
[Parameter(Mandatory = $true,
HelpMessage = "The path to a valid Sitecore license.xml file.",
ParameterSetName = "env-init")]
[string]$LicenseXmlPath,
# We do not need to use [SecureString] here since the value will be stored unencrypted in .env,
# and used only for transient local development environments.
[Parameter(Mandatory = $true,
HelpMessage = "Sets the sitecore\\admin password for this environment via environment variable.",
ParameterSetName = "env-init")]
[string]$AdminPassword
)
$ErrorActionPreference = "Stop";
if ($InitEnv) {
if (-not $LicenseXmlPath.EndsWith("license.xml")) {
Write-Error "Sitecore license file must be named 'license.xml'."
}
if (-not (Test-Path $LicenseXmlPath)) {
Write-Error "Could not find Sitecore license file at path '$LicenseXmlPath'."
}
}
Write-Host "Preparing your Sitecore Containers environment!" -ForegroundColor Green
################################################
# Retrieve and import SitecoreDockerTools module
################################################
# Check for Sitecore Gallery
Import-Module PowerShellGet
$SitecoreGallery = Get-PSRepository | Where-Object { $_.SourceLocation -eq "https://sitecore.myget.org/F/sc-powershell/api/v2" }
if (-not $SitecoreGallery) {
Write-Host "Adding Sitecore PowerShell Gallery..." -ForegroundColor Green
Register-PSRepository -Name SitecoreGallery -SourceLocation https://sitecore.myget.org/F/sc-powershell/api/v2 -InstallationPolicy Trusted
$SitecoreGallery = Get-PSRepository -Name SitecoreGallery
}
#Install and Import SitecoreDockerTools
$dockerToolsVersion = "10.0.5"
Remove-Module SitecoreDockerTools -ErrorAction SilentlyContinue
if (-not (Get-InstalledModule -Name SitecoreDockerTools -RequiredVersion $dockerToolsVersion -ErrorAction SilentlyContinue)) {
Write-Host "Installing SitecoreDockerTools..." -ForegroundColor Green
Install-Module SitecoreDockerTools -RequiredVersion $dockerToolsVersion -Scope CurrentUser -Repository $SitecoreGallery.Name -AllowClobber
}
Write-Host "Importing SitecoreDockerTools..." -ForegroundColor Green
Import-Module SitecoreDockerTools -RequiredVersion $dockerToolsVersion
##################################
# Configure TLS/HTTPS certificates
##################################
New-Item -ItemType Directory -Path "traefik\certs" -Force
Push-Location traefik\certs
try {
$mkcert = ".\mkcert.exe"
if ($null -ne (Get-Command mkcert.exe -ErrorAction SilentlyContinue)) {
# mkcert installed in PATH
$mkcert = "mkcert"
} elseif (-not (Test-Path $mkcert)) {
Write-Host "Downloading and installing mkcert certificate tool..." -ForegroundColor Green
Invoke-WebRequest "https://github.com/FiloSottile/mkcert/releases/download/v1.4.1/mkcert-v1.4.1-windows-amd64.exe" -UseBasicParsing -OutFile mkcert.exe
if ((Get-FileHash mkcert.exe).Hash -ne "1BE92F598145F61CA67DD9F5C687DFEC17953548D013715FF54067B34D7C3246") {
Remove-Item mkcert.exe -Force
throw "Invalid mkcert.exe file"
}
}
Write-Host "Generating Traefik TLS certificate..." -ForegroundColor Green
& $mkcert -install
& $mkcert "*.viethoang.local"
}
catch {
Write-Error "An error occurred while attempting to generate TLS certificate: $_" -ForegroundColor Red
}
finally {
Pop-Location
}
################################
# Add Windows hosts file entries
################################
Write-Host "Adding Windows hosts file entries..." -ForegroundColor Green
Add-HostsEntry "cm.viethoang.local"
Add-HostsEntry "id.viethoang.local"
Add-HostsEntry "hoavi.viethoang.local"
Add-HostsEntry "demo.viethoang.local"
###############################
# Populate the environment file
###############################
if ($InitEnv) {
Write-Host "Populating required .env file values..." -ForegroundColor Green
# HOST_LICENSE_FOLDER
Set-DockerComposeEnvFileVariable "HOST_LICENSE_FOLDER" -Value (Get-Item $LicenseXmlPath).Directory.FullName
# SITECORE_LICENSE
Set-DockerComposeEnvFileVariable "SITECORE_LICENSE" -Value (ConvertTo-CompressedBase64String -Path $LicenseXmlPath)
# SITECORE_ADMIN_PASSWORD
Set-DockerComposeEnvFileVariable "SITECORE_ADMIN_PASSWORD" -Value $AdminPassword
# CM_HOST
Set-DockerComposeEnvFileVariable "CM_HOST" -Value "cm.viethoang.local"
# ID_HOST
Set-DockerComposeEnvFileVariable "ID_HOST" -Value "id.viethoang.local"
# SITE1_HOST
Set-DockerComposeEnvFileVariable "SITE1_HOST" -Value "hoavi.viethoang.local"
# SITE2_HOST
Set-DockerComposeEnvFileVariable "SITE2_HOST" -Value "demo.viethoang.local"
# REPORTING_API_KEY = random 64-128 chars
Set-DockerComposeEnvFileVariable "REPORTING_API_KEY" -Value (Get-SitecoreRandomString 128 -DisallowSpecial)
# TELERIK_ENCRYPTION_KEY = random 64-128 chars
Set-DockerComposeEnvFileVariable "TELERIK_ENCRYPTION_KEY" -Value (Get-SitecoreRandomString 128)
# SITECORE_IDSECRET = random 64 chars
Set-DockerComposeEnvFileVariable "SITECORE_IDSECRET" -Value (Get-SitecoreRandomString 64 -DisallowSpecial)
# SITECORE_ID_CERTIFICATE
$idCertPassword = Get-SitecoreRandomString 8 -DisallowSpecial
Set-DockerComposeEnvFileVariable "SITECORE_ID_CERTIFICATE" -Value (Get-SitecoreCertificateAsBase64String -DnsName "viethoang.local" -Password (ConvertTo-SecureString -String $idCertPassword -Force -AsPlainText))
# SITECORE_ID_CERTIFICATE_PASSWORD
Set-DockerComposeEnvFileVariable "SITECORE_ID_CERTIFICATE_PASSWORD" -Value $idCertPassword
# SQL_SA_PASSWORD
# Need to ensure it meets SQL complexity requirements
Set-DockerComposeEnvFileVariable "SQL_SA_PASSWORD" -Value (Get-SitecoreRandomString 19 -DisallowSpecial -EnforceComplexity)
# LOCAL_DEPLOY_PATH
Set-DockerComposeEnvFileVariable "LOCAL_DEPLOY_PATH" -Value ".\deploy"
# LOCAL_DATA_PATH
Set-DockerComposeEnvFileVariable "LOCAL_DATA_PATH" -Value ".\data"
}
Write-Host "Done!" -ForegroundColor Green
\ No newline at end of file
#escape=`
ARG BASE_IMAGE
FROM $BASE_IMAGE
COPY --from=traefik:v2.1.4-windowsservercore-1809 /traefik.exe /traefik/traefik.exe
ENTRYPOINT ["C:\\traefik\\traefik.exe"]
tls:
certificates:
- certFile: C:\etc\traefik\certs\_wildcard.viethoang.local.pem
keyFile: C:\etc\traefik\certs\_wildcard.viethoang.local-key.pem
\ No newline at end of file
[[tls.certificates]]
certFile = "/traefik/certs/_wildcard.viethoang.local.pem"
keyFile = "/traefik/certs/_wildcard.viethoang.local-key.pem"
\ No newline at end of file
$ErrorActionPreference = "Stop";
# Double check whether init has been run
$envCheckVariable = "HOST_LICENSE_FOLDER"
$envCheck = Get-Content .env -Encoding UTF8 | Where-Object { $_ -imatch "^$envCheckVariable=.+" }
if (-not $envCheck) {
throw "$envCheckVariable does not have a value. Did you run 'init.ps1 -InitEnv'?"
}
# Start the Sitecore instance
Write-Host "Starting Sitecore environment..." -ForegroundColor Green
docker-compose up -d --build
# Wait for Traefik to expose CM route
Write-Host "Waiting for CM to become available..." -ForegroundColor Green
$startTime = Get-Date
do {
Start-Sleep -Milliseconds 100
try {
$status = Invoke-RestMethod "http://localhost:8079/api/http/routers/cm-secure@docker"
} catch {
if ($_.Exception.Response.StatusCode.value__ -ne "404") {
throw
}
}
} while ($status.status -ne "enabled" -and $startTime.AddSeconds(15) -gt (Get-Date))
if (-not $status.status -eq "enabled") {
$status
Write-Error "Timeout waiting for Sitecore CM to become available via Traefik proxy. Check CM container logs."
}
Write-Host "Opening site..." -ForegroundColor Green
$dockerContainerName = "sitecore-xp0_cm_1"
$sitecoreInstanceUrl = docker inspect --format='{{json .Config.Labels.sitecore_instance_url}}' $dockerContainerName
Start-Process $sitecoreInstanceUrl
\ No newline at end of file
......@@ -17,34 +17,41 @@ For more information, please read the blog posts:
- https://buoctrenmay.com/2019/09/03/sitecore-9-and-my-simple-development-framework-version-2-4/
- https://buoctrenmay.com/2020/01/29/sitecore-9-and-my-simple-development-framework-version-2-5/
- http://buoctrenmay.com/2020/03/25/playing-around-with-sitecore-docker-containers-and-my-simple-development-framework-version-2-6
- https://buoctrenmay.com/2020/10/11/playing-around-with-sitecore-10-docker-containers-and-my-simple-development-framework-version-3-0/
## Main Technologies:
- .Net Framework from version 4.7.2
- Sitecore XP version 9.3
- Glass Mapper Sitecore version 5.6: an object mapping framework for Sitecore https://github.com/mikeedwards83/Glass.Mapper
- Unicorn version 4.1: a Sitecore utility designed to simplify deployment of Sitecore items across environments automatically https://github.com/kamsar/Unicorn
- .Net Framework from version 4.8.0
- Sitecore XP version 10.0.0
- Glass Mapper Sitecore version 5.8: an object mapping framework for Sitecore https://github.com/mikeedwards83/Glass.Mapper
- Unicorn version 4.1.2: a Sitecore utility designed to simplify deployment of Sitecore items across environments automatically https://github.com/kamsar/Unicorn
- Microsoft Visual Studio Unit Testing Framework
- Sitecore.FakeDb version 3.0
## Setup Prerequisites
The following applications/tools/utilities are required on your local machine. The appropriate version of these items should be installed based on the version of your operating system and appropriate licensing.
+ Sitecore XP 9.3.0
+ Sitecore XP 10.0.0
+ IIS 10.0+
+ Visual Studio 2017 version 15.7 or later
+ SQL Server 2016 SP2 or later
+ SQL Server 2017 or later
+ IIS URL Rewrite 2.1
## (Optional) Step-by-step Guide for Sitecore Docker container
1. Take a look at [this one](http://buoctrenmay.com/2020/03/25/playing-around-with-sitecore-docker-containers-and-my-simple-development-framework-version-2-6) to spin up a new **Sitecore 9.3.0** instance whose site name should be `sc.viethoang.local`
+ add the host names `sc.viethoang.local`, `hoavi.viethoang.local`, `demo.viethoang.local` to **hosts** file (normally, it's in `C:\Windows\System32\drivers\etc`)
+ _Note: you can use [SIM](https://marketplace.sitecore.net/en/Modules/Sitecore_Instance_Manager.aspx) then open `Bundled Tools\Hosts Editor` in order to do that_
1. Take a look at [this one](https://containers.doc.sitecore.com/docs/environment-setup) to get your environment set up for container-based Sitecore development
1. rename `\Docker\.env.example` to `\Docker\.env`
1. let's initialize the environment variables
+ launch PowerShell as an administrator
+ change directory to **your Docker folder** (Ex: "D:\\my-simple-framework\\Docker")
+ execute `.\Init -InitEnv` and then input
+ LicenseXmlPath: (Ex: `C:\license\license.xml`)
+ AdminPassword: (Ex: `b`)
+ execute `.\up` to spin up a new **Sitecore 10.0.0** instance
1. rename **cake-config.json.example** to **cake-config.json** and then update the following ones:
+ `WebsiteRoot` to **deploy folder which is mounted to docker container** (Ex: "D:\\\\my-simple-framework\\\\Docker\\\\deploy")
+ `InstanceUrl` to **your Sitecore instance url** (Ex: "https://sc.viethoang.local/")
+ `WebsiteRoot` to **deploy folder which is mounted to docker container** (Ex: "D:\\\\my-simple-framework\\\\Docker\\\\deploy\\\\website")
+ `InstanceUrl` to **your Sitecore instance url** (Ex: "https://cm.viethoang.local/")
+ `ProjectFolder` to **your solution directory** (Ex: "D:\\\\my-simple-framework")
+ `BuildToolVersions` to **your MS Build version** (Ex: "VS2019")
1. rename **publishsettings.targets.example** to **publishsettings.targets** and then update the following one:
+ `<publishUrl>` to **deploy folder which is mounted to docker container** (Ex: "D:\\my-simple-framework\\Docker\\deploy")
+ `<publishUrl>` to **deploy folder which is mounted to docker container** (Ex: "D:\\my-simple-framework\\Docker\\deploy\\website")
1. rename **Common.LocalSettings.config.example** to **Common.LocalSettings.config**
1. let's deploy the solution to docker container
+ launch PowerShell as an administrator
......@@ -52,18 +59,18 @@ The following applications/tools/utilities are required on your local machine. T
+ execute **.\build -target Deploy-Docker**
## (Optional) Step-by-step Guide for vanilla Sitecore instance
1. Take a look at [this one](https://buoctrenmay.com/2019/11/30/sitecore-xp-9-3-initial-release-install-uninstall-by-using-sitecore-install-framework-version-2-2/) to setup a new **Sitecore 9.3.0** instance whose site name should be `sc.viethoang.local`
1. Take a look at [this one](https://buoctrenmay.com/2020/08/10/sitecore-xp-10-initial-release-install-uninstall-by-using-sitecore-install-framework-version-2-3/) to setup a new **Sitecore 10.0.0** instance whose site name should be `cm.viethoang.local`
+ add the host names `hoavi.viethoang.local`, `demo.viethoang.local` to **hosts** file
+ _Note: you can use [SIM](https://marketplace.sitecore.net/en/Modules/Sitecore_Instance_Manager.aspx) then open `Bundled Tools\Hosts Editor` in order to do that_
1. Site bindings:
+ bind the host names `hoavi.local`, `demo.local` to your Sitecore site (created in Step 1) via IIS
+ bind the host names `hoavi.viethoang.local`, `demo.viethoang.local` to your Sitecore site (created in Step 1) via IIS
1. rename **cake-config.json.example** to **cake-config.json** and then update the following ones:
+ `WebsiteRoot` to **your Sitecore webroot folder** (Ex: "D:\\\\websites\\\\viethoang.local")
+ `InstanceUrl` to **your Sitecore instance url** (Ex: "https://viethoang.local/")
+ `ProjectFolder` to **your solution directory** (Ex: "D:\\\\my-simple-framework")
+ `BuildToolVersions` to **your MS Build version** (Ex: "VS2019")
1. rename **publishsettings.targets.example** to **publishsettings.targets** and then update the following one:
+ `<publishUrl>` to **your sitecore instance url** in case you don't use site name `sc.viethoang.local` in step 1
+ `<publishUrl>` to **your sitecore instance url** in case you don't use site name `viethoang.local` in step 1
1. rename **Common.LocalSettings.config.example** to **Common.LocalSettings.config** and then update the following one:
+ `VietHoangSourceFolder` to **your solution directory** (Ex: "D:\\my-simple-framework")
1. Enable URL Rewrite
......
......@@ -41,4 +41,4 @@
</profile>
</system.web>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2"/></startup></configuration>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/></startup></configuration>
......@@ -8,7 +8,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>VietHoang.Hoavi.Services.Tests</RootNamespace>
<AssemblyName>VietHoang.Hoavi.Services.Tests</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
......@@ -46,17 +46,20 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Castle.Core" Version="4.4.0" />
<PackageReference Include="Glass.Mapper.Sc.93" Version="5.6.160" />
<PackageReference Include="Glass.Mapper.Sc.93.Core" Version="5.6.160" />
<PackageReference Include="Glass.Mapper.Sc.93.Mvc" Version="5.6.160" />
<PackageReference Include="Glass.Mapper.Sc.100" Version="5.8.170" />
<PackageReference Include="Glass.Mapper.Sc.100.Core" Version="5.8.170" />
<PackageReference Include="Glass.Mapper.Sc.100.Mvc" Version="5.8.170" />
<PackageReference Include="Lucene.Net" Version="3.0.3" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="2.1.1" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="2.1.1" />
<PackageReference Include="Moq" Version="4.12.0" />
<PackageReference Include="SharpZipLib" Version="0.86.0" />
<PackageReference Include="Sitecore.ContentSearch.ContentExtraction">
<Version>10.0.0</Version>
</PackageReference>
<PackageReference Include="Sitecore.FakeDb" Version="3.0.0-alpha1" />
<PackageReference Include="Sitecore.Kernel" Version="9.3.0" />
<PackageReference Include="Sitecore.Logging" Version="9.3.0" />
<PackageReference Include="Sitecore.Kernel" Version="10.0.0" />
<PackageReference Include="Sitecore.Logging" Version="10.0.0" />
<PackageReference Include="System.Collections" Version="4.3.0" />
<PackageReference Include="System.Collections.Concurrent" Version="4.3.0" />
<PackageReference Include="System.ComponentModel" Version="4.3.0" />
......
......@@ -8,7 +8,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>VietHoang.Hoavi.Web.Tests</RootNamespace>
<AssemblyName>VietHoang.Hoavi.Web.Tests</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
......@@ -47,9 +47,9 @@
<ItemGroup>
<PackageReference Include="AutoMapper" Version="6.2.2" />
<PackageReference Include="Castle.Core" Version="4.4.0" />
<PackageReference Include="Glass.Mapper.Sc.93" Version="5.6.160" />
<PackageReference Include="Glass.Mapper.Sc.93.Core" Version="5.6.160" />
<PackageReference Include="Glass.Mapper.Sc.93.Mvc" Version="5.6.160" />
<PackageReference Include="Glass.Mapper.Sc.100" Version="5.8.170" />
<PackageReference Include="Glass.Mapper.Sc.100.Core" Version="5.8.170" />
<PackageReference Include="Glass.Mapper.Sc.100.Mvc" Version="5.8.170" />
<PackageReference Include="Lucene.Net" Version="3.0.3" />
<PackageReference Include="Microsoft.AspNet.Mvc" Version="5.2.4" />
<PackageReference Include="Microsoft.AspNet.Razor" Version="3.2.4" />
......@@ -60,10 +60,13 @@
<PackageReference Include="Moq" Version="4.12.0" />
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" />
<PackageReference Include="SharpZipLib" Version="0.86.0" />
<PackageReference Include="Sitecore.ContentSearch.ContentExtraction">
<Version>10.0.0</Version>
</PackageReference>
<PackageReference Include="Sitecore.FakeDb" Version="3.0.0-alpha1" />
<PackageReference Include="Sitecore.Kernel" Version="9.3.0" />
<PackageReference Include="Sitecore.Logging" Version="9.3.0" />
<PackageReference Include="Sitecore.Nexus" Version="9.3.0" />
<PackageReference Include="Sitecore.Kernel" Version="10.0.0" />
<PackageReference Include="Sitecore.Logging" Version="10.0.0" />
<PackageReference Include="Sitecore.Nexus" Version="10.0.0" />
<PackageReference Include="Sitecore.Nexus.Licensing">
<Version>9.0.180604</Version>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
......
......@@ -41,4 +41,4 @@
</profile>
</system.web>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2"/></startup></configuration>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/></startup></configuration>
......@@ -8,7 +8,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>VietHoang.Shared.Tests</RootNamespace>
<AssemblyName>VietHoang.Shared.Tests</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
......
......@@ -240,11 +240,36 @@ $cakeArguments += $ScriptArgs
Write-Host "Running build script..."
&$CAKE_EXE $cakeArguments --ErrorAction=Stop
if (!$Target.StartsWith("Deploy", "CurrentCultureIgnoreCase") -and !$Target.StartsWith("Quick", "CurrentCultureIgnoreCase"))
{
if ($Target.StartsWith("Deploy-Docker", "CurrentCultureIgnoreCase")) {
$dockerContainerName = "sitecore-xp0_cm_1"
Write-Host "Restarting the docker container $dockerContainerName"
Invoke-Expression -Command "docker restart $dockerContainerName"
Write-Host "Waiting for CM to become available..." -ForegroundColor Green
$startTime = Get-Date
do {
Start-Sleep -Milliseconds 100
try {
$status = Invoke-RestMethod "http://localhost:8079/api/http/routers/cm-secure@docker"
} catch {
if ($_.Exception.Response.StatusCode.value__ -ne "404") {
throw
}
}