This commit is contained in:
freddyk 2020-12-14 11:40:54 +01:00
Родитель 01f60a25f7
Коммит c4835880da
3 изменённых файлов: 76 добавлений и 121 удалений

Просмотреть файл

@ -1,2 +1,2 @@
$genericTag = "1.0.1.0"
$genericTag = "1.0.1.1"
$created = [DateTime]::Now.ToUniversalTime().ToString("yyyyMMddHHmm")

Просмотреть файл

@ -2,13 +2,21 @@
. (Join-Path $RootPath "settings.ps1")
function Head($text) {
try {
$s = (New-Object System.Net.WebClient).DownloadString("http://artii.herokuapp.com/make?text=$text")
} catch {
$s = $text
}
Write-Host -ForegroundColor Yellow $s
}
$push = $true
$supported = @(
"10.0.19042.0"
"10.0.19041.0"
"10.0.18363.0"
"10.0.18362.0"
"10.0.17763.0"
"10.0.14393.0"
)
@ -18,26 +26,42 @@ $servercoretags = (get-navcontainerimagetags -imageName "mcr.microsoft.com/windo
Sort-Object -Descending { [Version]$_ } |
Group-Object { [Version]"$(([Version]$_).Major).$(([Version]$_).Minor).$(([Version]$_).Build).0" } | % { if ($supported.contains($_.Name)) { $_.Group[0] } }
Write-Host -ForegroundColor Yellow "Latest Servercore tags:"
$servercoretags
$allbctags = (get-navcontainerimagetags -imageName "mcr.microsoft.com/businesscentral").tags |
Where-Object { [Version]::TryParse($_, [ref] $ver) }
$bctags = $allbctags | Sort-Object -Descending { [Version]$_ } |
Group-Object { [Version]"$(([Version]$_).Major).$(([Version]$_).Minor).$(([Version]$_).Build).0" } | % { if ($supported.contains($_.Name)) { $_.Group[0] } }
Write-Host -ForegroundColor Yellow "Latest BusinessCentral tags:"
$bctags
$basetags = (get-navcontainerimagetags -imageName "mcr.microsoft.com/dotnet/framework/runtime").tags |
Where-Object { $_.StartsWith('4.8-20') } |
Where-Object { $_ -like '4.8-20*' -and $_ -notlike '*-2009' -and $_ -notlike '*-1903'} |
Sort-Object -Descending
$basetags
$basetags = @(
"4.8-windowsservercore-20H2"
"4.8-windowsservercore-2004"
"4.8-windowsservercore-1909"
"4.8-windowsservercore-ltsc2019"
"4.8-windowsservercore-ltsc2016"
)
#throw "go?"
#throw "start?"
$start = 0
$start..($basetags.count-1) | % {
$tag = $basetags[$_]
$dt = $tag.SubString(4,8)
$os = $tag.SubString($tag.LastIndexOf('-')+1)
Write-Host "$dt $os"
Head "$os"
$baseimage = "mcr.microsoft.com/dotnet/framework/runtime:$tag"
$image = "$dt-generic:$os"
$image = "generic:$os"
docker pull $baseimage
$osversion = docker inspect --format "{{.OsVersion}}" $baseImage
@ -49,6 +73,10 @@ $start..($basetags.count-1) | % {
}
}
if ($allbctags -notcontains $osversion) {
head $osversion
$isolation = "hyperv"
docker build --build-arg baseimage=$baseimage `
@ -81,6 +109,6 @@ $start..($basetags.count-1) | % {
docker rmi $_
}
docker rmi $image
docker rmi $baseimage
}
}
}

Просмотреть файл

@ -16,95 +16,19 @@ $testImages = $false
$pushto = @()
$pushto = @("dev")
#$pushto = @("prod")
#$pushto = @("dev","prod")
#$pushto += @("prod")
$tags = @(
"10.0.14393.2906-1.0.0.0"
"10.0.14393.2972-1.0.0.0"
"10.0.14393.3025-1.0.0.0"
"10.0.14393.3085-1.0.0.0"
"10.0.14393.3144-1.0.0.0"
"10.0.14393.3204-1.0.0.0"
"10.0.14393.3326-1.0.0.0"
"10.0.14393.3384-1.0.0.0"
"10.0.14393.3443-1.0.0.0"
"10.0.14393.3630-1.0.0.0"
"10.0.14393.3750-1.0.0.0"
"10.0.14393.3808-1.0.0.0"
"10.0.14393.3866-1.0.0.0"
"10.0.14393.3930-1.0.0.0"
"10.0.14393.3986-1.0.0.0"
"10.0.14393.4046-1.0.0.0"
"10.0.17134.1006-1.0.0.0"
"10.0.17134.1130-1.0.0.0"
"10.0.17134.706-1.0.0.0"
"10.0.17134.766-1.0.0.0"
"10.0.17134.829-1.0.0.0"
"10.0.17134.885-1.0.0.0"
"10.0.17134.950-1.0.0.0"
"10.0.17763.1158-1.0.0.0"
"10.0.17763.1282-1.0.0.0"
"10.0.17763.1339-1.0.0.0"
"10.0.17763.1397-1.0.0.0"
"10.0.17763.1457-1.0.0.0"
"10.0.17763.1518-1.0.0.0"
"10.0.17763.1577-1.0.0.0"
"10.0.17763.437-1.0.0.0"
"10.0.17763.504-1.0.0.0"
"10.0.17763.557-1.0.0.0"
"10.0.17763.615-1.0.0.0"
"10.0.17763.678-1.0.0.0"
"10.0.17763.737-1.0.0.0"
"10.0.17763.864-1.0.0.0"
"10.0.17763.914-1.0.0.0"
"10.0.17763.973-1.0.0.0"
"10.0.18362.1016-1.0.0.0"
"10.0.18362.1082-1.0.0.0"
"10.0.18362.1139-1.0.0.0"
"10.0.18362.116-1.0.0.0"
"10.0.18362.1198-1.0.0.0"
"10.0.18362.175-1.0.0.0"
"10.0.18362.239-1.0.0.0"
"10.0.18362.295-1.0.0.0"
"10.0.18362.356-1.0.0.0"
"10.0.18362.476-1.0.0.0"
"10.0.18362.535-1.0.0.0"
"10.0.18362.592-1.0.0.0"
"10.0.18362.658-1.0.0.0"
"10.0.18362.778-1.0.0.0"
"10.0.18362.900-1.0.0.0"
"10.0.18362.959-1.0.0.0"
"10.0.18363.1016-1.0.0.0"
"10.0.18363.1082-1.0.0.0"
"10.0.18363.1139-1.0.0.0"
"10.0.18363.1198-1.0.0.0"
"10.0.18363.476-1.0.0.0"
"10.0.18363.535-1.0.0.0"
"10.0.18363.592-1.0.0.0"
"10.0.18363.658-1.0.0.0"
"10.0.18363.778-1.0.0.0"
"10.0.18363.900-1.0.0.0"
"10.0.18363.959-1.0.0.0"
"10.0.19041.329-1.0.0.0"
"10.0.19041.388-1.0.0.0"
"10.0.19041.450-1.0.0.0"
"10.0.19041.508-1.0.0.0"
"10.0.19041.572-1.0.0.0"
"10.0.19041.630-1.0.0.0"
"10.0.19042.572-1.0.0.0"
"10.0.19042.630-1.0.0.0"
)
$ver = [Version]"10.0.0.0"
$tags = (get-navcontainerimagetags -imageName "mcr.microsoft.com/businesscentral").tags |
Where-Object { [Version]::TryParse($_, [ref] $ver) }
[Array]::Reverse($tags)
$oldGenericTag = "1.0.0.1"
$oldGenericTag = "1.0.1.0"
$tags | % {
$tag = $_
$osversion = $tag.Substring(0,$tag.IndexOf('-'))
$image = "my:$osversion-$oldGenericTag"
$image = "my:$tag-$oldGenericTag"
docker images --format "{{.Repository}}:{{.Tag}}" | % {
if ($_ -eq $image)
@ -114,6 +38,7 @@ $tags | % {
}
}
# Pull all
$tags | % {
$tag = $_
head $tag
@ -121,6 +46,8 @@ $tags | % {
docker pull $image
}
docker system prune --force
throw "go!"
$tags | % {