|
|
@ -7,17 +7,19 @@ $pubFolderToDelete = $scriptPath + "\pub" |
|
|
|
remove-item -path $pubFolderToDelete -Force -Recurse -ErrorAction SilentlyContinue |
|
|
|
#cmd /c "rd /s pub" /q |
|
|
|
|
|
|
|
|
|
|
|
# *** WebMVC image *** |
|
|
|
$webPathToJson = $scriptPath + "\src\Web\WebMVC\project.json" |
|
|
|
Write-Host "webPathToJson is $webPathToJson" -ForegroundColor Yellow |
|
|
|
$webPathToPub = $scriptPath + "\pub\webMVC" |
|
|
|
Write-Host "webPathToPub is $webPathToPub" -ForegroundColor Yellow |
|
|
|
|
|
|
|
Write-Host "Restore Dependencies just in case as it is needed to run dotnet publish" -ForegroundColor Blue |
|
|
|
write-Host "Restore Dependencies just in case as it is needed to run dotnet publish" -ForegroundColor Blue |
|
|
|
dotnet restore $webPathToJson |
|
|
|
dotnet build $webPathToJson |
|
|
|
dotnet publish $webPathToJson -o $webPathToPub |
|
|
|
|
|
|
|
|
|
|
|
# *** WebSPA image *** |
|
|
|
$webSPAPathToJson = $scriptPath + "\src\Web\WebSPA\eShopOnContainers.WebSPA\project.json" |
|
|
|
Write-Host "webSPAPathToJson is $webSPAPathToJson" -ForegroundColor Yellow |
|
|
@ -41,6 +43,7 @@ dotnet restore $catalogPathToJson |
|
|
|
dotnet build $catalogPathToJson |
|
|
|
dotnet publish $catalogPathToJson -o $catalogPathToPub |
|
|
|
|
|
|
|
|
|
|
|
#*** Ordering service image *** |
|
|
|
$orderingPathToJson = $scriptPath + "\src\Services\Ordering\Ordering.API\project.json" |
|
|
|
Write-Host "orderingPathToJson is $orderingPathToJson" -ForegroundColor Yellow |
|
|
@ -52,6 +55,7 @@ dotnet restore $orderingPathToJson |
|
|
|
dotnet build $orderingPathToJson |
|
|
|
dotnet publish $orderingPathToJson -o $orderingPathToPub |
|
|
|
|
|
|
|
|
|
|
|
#*** Basket service image *** |
|
|
|
$basketPathToJson = $scriptPath + "\src\Services\Basket\Basket.API\project.json" |
|
|
|
Write-Host "basketPathToJson is $basketPathToJson" -ForegroundColor Yellow |
|
|
@ -63,6 +67,8 @@ dotnet restore $basketPathToJson |
|
|
|
dotnet build $basketPathToJson |
|
|
|
dotnet publish $basketPathToJson -o $basketPathToPub |
|
|
|
|
|
|
|
|
|
|
|
#*** Build Docker Images |
|
|
|
docker build -t eshop/web $webPathToPub |
|
|
|
docker build -t eshop/catalog.api $catalogPathToPub |
|
|
|
docker build -t eshop/ordering.api $orderingPathToPub |
|
|
|