Browse Source

Added version parameter to the images

pull/55/head
Halil İbrahim Kalkan 5 years ago
parent
commit
25fd8ed521
  1. 37
      etc/azure/scripts/push-images.ps1
  2. 16
      etc/k8s/scripts/build-images.ps1

37
etc/azure/scripts/push-images.ps1

@ -1,22 +1,31 @@
param ($version='latest')
az acr login --name volocr az acr login --name volocr
docker tag eventhub.dbmigrator:latest volocr.azurecr.io/eventhub.dbmigrator:latest docker tag eventhub.dbmigrator:$version volocr.azurecr.io/eventhub.dbmigrator:$version
docker push volocr.azurecr.io/eventhub.dbmigrator:latest docker push volocr.azurecr.io/eventhub.dbmigrator:$version
docker tag volocr.azurecr.io/eventhub.dbmigrator:$version volocr.azurecr.io/eventhub.dbmigrator:latest
docker tag eventhub.www:latest volocr.azurecr.io/eventhub.www:latest docker tag eventhub.www:$version volocr.azurecr.io/eventhub.www:$version
docker push volocr.azurecr.io/eventhub.www:latest docker push volocr.azurecr.io/eventhub.www:$version
docker tag volocr.azurecr.io/eventhub.www:$version volocr.azurecr.io/eventhub.www:latest
docker tag eventhub.api:latest volocr.azurecr.io/eventhub.api:latest docker tag eventhub.api:$version volocr.azurecr.io/eventhub.api:$version
docker push volocr.azurecr.io/eventhub.api:latest docker push volocr.azurecr.io/eventhub.api:$version
docker tag volocr.azurecr.io/eventhub.api:$version volocr.azurecr.io/eventhub.api:latest
docker tag eventhub.admin:latest volocr.azurecr.io/eventhub.admin:latest docker tag eventhub.admin:$version volocr.azurecr.io/eventhub.admin:$version
docker push volocr.azurecr.io/eventhub.admin:latest docker push volocr.azurecr.io/eventhub.admin:$version
docker tag volocr.azurecr.io/eventhub.admin:$version volocr.azurecr.io/eventhub.admin:latest
docker tag eventhub.admin-api:latest volocr.azurecr.io/eventhub.admin-api:latest docker tag eventhub.admin-api:$version volocr.azurecr.io/eventhub.admin-api:$version
docker push volocr.azurecr.io/eventhub.admin-api:latest docker push volocr.azurecr.io/eventhub.admin-api:$version
docker tag volocr.azurecr.io/eventhub.admin-api:$version volocr.azurecr.io/eventhub.admin-api:latest
docker tag eventhub.account:latest volocr.azurecr.io/eventhub.account:latest docker tag eventhub.account:$version volocr.azurecr.io/eventhub.account:$version
docker push volocr.azurecr.io/eventhub.account:latest docker push volocr.azurecr.io/eventhub.account:$version
docker tag volocr.azurecr.io/eventhub.account:$version volocr.azurecr.io/eventhub.account:latest
docker tag eventhub.background-services:latest volocr.azurecr.io/eventhub.background-services:latest docker tag eventhub.background-services:$version volocr.azurecr.io/eventhub.background-services:$version
docker push volocr.azurecr.io/eventhub.background-services:latest docker push volocr.azurecr.io/eventhub.background-services:$version
docker tag volocr.azurecr.io/eventhub.background-services:$version volocr.azurecr.io/eventhub.background-services:latest

16
etc/k8s/scripts/build-images.ps1

@ -1,3 +1,5 @@
param ($version='latest')
$currentFolder = $PSScriptRoot $currentFolder = $PSScriptRoot
$slnFolder = Join-Path $currentFolder "../../../" $slnFolder = Join-Path $currentFolder "../../../"
$dbmigratorFolder = Join-Path $slnFolder "src/EventHub.DbMigrator" $dbmigratorFolder = Join-Path $slnFolder "src/EventHub.DbMigrator"
@ -13,49 +15,49 @@ $backgroundServicesFolder = Join-Path $slnFolder "src/EventHub.BackgroundService
Write-Host "*** BUILDING DB MIGRATOR ****************" -ForegroundColor Green Write-Host "*** BUILDING DB MIGRATOR ****************" -ForegroundColor Green
Set-Location $dbmigratorFolder Set-Location $dbmigratorFolder
dotnet publish -c Release dotnet publish -c Release
docker build -t eventhub.dbmigrator . docker build -t eventhub.dbmigrator:$version .
### WEB (WWW) ### WEB (WWW)
Write-Host "*** BUILDING WEB (WWW) ****************" -ForegroundColor Green Write-Host "*** BUILDING WEB (WWW) ****************" -ForegroundColor Green
Set-Location $webFolder Set-Location $webFolder
dotnet publish -c Release dotnet publish -c Release
docker build -t eventhub.www . docker build -t eventhub.www:$version .
### API ### API
Write-Host "*** BUILDING API ****************" -ForegroundColor Green Write-Host "*** BUILDING API ****************" -ForegroundColor Green
Set-Location $apiFolder Set-Location $apiFolder
dotnet publish -c Release dotnet publish -c Release
docker build -t eventhub.api . docker build -t eventhub.api:$version .
### ADMIN (BLAZOR) ### ADMIN (BLAZOR)
Write-Host "*** BUILDING ADMIN (BLAZOR) ****************" -ForegroundColor Green Write-Host "*** BUILDING ADMIN (BLAZOR) ****************" -ForegroundColor Green
Set-Location $adminFolder Set-Location $adminFolder
dotnet publish -c Release dotnet publish -c Release
docker build -t eventhub.admin . docker build -t eventhub.admin:$version .
### ADMIN API ### ADMIN API
Write-Host "*** BUILDING ADMIN API ****************" -ForegroundColor Green Write-Host "*** BUILDING ADMIN API ****************" -ForegroundColor Green
Set-Location $adminApiFolder Set-Location $adminApiFolder
dotnet publish -c Release dotnet publish -c Release
docker build -t eventhub.admin-api . docker build -t eventhub.admin-api:$version .
### IDENTITY SERVER (ACCOUNT) ### IDENTITY SERVER (ACCOUNT)
Write-Host "*** BUILDING IDENTITY SERVER (ACCOUNT) ****************" -ForegroundColor Green Write-Host "*** BUILDING IDENTITY SERVER (ACCOUNT) ****************" -ForegroundColor Green
Set-Location $identityServerFolder Set-Location $identityServerFolder
dotnet publish -c Release dotnet publish -c Release
docker build -t eventhub.account . docker build -t eventhub.account:$version .
### BACKGROUND SERVICES ### BACKGROUND SERVICES
Write-Host "*** BUILDING BACKGROUND SERVICES ****************" -ForegroundColor Green Write-Host "*** BUILDING BACKGROUND SERVICES ****************" -ForegroundColor Green
Set-Location $backgroundServicesFolder Set-Location $backgroundServicesFolder
dotnet publish -c Release dotnet publish -c Release
docker build -t eventhub.background-services . docker build -t eventhub.background-services:$version .
### ALL COMPLETED ### ALL COMPLETED

Loading…
Cancel
Save