Skip to content

Commit

Permalink
unused aws instace and vpcs cleanup
Browse files Browse the repository at this point in the history
Signed-off-by: shiva kumar <[email protected]>
  • Loading branch information
shivakunv committed Dec 19, 2024
1 parent 6a9451e commit 7150b7d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
2 changes: 0 additions & 2 deletions tests/aws_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ 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"
)

// Actual test suite
Expand Down Expand Up @@ -58,7 +57,6 @@ var _ = Describe("AWS", func() {
// Set unique name for the environment
// Set env name
setCfgName(&opts.cfg)
opts.cfg.Name = opts.cfg.Name + "-" + common.GenerateUID()
// set cache path
opts.cachePath = LogArtifactDir
// set cache file
Expand Down
13 changes: 13 additions & 0 deletions tests/common/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,16 @@ func GenerateUID() string {

return string(b)
}

func setCfgName(cfg *v1alpha1.Environment) {

Check failure on line 32 in tests/common/common.go

View workflow job for this annotation

GitHub Actions / build

undefined: v1alpha1
sha := os.Getenv("GITHUB_SHA")

Check failure on line 33 in tests/common/common.go

View workflow job for this annotation

GitHub Actions / build

undefined: os
attempt := os.Getenv("GITHUB_RUN_ATTEMPT")

Check failure on line 34 in tests/common/common.go

View workflow job for this annotation

GitHub Actions / build

undefined: os
// short sha
if len(sha) > 8 {
sha = sha[:8]
}
// uid is unique for each run
uid := GenerateUID()

cfg.Name = fmt.Sprintf("ci%s-%s-%s", attempt, sha, uid)

Check failure on line 42 in tests/common/common.go

View workflow job for this annotation

GitHub Actions / build

undefined: fmt
}

0 comments on commit 7150b7d

Please sign in to comment.