diff --git a/.github/workflows/build_test.yml b/.github/workflows/build_test.yml index 69be909ee..eabaa1dd7 100644 --- a/.github/workflows/build_test.yml +++ b/.github/workflows/build_test.yml @@ -52,7 +52,7 @@ jobs: id: vars run: | echo "version=$(git describe --tags --always)" >> $GITHUB_OUTPUT - echo "clustername=ci-e2e-test-$(date +%s)" >> $GITHUB_OUTPUT + echo "clustername=ci-$(date +%s | cut -b6-10)" >> $GITHUB_OUTPUT - name: Build and push HMC controller image uses: docker/build-push-action@v6 with: diff --git a/test/e2e/managedcluster/managedcluster.go b/test/e2e/managedcluster/managedcluster.go index b1cd4562d..6a13fa463 100644 --- a/test/e2e/managedcluster/managedcluster.go +++ b/test/e2e/managedcluster/managedcluster.go @@ -100,6 +100,11 @@ func setClusterName(templateName Template) { generatedName = fmt.Sprintf("%s-%s", generatedName, "hosted") } + // Azure has a 19 character limit for cluster names. + if providerName == "azure" { + generatedName = generatedName[0:18] + } + GinkgoT().Setenv(EnvVarManagedClusterName, generatedName) }