Browse Source

Merge pull request #230 from abpframework/gterdem/image_build_script_update

Updated default image build scripts
pull/233/head
selman koc 3 years ago
committed by GitHub
parent
commit
70543f78b8
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 24
      build/build-images-locally.ps1
  2. 22
      build/build-images-locally.sh
  3. 22
      build/build-images.ps1
  4. 22
      build/build-images.sh
  5. 31
      build/publish-locally.ps1

24
build/build-images-locally.ps1

@ -1,4 +1,4 @@
param ($version='1.0.0')
param ($version='latest')
$currentFolder = $PSScriptRoot
$slnFolder = Join-Path $currentFolder "../"
@ -17,7 +17,7 @@ $paymentServiceFolder = Join-Path $slnFolder "services/payment/src/EShopOnAbp.Pa
$orderingServiceFolder = Join-Path $slnFolder "services/ordering/src/EShopOnAbp.OrderingService.HttpApi.Host"
$cmskitServiceFolder = Join-Path $slnFolder "services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Host"
$total = 12
$total = 11
### Angular WEB App(WWW)
Write-Host "*** BUILDING WEB (WWW) 1/$total ****************" -ForegroundColor Green
@ -28,61 +28,61 @@ npm run build:prod
docker build -f Dockerfile.local -t eshoponabp/app-web:$version .
### PUBLIC-WEB
Write-Host "*** BUILDING WEB-PUBLIC 3/$total ****************" -ForegroundColor Green
Write-Host "*** BUILDING WEB-PUBLIC 2/$total ****************" -ForegroundColor Green
Set-Location $publicWebFolder
dotnet publish -c Release
docker build -f Dockerfile.local -t eshoponabp/app-publicweb:$version .
### WEB-GATEWAY
Write-Host "*** BUILDING WEB-GATEWAY 4/$total ****************" -ForegroundColor Green
Write-Host "*** BUILDING WEB-GATEWAY 3/$total ****************" -ForegroundColor Green
Set-Location $webGatewayFolder
dotnet publish -c Release
docker build -f Dockerfile.local -t eshoponabp/gateway-web:$version .
### PUBLICWEB-GATEWAY
Write-Host "*** BUILDING WEB-PUBLIC-GATEWAY 5/$total ****************" -ForegroundColor Green
Write-Host "*** BUILDING WEB-PUBLIC-GATEWAY 4/$total ****************" -ForegroundColor Green
Set-Location $webPublicGatewayFolder
dotnet publish -c Release
docker build -f Dockerfile.local -t eshoponabp/gateway-web-public:$version .
### IDENTITY-SERVICE
Write-Host "*** BUILDING IDENTITY-SERVICE 6/$total ****************" -ForegroundColor Green
Write-Host "*** BUILDING IDENTITY-SERVICE 5/$total ****************" -ForegroundColor Green
Set-Location $identityServiceFolder
dotnet publish -c Release
docker build -f Dockerfile.local -t eshoponabp/service-identity:$version .
### ADMINISTRATION-SERVICE
Write-Host "*** BUILDING ADMINISTRATION-SERVICE 7/$total ****************" -ForegroundColor Green
Write-Host "*** BUILDING ADMINISTRATION-SERVICE 6/$total ****************" -ForegroundColor Green
Set-Location $administrationServiceFolder
dotnet publish -c Release
docker build -f Dockerfile.local -t eshoponabp/service-administration:$version .
### BASKET-SERVICE
Write-Host "**************** BUILDING BASKET-SERVICE 8/$total ****************" -ForegroundColor Green
Write-Host "**************** BUILDING BASKET-SERVICE 7/$total ****************" -ForegroundColor Green
Set-Location $basketServiceFolder
dotnet publish -c Release
docker build -f Dockerfile.local -t eshoponabp/service-basket:$version .
### CATALOG-SERVICE
Write-Host "**************** BUILDING CATALOG-SERVICE 9/$total ****************" -ForegroundColor Green
Write-Host "**************** BUILDING CATALOG-SERVICE 8/$total ****************" -ForegroundColor Green
Set-Location $catalogServiceFolder
dotnet publish -c Release
docker build -f Dockerfile.local -t eshoponabp/service-catalog:$version .
### PAYMENT-SERVICE
Write-Host "**************** BUILDING PAYMENT-SERVICE 10/$total ****************" -ForegroundColor Green
Write-Host "**************** BUILDING PAYMENT-SERVICE 9/$total ****************" -ForegroundColor Green
Set-Location $paymentServiceFolder
dotnet publish -c Release
docker build -f Dockerfile.local -t eshoponabp/service-payment:$version .
### ORDERING-SERVICE
Write-Host "**************** BUILDING ORDERING-SERVICE 11/$total ****************" -ForegroundColor Green
Write-Host "**************** BUILDING ORDERING-SERVICE 10/$total ****************" -ForegroundColor Green
Set-Location $orderingServiceFolder
dotnet publish -c Release
docker build -f Dockerfile.local -t eshoponabp/service-ordering:$version .
### CMSKIT-SERVICE
Write-Host "**************** BUILDING CMSKIT-SERVICE 12/$total ****************" -ForegroundColor Green
Write-Host "**************** BUILDING CMSKIT-SERVICE 11/$total ****************" -ForegroundColor Green
Set-Location $cmskitServiceFolder
dotnet publish -c Release
docker build -f Dockerfile.local -t eshoponabp/service-cmskit:$version .

