feat: add ops center and node onboarding flow
This commit is contained in:
@@ -59,6 +59,7 @@ Add-Type -AssemblyName System.IO.Compression.FileSystem
|
||||
$zip = [System.IO.Compression.ZipFile]::OpenRead($ZipPath)
|
||||
|
||||
$missingEntries = @()
|
||||
$expectsSmokeReport = $false
|
||||
try {
|
||||
$requiredEntries = @(
|
||||
"README_RELEASE.txt",
|
||||
@@ -66,18 +67,42 @@ try {
|
||||
"domain-api/README.md",
|
||||
"domain-web/README.md",
|
||||
"scripts/package_domain_release.ps1",
|
||||
"scripts/verify_domain_release.ps1",
|
||||
"scripts/package_domain_release.sh",
|
||||
"scripts/verify_domain_release.sh",
|
||||
"scripts/smoke_test_stack.ps1"
|
||||
)
|
||||
|
||||
$entryNames = $zip.Entries | ForEach-Object { $_.FullName.Replace('\', '/') }
|
||||
|
||||
$manifestEntry = $zip.Entries | Where-Object { $_.FullName.Replace('\', '/') -eq "release_manifest.json" } | Select-Object -First 1
|
||||
if ($manifestEntry) {
|
||||
$manifestStream = $manifestEntry.Open()
|
||||
$manifestReader = $null
|
||||
try {
|
||||
$manifestReader = New-Object System.IO.StreamReader($manifestStream)
|
||||
$manifestText = $manifestReader.ReadToEnd()
|
||||
$manifest = $manifestText | ConvertFrom-Json
|
||||
$smokeReport = [string]$manifest.smoke_test.report
|
||||
if (-not [string]::IsNullOrWhiteSpace($smokeReport)) {
|
||||
$expectsSmokeReport = $true
|
||||
}
|
||||
}
|
||||
finally {
|
||||
if ($manifestReader) {
|
||||
$manifestReader.Dispose()
|
||||
}
|
||||
$manifestStream.Dispose()
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($required in $requiredEntries) {
|
||||
if ($entryNames -notcontains $required) {
|
||||
$missingEntries += $required
|
||||
}
|
||||
}
|
||||
|
||||
if ($entryNames -notcontains "smoke_test_report.json") {
|
||||
if ($expectsSmokeReport -and ($entryNames -notcontains "smoke_test_report.json")) {
|
||||
$missingEntries += "smoke_test_report.json"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user