Skip to content

Commit 503f32e

Browse files
azure-sdkbenbp
andauthored
Add git commit details to stress environment (#33891)
Co-authored-by: Ben Broderick Phillips <[email protected]>
1 parent 57f22c8 commit 503f32e

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

eng/common/scripts/stress-testing/stress-test-deployment-lib.ps1

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,18 @@ function DeployStressPackage(
321321
$generatedConfigPath = Join-Path $pkg.Directory generatedValues.yaml
322322
$subCommand = $Template ? "template" : "upgrade"
323323
$subCommandFlag = $Template ? "--debug" : "--install"
324-
$helmCommandArg = "helm", $subCommand, $releaseName, $pkg.Directory, "-n", $pkg.Namespace, $subCommandFlag, "--values", $generatedConfigPath, "--set", "stress-test-addons.env=$environment"
324+
$helmCommandArg = @(
325+
"helm", $subCommand, $releaseName, $pkg.Directory,
326+
"-n", $pkg.Namespace,
327+
$subCommandFlag,
328+
"--values", $generatedConfigPath,
329+
"--set", "stress-test-addons.env=$environment"
330+
)
331+
332+
$gitCommit = git -C $pkg.Directory rev-parse HEAD 2>&1
333+
if (!$LASTEXITCODE) {
334+
$helmCommandArg += "--set", "GitCommit=$gitCommit"
335+
}
325336

326337
if ($LockDeletionForDays) {
327338
$date = (Get-Date).AddDays($LockDeletionForDays).ToUniversalTime()

0 commit comments

Comments
 (0)