Skip to content

Commit 0eb4f1c

Browse files
authored
Add EOL and DistributionState metadata for each image (#629)
1 parent 7370f2f commit 0eb4f1c

File tree

72 files changed

+325
-103
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+325
-103
lines changed

Diff for: .vscode/launch.json

+25-2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,15 @@
44
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
55
"version": "0.2.0",
66
"configurations": [
7+
{
8+
"name": "PowerShell: Build Unit Tests",
9+
"type": "PowerShell",
10+
"request": "launch",
11+
"script": "Invoke-Pester",
12+
"cwd": "${workspaceFolder}/unittests",
13+
"args": [
14+
]
15+
},
716
{
817
"name": "PowerShell: Build LTS Ubuntu 16.04",
918
"type": "PowerShell",
@@ -13,9 +22,9 @@
1322
"args": [
1423
"-build",
1524
"-Channel",
16-
"lts",
25+
"preview",
1726
"-name",
18-
"ubuntu16.04"
27+
"mariner1"
1928
]
2029
},
2130
{
@@ -33,6 +42,20 @@
3342
"-format",
3443
"JSON"
3544
]
45+
},
46+
{
47+
"name": "PowerShell: check for dups",
48+
"type": "PowerShell",
49+
"request": "launch",
50+
"script": "${workspaceFolder}/build.ps1",
51+
"cwd": "${workspaceFolder}",
52+
"args": [
53+
"-CheckForDuplicateTags",
54+
"-Channel",
55+
"preview,",
56+
"stable,",
57+
"lts"
58+
]
3659
}
3760
]
3861

Diff for: build.ps1

