diff --git a/.github/workflows/ci-go.yml b/.github/workflows/ci-go.yml index eb61eaa49..2d3738a1d 100644 --- a/.github/workflows/ci-go.yml +++ b/.github/workflows/ci-go.yml @@ -41,7 +41,7 @@ jobs: check-latest: true - name: 'Test' - run: PRINCIPAL_ID=${{ secrets.GHA_PRINCIPAL_ID }} make test + run: JOB_ID=${{ github.job }} PRINCIPAL_ID=${{ secrets.GHA_PRINCIPAL_ID }} make test lint: permissions: diff --git a/tooling/templatize/internal/end2end/e2e.go b/tooling/templatize/internal/end2end/e2e.go index b48c1a145..f48431fc5 100644 --- a/tooling/templatize/internal/end2end/e2e.go +++ b/tooling/templatize/internal/end2end/e2e.go @@ -91,15 +91,17 @@ func newE2E(tmpdir string) e2eImpl { } func (e *e2eImpl) UseRandomRG() func() error { - + rgSuffx := "" + if jobID := os.Getenv("JOB_ID"); jobID != "" { + rgSuffx = jobID + } chars := []rune("abcdefghijklmnopqrstuvwxyz0123456789") - rg := "templatize-e2e-" - - for i := 0; i < 10; i++ { - rg += string(chars[rand.IntN(len(chars))]) + for i := 0; i < 3; i++ { + rgSuffx += string(chars[rand.IntN(len(chars))]) } - e.rgName = rg - e.SetConfig(config.Variables{"defaults": config.Variables{"rg": rg}}) + + e.rgName = "templatize-e2e-" + rgSuffx + e.SetConfig(config.Variables{"defaults": config.Variables{"rg": e.rgName}}) return func() error { subsriptionID, err := pipeline.LookupSubscriptionID(context.Background(), "ARO Hosted Control Planes (EA Subscription 1)")