You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
1.4 KiB

  1. Param(
  2. [parameter(Mandatory=$true)][string]$registry
  3. )
  4. if ([String]::IsNullOrEmpty($registry)) {
  5. Write-Host "Registry must be set to docker registry to use" -ForegroundColor Red
  6. exit 1
  7. }
  8. Write-Host "This script creates the local manifests, for pushing the multi-arch manifests" -ForegroundColor Yellow
  9. Write-Host "Tags used are linux-master, win-master, linux-dev, win-dev, linux-latest, win-latest" -ForegroundColor Yellow
  10. Write-Host "Multiarch images tags will be master, dev, latest" -ForegroundColor Yellow
  11. $services = "identity.api", "basket.api", "catalog.api", "ordering.api", "ordering.backgroundtasks", "marketing.api", "payment.api", "locations.api", "webhooks.api", "ocelotapigw", "mobileshoppingagg", "webshoppingagg", "ordering.signalrhub", "webstatus", "webspa", "webmvc", "webhooks.client"
  12. foreach ($svc in $services) {
  13. Write-Host "Creating manifest for $svc and tags :latest, :master, and :dev"
  14. docker manifest create $registry/${svc}:master $registry/${svc}:linux-master $registry/${svc}:win-master
  15. docker manifest create $registry/${svc}:dev $registry/${svc}:linux-dev $registry/${svc}:win-dev
  16. docker manifest create $registry/${svc}:latest $registry/${svc}:linux-latest $registry/${svc}:win-latest
  17. Write-Host "Pushing manifest for $svc and tags :latest, :master, and :dev"
  18. docker manifest push $registry/${svc}:latest
  19. docker manifest push $registry/${svc}:dev
  20. docker manifest push $registry/${svc}:master
  21. }