22
build/build-images-locally.sh

@ -1,7 +1,7 @@
#!/bin/bash
export IMAGE_TAG="latest"
export total=12
export total=11
cd ../
export currentFolder=`pwd`
cd build/
@ -15,60 +15,60 @@ npm run build:prod
docker build -f Dockerfile.local --force-rm -t "eshoponabp/app-web:${IMAGE_TAG}" .
echo "*** BUILDING WEB-PUBLIC 3/$total ****************"
echo "*** BUILDING WEB-PUBLIC 2/$total ****************"
cd ${currentFolder}/apps/public-web/src/EShopOnAbp.PublicWeb
dotnet publish -c Release
docker build -f Dockerfile.local --force-rm -t "eshoponabp/app-publicweb:${IMAGE_TAG}" .
echo "*** BUILDING WEB-GATEWAY 4/$total ****************"
echo "*** BUILDING WEB-GATEWAY 3/$total ****************"
cd ${currentFolder}/gateways/web/src/EShopOnAbp.WebGateway
dotnet publish -c Release
docker build -f Dockerfile.local --force-rm -t "eshoponabp/gateway-web:${IMAGE_TAG}" .
echo "*** BUILDING WEB-PUBLIC-GATEWAY 5/$total ****************"
echo "*** BUILDING WEB-PUBLIC-GATEWAY 4/$total ****************"
cd ${currentFolder}/gateways/web-public/src/EShopOnAbp.WebPublicGateway
dotnet publish -c Release
docker build -f Dockerfile.local --force-rm -t "eshoponabp/gateway-web-public:${IMAGE_TAG}" .
echo "*** BUILDING IDENTITY-SERVICE 6/$total ****************"
echo "*** BUILDING IDENTITY-SERVICE 5/$total ****************"
cd ${currentFolder}/services/identity/src/EShopOnAbp.IdentityService.HttpApi.Host
dotnet publish -c Release
docker build -f Dockerfile.local --force-rm -t "eshoponabp/service-identity:${IMAGE_TAG}" .
echo "*** BUILDING ADMINISTRATION-SERVICE 7/$total ****************"
echo "*** BUILDING ADMINISTRATION-SERVICE 6/$total ****************"
cd ${currentFolder}/services/administration/src/EShopOnAbp.AdministrationService.HttpApi.Host
dotnet publish -c Release
docker build -f Dockerfile.local --force-rm -t "eshoponabp/service-administration:${IMAGE_TAG}" .
echo "**************** BUILDING BASKET-SERVICE 8/$total ****************"
echo "**************** BUILDING BASKET-SERVICE 7/$total ****************"
cd ${currentFolder}/services/basket/src/EShopOnAbp.BasketService
dotnet publish -c Release
docker build -f Dockerfile.local --force-rm -t "eshoponabp/service-basket:${IMAGE_TAG}" .
echo "**************** BUILDING CATALOG-SERVICE 9/$total ****************"
echo "**************** BUILDING CATALOG-SERVICE 8/$total ****************"
cd ${currentFolder}/services/catalog/src/EShopOnAbp.CatalogService.HttpApi.Host
dotnet publish -c Release
docker build -f Dockerfile.local --force-rm -t "eshoponabp/service-catalog:${IMAGE_TAG}" .
echo "**************** BUILDING PAYMENT-SERVICE 10/$total ****************"
echo "**************** BUILDING PAYMENT-SERVICE 9/$total ****************"
cd ${currentFolder}/services/payment/src/EShopOnAbp.PaymentService.HttpApi.Host
dotnet publish -c Release
docker build -f Dockerfile.local --force-rm -t "eshoponabp/service-payment:${IMAGE_TAG}" .
echo "**************** BUILDING ORDERING-SERVICE 11/$total ****************"
echo "**************** BUILDING ORDERING-SERVICE 10/$total ****************"
cd ${currentFolder}/services/ordering/src/EShopOnAbp.OrderingService.HttpApi.Host
dotnet publish -c Release
docker build -f Dockerfile.local --force-rm -t "eshoponabp/service-ordering:${IMAGE_TAG}" .
echo "**************** BUILDING CMSKIT-SERVICE 12/$total ****************"
echo "**************** BUILDING CMSKIT-SERVICE 11/$total ****************"
cd ${currentFolder}/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Host
dotnet publish -c Release
docker build -f Dockerfile.local --force-rm -t "eshoponabp/service-cmskit:${IMAGE_TAG}" .

