Skip to content

Commit

Permalink
Add git commit details to stress environment
Browse files Browse the repository at this point in the history
  • Loading branch information
benbp authored and azure-sdk committed Jan 18, 2024
1 parent 1e53997 commit 7bc54c6
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion eng/common/scripts/stress-testing/stress-test-deployment-lib.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,20 @@ 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"
)

Push-Location $pkg.Directory
$gitCommit = git rev-parse HEAD 2>&1
Pop-Location
if (!$LASTEXITCODE) {
$helmCommandArg += "--set", "GitCommit=$gitCommit"
}

if ($LockDeletionForDays) {
$date = (Get-Date).AddDays($LockDeletionForDays).ToUniversalTime()
Expand Down

0 comments on commit 7bc54c6

Please sign in to comment.