+31-19
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ param(
3434
[switch]
3535
$GenerateMatrixJson,
3636

37+
[Parameter(ParameterSetName="GenerateMatrixJson")]
38+
[switch]
39+
$FullJson,
40+
3741
[Parameter(Mandatory, ParameterSetName="GenerateManifestLists")]
3842
[switch]
3943
$GenerateManifestLists,
@@ -219,7 +223,10 @@ DynamicParam {
219223
}
220224

221225
Begin {
222-
$ENV:DOCKER_BUILDKIT=1
226+
if (!$IsWindows) {
227+
$ENV:DOCKER_BUILDKIT = 1
228+
}
229+
223230
if ($PSCmdlet.ParameterSetName -notin 'GenerateMatrixJson', 'GenerateTagsYaml', 'DupeCheckAll', 'GenerateManifestLists' -and $Channel.Count -gt 1)
224231
{
225232
throw "Multiple Channels are not supported in this parameter set"
@@ -242,6 +249,7 @@ End {
242249
$tagGroups = @{}
243250
$dupeCheckTable = @{}
244251
$dupeTagIssues = @()
252+
$fullMatrix = @{}
245253

246254
$toBuild = @()
247255
foreach ($actualChannel in $Channels) {
@@ -440,6 +448,8 @@ End {
440448
UseAcr = $UseAcr
441449
ContinueOnError = $continueOnError
442450
ManifestLists = $manifestLists
451+
EndOfLife = $allMeta.meta.EndOfLife
452+
DistributionState = $allMeta.meta.GetDistributionState().ToString()
443453
}
444454

445455
$tagGroups[$tagGroup] += $tag
@@ -463,7 +473,6 @@ End {
463473
$testArgPath = Join-Path -Path $testsPath -ChildPath 'testArgs.json'
464474
$testArgList | ConvertTo-Json -Depth 2 | Out-File -FilePath $testArgPath
465475

466-
Write-Verbose "Launching pester..." -Verbose
467476
$extraParams = @{}
468477
if($Test.IsPresent)
469478
{
@@ -495,17 +504,7 @@ End {
495504
$extraParams.Add('Tags', $tags)
496505
}
497506

498-
if(!(Get-Module -ListAvailable pester -ErrorAction Ignore) -or $ForcePesterInstall.IsPresent)
499-
{
500-
Install-module Pester -Scope CurrentUser -Force -MaximumVersion 4.99
501-
}
502-
503-
Write-Verbose -Message "logging to $logPath" -Verbose
504-
$results = Invoke-Pester -Script $testsPath -OutputFile $logPath -PassThru -OutputFormat NUnitXml @extraParams
505-
if(!$results -or $results.FailedCount -gt 0 -or !$results.TotalCount)
506-
{
507-
throw "Build or tests failed. Passed: $($results.PassedCount) Failed: $($results.FailedCount) Total: $($results.TotalCount)"
508-
}
507+
Invoke-PesterWrapper -Script $testsPath -OutputFile $logPath -ExtraParams $extraParams
509508
}
510509

511510
# print local image names
@@ -579,10 +578,13 @@ End {
579578
$jobName = $tag.Name -replace '-', '_'
580579
if (-not $matrix.$channelName[$osName].ContainsKey($jobName) -and -not $tag.ContinueOnError) {
581580
$matrix.$channelName[$osName].Add($jobName, @{
582-
Channel = $tag.Channel
583-
ImageName = $tag.Name
584-
JobName = $jobName
585-
ContinueOnError = $tag.ContinueOnError
581+
Channel = $tag.Channel
582+
ImageName = $tag.Name
583+
JobName = $jobName
584+
ContinueOnError = $tag.ContinueOnError
585+
EndOfLife = $tag.EndOfLife
586+
DistributionState = $tag.DistributionState
587+
OsVersion = $tag.OsVersion
586588
})
587589
}
588590
}
@@ -591,15 +593,25 @@ End {
591593
}
592594

593595
foreach ($channelName in $matrix.Keys) {
596+
$fullMatrix[$channelName] = @()
594597
foreach ($osName in $matrix.$channelName.Keys) {
595598
$osMatrix = $matrix.$channelName.$osName
599+
$fullMatrix[$channelName] += $osMatrix.Values
596600
$matrixJson = $osMatrix | ConvertTo-Json -Compress
597601
$variableName = "matrix_${channelName}_${osName}"
598602
$command = "vso[task.setvariable variable=$variableName;isoutput=true]$($matrixJson)"
599-
Write-Verbose "sending command: '$command'"
600-
Write-Host "##$command"
603+
if (!$FullJson) {
604+
Set-Item -Path ENV:$VariableName -Value $matrixJson
605+
Write-Verbose "sending command: '$command'"
606+
Write-Host "##$command"
607+
}
601608
}
602609
}
610+
611+
if($FullJson) {
612+
$matrixJson = $fullMatrix | ConvertTo-Json -Depth 100
613+
Write-Output $matrixJson
614+
}
603615
}
604616

605617
if ($GenerateManifestLists.IsPresent) {

Diff for: release/7-1/debian11/meta.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"IsLinux" : true,
33
"UseLinuxVersion" : false,
44
"PackageFormat": "powershell-${PS_VERSION}-linux-x64.tar.gz",
5-
"osVersion": "Debian 11 (Testing)",
5+
"osVersion": "Debian 11",
66
"SkipGssNtlmSspTests": false,
77
"tagTemplates": [
88
"#psversion#-debian-#shorttag#",

Diff for: release/lts/arm32v7/meta.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,7 @@
1515
"TestProperties": {
1616
"size": 550,
1717
"Arm32": true
18-
}
18+
},
19+
"EndOfLife": "2023-04-02",
20+
"DistributionState": "Validated"
1921
}

Diff for: release/lts/centos7/meta.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,7 @@
1212
"SubImage": "test-deps",
1313
"TestProperties": {
1414
"size": 585
15-
}
15+
},
16+
"EndOfLife": "2020-08-06",
17+
"DistributionState": "Validated"
1618
}

Diff for: release/lts/debian10/meta.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,8 @@
1414
"SubImage": "test-deps",
1515
"TestProperties": {
1616
"size": 314
17-
}
17+
},
18+
"EndOfLife": "2024-06-01",
19+
"DistributionState": "Validated"
1820
}
21+

Diff for: release/lts/debian11/meta.json

+4-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"IsLinux" : true,
33
"UseLinuxVersion" : false,
44
"PackageFormat": "powershell-${PS_VERSION}-linux-x64.tar.gz",
5-
"osVersion": "Debian 11 (Testing)",
5+
"osVersion": "Debian 11",
66
"SkipGssNtlmSspTests": false,
77
"tagTemplates": [
88
"lts-debian-#shorttag#"
@@ -14,6 +14,8 @@
1414
"SubImage": "test-deps",
1515
"TestProperties": {
1616
"size": 314
17-
}
17+
},
18+
"EndOfLife": "2024-11-30",
19+
"DistributionState": "Validated"
1820
}
1921

Diff for: release/lts/nanoserver1809/meta.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,7 @@
1717
"TestProperties": {
1818
"size": 1
1919
},
20-
"UseAcr": true
20+
"UseAcr": true,
21+
"EndOfLife": "2024-01-09",
22+
"DistributionState": "Validated"
2123
}

Diff for: release/lts/nanoserver1909/meta.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,7 @@
1717
"TestProperties": {
1818
"size": 1
1919
},
20-
"UseAcr": true
20+
"UseAcr": true,
21+
"EndOfLife": "2021-05-11",
22+
"DistributionState": "Validated"
2123
}

Diff for: release/lts/nanoserver2004/meta.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,7 @@
1717
"TestProperties": {
1818
"size": 1
1919
},
20-
"UseAcr": true
20+
"UseAcr": true,
21+
"EndOfLife": "2021-12-14",
22+
"DistributionState": "Validated"
2123
}