22
build/build-images.ps1

@ -17,7 +17,7 @@ $paymentServiceFolder = Join-Path $slnFolder "services/payment/src/EShopOnAbp.Pa
$orderingServiceFolder = Join-Path $slnFolder "services/ordering/src/EShopOnAbp.OrderingService.HttpApi.Host"
$cmskitServiceFolder = Join-Path $slnFolder "services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Host"
$total = 12
$total = 11
Write-Host "===== BUILDING APPLICATIONS =====" -ForegroundColor Yellow
@ -27,56 +27,56 @@ Set-Location $webAppFolder
docker build -f "$webAppFolder/Dockerfile" -t eshoponabp/app-web:$version .
### PUBLIC-WEB
Write-Host "**************** BUILDING WEB-PUBLIC 3/$total ****************" -ForegroundColor Green
Write-Host "**************** BUILDING WEB-PUBLIC 2/$total ****************" -ForegroundColor Green
Set-Location $slnFolder
docker build -f "$publicWebFolder/Dockerfile" -t eshoponabp/app-publicweb:$version .
Write-Host "===== BUILDING GATEWAYS =====" -ForegroundColor Yellow
### WEB-GATEWAY
Write-Host "**************** BUILDING WEB-GATEWAY 4/$total ****************" -ForegroundColor Green
Write-Host "**************** BUILDING WEB-GATEWAY 3/$total ****************" -ForegroundColor Green
Set-Location $slnFolder
docker build -f "$webGatewayFolder/Dockerfile" -t eshoponabp/gateway-web:$version .
### PUBLICWEB-GATEWAY
Write-Host "**************** BUILDING WEB-PUBLIC-GATEWAY 5/$total ****************" -ForegroundColor Green
Write-Host "**************** BUILDING WEB-PUBLIC-GATEWAY 4/$total ****************" -ForegroundColor Green
Set-Location $slnFolder
docker build -f "$webPublicGatewayFolder/Dockerfile" -t eshoponabp/gateway-web-public:$version .
Write-Host "===== BUILDING MICROSERVICES =====" -ForegroundColor Yellow
### IDENTITY-SERVICE
Write-Host "**************** BUILDING IDENTITY-SERVICE 6/$total ****************" -ForegroundColor Green
Write-Host "**************** BUILDING IDENTITY-SERVICE 5/$total ****************" -ForegroundColor Green
Set-Location $slnFolder
docker build -f "$identityServiceFolder/Dockerfile" -t eshoponabp/service-identity:$version .
### ADMINISTRATION-SERVICE
Write-Host "**************** BUILDING ADMINISTRATION-SERVICE 7/$total ****************" -ForegroundColor Green
Write-Host "**************** BUILDING ADMINISTRATION-SERVICE 6/$total ****************" -ForegroundColor Green
Set-Location $slnFolder
docker build -f "$administrationServiceFolder/Dockerfile" -t eshoponabp/service-administration:$version .
### BASKET-SERVICE
Write-Host "**************** BUILDING BASKET-SERVICE 8/$total ****************" -ForegroundColor Green
Write-Host "**************** BUILDING BASKET-SERVICE 7/$total ****************" -ForegroundColor Green
Set-Location $slnFolder
docker build -f "$basketServiceFolder/Dockerfile" -t eshoponabp/service-basket:$version .
### CATALOG-SERVICE
Write-Host "**************** BUILDING CATALOG-SERVICE 9/$total ****************" -ForegroundColor Green
Write-Host "**************** BUILDING CATALOG-SERVICE 8/$total ****************" -ForegroundColor Green
Set-Location $slnFolder
docker build -f "$catalogServiceFolder/Dockerfile" -t eshoponabp/service-catalog:$version .
### PAYMENT-SERVICE
Write-Host "**************** BUILDING PAYMENT-SERVICE 10/$total ****************" -ForegroundColor Green
Write-Host "**************** BUILDING PAYMENT-SERVICE 9/$total ****************" -ForegroundColor Green
Set-Location $slnFolder
docker build -f "$paymentServiceFolder/Dockerfile" -t eshoponabp/service-payment:$version .
### ORDERING-SERVICE
Write-Host "**************** BUILDING ORDERING-SERVICE 11/$total ****************" -ForegroundColor Green
Write-Host "**************** BUILDING ORDERING-SERVICE 10/$total ****************" -ForegroundColor Green
Set-Location $slnFolder
docker build -f "$orderingServiceFolder/Dockerfile" -t eshoponabp/service-ordering:$version .
### CMSKIT-SERVICE
Write-Host "**************** BUILDING CMSKIT-SERVICE 12/$total ****************" -ForegroundColor Green
Write-Host "**************** BUILDING CMSKIT-SERVICE 11/$total ****************" -ForegroundColor Green
Set-Location $slnFolder
docker build -f "$cmskitServiceFolder/Dockerfile" -t eshoponabp/service-cmskit:$version .

