Sync eng/common directory with azure-sdk-tools for PR 4543 (#4071)
* stress test addons version check * cleanup Co-authored-by: Albert Cheng <albertcheng@microsoft.com>
This commit is contained in:
parent
7cc5f4628b
commit
214f4a364e
@ -36,6 +36,8 @@ function FindStressPackages(
|
|||||||
}
|
}
|
||||||
foreach ($chartFile in $chartFiles) {
|
foreach ($chartFile in $chartFiles) {
|
||||||
$chart = ParseChart $chartFile
|
$chart = ParseChart $chartFile
|
||||||
|
|
||||||
|
VerifyAddonsVersion $chart
|
||||||
if (matchesAnnotations $chart $filters) {
|
if (matchesAnnotations $chart $filters) {
|
||||||
$matrixFilePath = (Join-Path $chartFile.Directory.FullName $MatrixFileName)
|
$matrixFilePath = (Join-Path $chartFile.Directory.FullName $MatrixFileName)
|
||||||
if (Test-Path $matrixFilePath) {
|
if (Test-Path $matrixFilePath) {
|
||||||
@ -73,6 +75,15 @@ function MatchesAnnotations([hashtable]$chart, [hashtable]$filters) {
|
|||||||
return $true
|
return $true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function VerifyAddonsVersion([hashtable]$chart) {
|
||||||
|
foreach ($dependency in $chart.dependencies) {
|
||||||
|
if ($dependency.name -eq "stress-test-addons" -and
|
||||||
|
$dependency.version -lt "0.2.0") {
|
||||||
|
throw "The stress-test-addons version in use is $($dependency.version), please use versions >= 0.2.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function GetUsername() {
|
function GetUsername() {
|
||||||
# Check GITHUB_USER for users in codespaces environments, since the default user is `codespaces` and
|
# Check GITHUB_USER for users in codespaces environments, since the default user is `codespaces` and
|
||||||
# we would like to avoid namespace overlaps for different codespaces users.
|
# we would like to avoid namespace overlaps for different codespaces users.
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user