Diff for: release/lts/nanoserver2022/meta.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,7 @@
1717
"TestProperties": {
1818
"size": 1
1919
},
20-
"UseAcr": true
20+
"UseAcr": true,
21+
"EndOfLife": "2024-11-30",
22+
"DistributionState": "Validated"
2123
}

Diff for: release/lts/nanoserver20H2/meta.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,6 @@
1515
"size": 1
1616
},
1717
"UseAcr": true,
18-
"IsBroken": false
18+
"EndOfLife": "2022-05-10",
19+
"DistributionState": "Validated"
1920
}

Diff for: release/lts/ubuntu16.04/meta.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,7 @@
1414
"TestProperties": {
1515
"size": 395
1616
},
17-
"SubImage": "test-deps"
17+
"SubImage": "test-deps",
18+
"EndOfLife": "2021-04-02",
19+
"DistributionState": "Validated"
1820
}

Diff for: release/lts/ubuntu18.04/meta.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,7 @@
1717
"TestProperties": {
1818
"size": 355
1919
},
20-
"SubImage": "test-deps"
20+
"SubImage": "test-deps",
21+
"EndOfLife": "2023-04-02",
22+
"DistributionState": "Validated"
2123
}

Diff for: release/lts/windowsserver2022/meta.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,7 @@
1717
"TestProperties": {
1818
"size": 1
1919
},
20-
"UseAcr": true
20+
"UseAcr": true,
21+
"EndOfLife": "2024-11-30",
22+
"DistributionState": "Validated"
2123
}

Diff for: release/lts/windowsservercore1909/meta.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,7 @@
1717
"TestProperties": {
1818
"size": 1
1919
},
20-
"UseAcr": true
20+
"UseAcr": true,
21+
"EndOfLife": "2021-05-11",
22+
"DistributionState": "Validated"
2123
}

Diff for: release/lts/windowsservercore2004/meta.json

+6-4
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,13 @@
1111
"tagTemplates": [
1212
"lts-windowsservercore-#shorttag#"
1313
],
14-
"TestProperties": {
15-
"size": 1
16-
},
1714
"manifestLists": [
1815
"lts"
1916
],
20-
"UseAcr": true
17+
"TestProperties": {
18+
"size": 1
19+
},
20+
"UseAcr": true,
21+
"EndOfLife": "2021-12-14",
22+
"DistributionState": "Validated"
2123
}

Diff for: release/lts/windowsservercore2022/meta.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,7 @@
1717
"TestProperties": {
1818
"size": 1
1919
},
20-
"UseAcr": true
20+
"UseAcr": true,
21+
"EndOfLife": "2024-11-30",
22+
"DistributionState": "Validated"
2123
}

Diff for: release/lts/windowsservercore20H2/meta.json

+2
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,6 @@
1515
"size": 1
1616
},
1717
"UseAcr": true,
18+
"EndOfLife": "2022-05-10",
19+
"DistributionState": "Validated"
1820
}

Diff for: release/preview/alpine312/meta.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,7 @@
1313
"SubImage": "test-deps",
1414
"TestProperties": {
1515
"size": 230
16-
}
16+
},
17+
"EndOfLife": "2022-05-01",
18+
"DistributionState": "Validated"
1719
}

Diff for: release/preview/alpine313/meta.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,7 @@
1313
"SubImage": "test-deps",
1414
"TestProperties": {
1515
"size": 221
16-
}
16+
},
17+
"EndOfLife": "2022-11-01",
18+
"DistributionState": "Validated"
1719
}

Diff for: release/preview/alpine314/meta.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,7 @@
1313
"SubImage": "test-deps",
1414
"TestProperties": {
1515
"size": 221
16-
}
16+
},
17+
"EndOfLife": "2023-05-01",
18+
"DistributionState": "Validated"
1719
}

Diff for: release/preview/arm32v7/meta.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,7 @@
1616
"TestProperties": {
1717
"size": 550,
1818
"Arm32": true
19-
}
19+
},
20+
"EndOfLife": "2023-04-02",
21+
"DistributionState": "Validated"
2022
}

Diff for: release/preview/centos7/meta.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,7 @@
1212
"SubImage": "test-deps",
1313
"TestProperties": {
1414
"size": 586
15-
}
15+
},
16+
"EndOfLife": "2020-08-06",
17+
"DistributionState": "Validated"
1618
}

Diff for: release/preview/debian10/meta.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
"SubImage": "test-deps",
1515
"TestProperties": {
1616
"size": 314
17-
}
17+
},
18+
"EndOfLife": "2023-12-15",
19+
"DistributionState": "Validated"
1820
}
1921

0 commit comments

Comments
 (0)