22
build/build-images.sh

@ -1,7 +1,7 @@
#!/bin/bash
export IMAGE_TAG="latest"
export total=12
export total=11
cd ../
export currentFolder=`pwd`
cd build/
@ -11,51 +11,51 @@ cd ${currentFolder}/apps/angular
docker build --force-rm -t "eshoponabp/app-web:${IMAGE_TAG}" .
echo "*** BUILDING WEB-PUBLIC 3/$total ****************"
echo "*** BUILDING WEB-PUBLIC 2/$total ****************"
cd ${currentFolder}/apps/public-web/src/EShopOnAbp.PublicWeb
docker build --force-rm -t "eshoponabp/app-publicweb:${IMAGE_TAG}" .
echo "*** BUILDING WEB-GATEWAY 4/$total ****************"
echo "*** BUILDING WEB-GATEWAY 3/$total ****************"
cd ${currentFolder}/gateways/web/src/EShopOnAbp.WebGateway
docker build --force-rm -t "eshoponabp/gateway-web:${IMAGE_TAG}" .
echo "*** BUILDING WEB-PUBLIC-GATEWAY 5/$total ****************"
echo "*** BUILDING WEB-PUBLIC-GATEWAY 4/$total ****************"
cd ${currentFolder}/gateways/web-public/src/EShopOnAbp.WebPublicGateway
docker build --force-rm -t "eshoponabp/gateway-web-public:${IMAGE_TAG}" .
echo "*** BUILDING IDENTITY-SERVICE 6/$total ****************"
echo "*** BUILDING IDENTITY-SERVICE 5/$total ****************"
cd ${currentFolder}/services/identity/src/EShopOnAbp.IdentityService.HttpApi.Host
docker build --force-rm -t "eshoponabp/service-identity:${IMAGE_TAG}" .
echo "*** BUILDING ADMINISTRATION-SERVICE 7/$total ****************"
echo "*** BUILDING ADMINISTRATION-SERVICE 6/$total ****************"
cd ${currentFolder}/services/administration/src/EShopOnAbp.AdministrationService.HttpApi.Host
docker build --force-rm -t "eshoponabp/service-administration:${IMAGE_TAG}" .
echo "**************** BUILDING BASKET-SERVICE 8/$total ****************"
echo "**************** BUILDING BASKET-SERVICE 7/$total ****************"
cd ${currentFolder}/services/basket/src/EShopOnAbp.BasketService
docker build --force-rm -t "eshoponabp/service-basket:${IMAGE_TAG}" .
echo "**************** BUILDING CATALOG-SERVICE 9/$total ****************"
echo "**************** BUILDING CATALOG-SERVICE 8/$total ****************"
cd ${currentFolder}/services/catalog/src/EShopOnAbp.CatalogService.HttpApi.Host
docker build --force-rm -t "eshoponabp/service-catalog:${IMAGE_TAG}" .
echo "**************** BUILDING PAYMENT-SERVICE 10/$total ****************"
echo "**************** BUILDING PAYMENT-SERVICE 9/$total ****************"
cd ${currentFolder}/services/payment/src/EShopOnAbp.PaymentService.HttpApi.Host
docker build --force-rm -t "eshoponabp/service-payment:${IMAGE_TAG}" .
echo "**************** BUILDING ORDERING-SERVICE 11/$total ****************"
echo "**************** BUILDING ORDERING-SERVICE 10/$total ****************"
cd ${currentFolder}/services/ordering/src/EShopOnAbp.OrderingService.HttpApi.Host
docker build --force-rm -t "eshoponabp/service-ordering:${IMAGE_TAG}" .
echo "**************** BUILDING CMSKIT-SERVICE 12/$total ****************"
echo "**************** BUILDING CMSKIT-SERVICE 11/$total ****************"
cd ${currentFolder}/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Host
docker build --force-rm -t "eshoponabp/service-cmskit:${IMAGE_TAG}" .

