Add git commit details to stress environment (#5280)

Co-authored-by: Ben Broderick Phillips <bebroder@microsoft.com>
This commit is contained in:
Azure SDK Bot 2024-01-18 13:56:19 -08:00 committed by GitHub
parent f109f63f4e
commit b1796ab919
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -321,7 +321,18 @@ function DeployStressPackage(
$generatedConfigPath = Join-Path $pkg.Directory generatedValues.yaml
$subCommand = $Template ? "template" : "upgrade"
$subCommandFlag = $Template ? "--debug" : "--install"
$helmCommandArg = "helm", $subCommand, $releaseName, $pkg.Directory, "-n", $pkg.Namespace, $subCommandFlag, "--values", $generatedConfigPath, "--set", "stress-test-addons.env=$environment"
$helmCommandArg = @(
"helm", $subCommand, $releaseName, $pkg.Directory,
"-n", $pkg.Namespace,
$subCommandFlag,
"--values", $generatedConfigPath,
"--set", "stress-test-addons.env=$environment"
)
$gitCommit = git -C $pkg.Directory rev-parse HEAD 2>&1
if (!$LASTEXITCODE) {
$helmCommandArg += "--set", "GitCommit=$gitCommit"
}
if ($LockDeletionForDays) {
$date = (Get-Date).AddDays($LockDeletionForDays).ToUniversalTime()