Skip to content

Commit

Permalink
Rename e2e job names to ci- for consistency
Browse files Browse the repository at this point in the history
Signed-off-by: shiva kumar <[email protected]>
  • Loading branch information
shivakunv committed Jan 7, 2025
1 parent 07e9ca3 commit b1afa7e
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions tests/aws_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ package e2e

import (
"context"
"fmt"
"os"
"path/filepath"

Expand All @@ -29,9 +30,21 @@ import (
"github.com/NVIDIA/holodeck/pkg/jyaml"
"github.com/NVIDIA/holodeck/pkg/provider"
"github.com/NVIDIA/holodeck/pkg/provisioner"
"github.com/NVIDIA/holodeck/tests/common"
)

func getName() string {
sha := os.Getenv("GITHUB_SHA")
attempt := os.Getenv("GITHUB_RUN_ATTEMPT")
// short sha
if len(sha) > 8 {
sha = sha[:8]
}
// uid is unique for each run
uid := common.GenerateUID()

return fmt.Sprintf("ci%s-%s-%s", attempt, sha, uid)
}

// Actual test suite
var _ = Describe("AWS", func() {
type options struct {
Expand All @@ -56,7 +69,7 @@ var _ = Describe("AWS", func() {
Expect(err).ToNot(HaveOccurred())

// Set unique name for the environment
opts.cfg.Name = opts.cfg.Name + "-" + common.GenerateUID()
opts.cfg.Name = getName()
// set cache path
opts.cachePath = LogArtifactDir
// set cache file
Expand Down

0 comments on commit b1afa7e

Please sign in to comment.