31
build/publish-locally.ps1

@ -1,10 +1,9 @@
param ($version='1.0.0')
param ($version='2.0.0')
$currentFolder = $PSScriptRoot
$slnFolder = Join-Path $currentFolder "../"
# Apps
$webAppFolder = Join-Path $slnFolder "apps/angular"
$authserverFolder = Join-Path $slnFolder "apps/auth-server/src/EShopOnAbp.AuthServer"
$publicWebFolder = Join-Path $slnFolder "apps/public-web/src/EShopOnAbp.PublicWeb"
# Gateways
$webGatewayFolder = Join-Path $slnFolder "gateways/web/src/EShopOnAbp.WebGateway"
@ -18,7 +17,7 @@ $paymentServiceFolder = Join-Path $slnFolder "services/payment/src/EShopOnAbp.Pa
$orderingServiceFolder = Join-Path $slnFolder "services/ordering/src/EShopOnAbp.OrderingService.HttpApi.Host"
$cmskitServiceFolder = Join-Path $slnFolder "services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Host"
$total = 12
$total = 11
### Angular WEB App(WWW)
Write-Host "*** BUILDING WEB (WWW) 1/$total ****************" -ForegroundColor Green
@ -28,66 +27,60 @@ yarn
npm run build:prod
### AUTH-SERVER
Write-Host "*** BUILDING AUTH-SERVER 2/$total ****************" -ForegroundColor Green
Set-Location $authserverFolder
dotnet publish -c Release
### PUBLIC-WEB
Write-Host "*** BUILDING WEB-PUBLIC 3/$total ****************" -ForegroundColor Green
Write-Host "*** BUILDING WEB-PUBLIC 2/$total ****************" -ForegroundColor Green
Set-Location $publicWebFolder
dotnet publish -c Release
### WEB-GATEWAY
Write-Host "*** BUILDING WEB-GATEWAY 4/$total ****************" -ForegroundColor Green
Write-Host "*** BUILDING WEB-GATEWAY 3/$total ****************" -ForegroundColor Green
Set-Location $webGatewayFolder
dotnet publish -c Release
### PUBLICWEB-GATEWAY
Write-Host "*** BUILDING WEB-PUBLIC-GATEWAY 5/$total ****************" -ForegroundColor Green
Write-Host "*** BUILDING WEB-PUBLIC-GATEWAY 4/$total ****************" -ForegroundColor Green
Set-Location $webPublicGatewayFolder
dotnet publish -c Release
### IDENTITY-SERVICE
Write-Host "*** BUILDING IDENTITY-SERVICE 6/$total ****************" -ForegroundColor Green
Write-Host "*** BUILDING IDENTITY-SERVICE 5/$total ****************" -ForegroundColor Green
Set-Location $identityServiceFolder
dotnet publish -c Release
### ADMINISTRATION-SERVICE
Write-Host "*** BUILDING ADMINISTRATION-SERVICE 7/$total ****************" -ForegroundColor Green
Write-Host "*** BUILDING ADMINISTRATION-SERVICE 6/$total ****************" -ForegroundColor Green
Set-Location $administrationServiceFolder
dotnet publish -c Release
### BASKET-SERVICE
Write-Host "**************** BUILDING BASKET-SERVICE 8/$total ****************" -ForegroundColor Green
Write-Host "**************** BUILDING BASKET-SERVICE 7/$total ****************" -ForegroundColor Green
Set-Location $basketServiceFolder
dotnet publish -c Release
### CATALOG-SERVICE
Write-Host "**************** BUILDING CATALOG-SERVICE 9/$total ****************" -ForegroundColor Green
Write-Host "**************** BUILDING CATALOG-SERVICE 8/$total ****************" -ForegroundColor Green
Set-Location $catalogServiceFolder
dotnet publish -c Release
### PAYMENT-SERVICE
Write-Host "**************** BUILDING PAYMENT-SERVICE 10/$total ****************" -ForegroundColor Green
Write-Host "**************** BUILDING PAYMENT-SERVICE 9/$total ****************" -ForegroundColor Green
Set-Location $paymentServiceFolder
dotnet publish -c Release
### ORDERING-SERVICE
Write-Host "**************** BUILDING ORDERING-SERVICE 11/$total ****************" -ForegroundColor Green
Write-Host "**************** BUILDING ORDERING-SERVICE 10/$total ****************" -ForegroundColor Green
Set-Location $orderingServiceFolder
dotnet publish -c Release
### CMSKIT-SERVICE
Write-Host "**************** BUILDING CMSKIT-SERVICE 12/$total ****************" -ForegroundColor Green
Write-Host "**************** BUILDING CMSKIT-SERVICE 11/$total ****************" -ForegroundColor Green
Set-Location $cmskitServiceFolder
dotnet publish -c Release

Loading…
Cancel
Save