diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index 137f1447..9d2d1ed1 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -222,14 +222,13 @@ jobs: /tmp/flux create source git flux-system \ --url=https://github.com/fluxcd/flux2-kustomize-helm-example \ --branch=main \ + --ignore-paths="./clusters/**/flux-system/" \ --recurse-submodules /tmp/flux create kustomization flux-system \ --source=flux-system \ --path=./clusters/staging - kubectl -n flux-system wait kustomization/infrastructure --for=condition=ready --timeout=5m + kubectl -n flux-system wait kustomization/infra-controllers --for=condition=ready --timeout=5m kubectl -n flux-system wait kustomization/apps --for=condition=ready --timeout=5m - kubectl -n nginx wait helmrelease/nginx --for=condition=ready --timeout=5m - kubectl -n redis wait helmrelease/redis --for=condition=ready --timeout=5m kubectl -n podinfo wait helmrelease/podinfo --for=condition=ready --timeout=5m - name: flux tree run: | diff --git a/tests/azure/azure_test.go b/tests/azure/azure_test.go index 1397dd02..492fd4f8 100644 --- a/tests/azure/azure_test.go +++ b/tests/azure/azure_test.go @@ -283,7 +283,7 @@ func TestAzureDevOpsCloning(t *testing.T) { name: foobar namespace: %s `, tt.name) - name := fmt.Sprintf("./cloning-test/%s/configmap.yaml", tt.name) + name := fmt.Sprintf("cloning-test/%s/configmap.yaml", tt.name) files[name] = strings.NewReader(manifest) } @@ -554,7 +554,7 @@ stringData: require.NoError(t, err) files := make(map[string]io.Reader) - files["./key-vault-sops/secret.enc.yaml"] = r + files["key-vault-sops/secret.enc.yaml"] = r err = commitAndPushAll(repo, files, name) require.NoError(t, err) diff --git a/tests/azure/util_test.go b/tests/azure/util_test.go index 55ae7be8..2983b403 100644 --- a/tests/azure/util_test.go +++ b/tests/azure/util_test.go @@ -129,7 +129,7 @@ func installFlux(ctx context.Context, kubeClient client.Client, kubeconfigPath, //// Install Flux and push files to git repository repo, _, err := getRepository(repoUrl, defaultBranch, true, azdoPat) if err != nil { - return err + return fmt.Errorf("error cloning repositoriy: %w", err) } kustomizeYaml := ` @@ -168,19 +168,19 @@ patchesStrategicMerge: ` files := make(map[string]io.Reader) - files["./clusters/e2e/flux-system/kustomization.yaml"] = strings.NewReader(kustomizeYaml) - files["./clusters/e2e/flux-system/gotk-components.yaml"] = strings.NewReader("") - files["./clusters/e2e/flux-system/gotk-sync.yaml"] = strings.NewReader("") + files["clusters/e2e/flux-system/kustomization.yaml"] = strings.NewReader(kustomizeYaml) + files["clusters/e2e/flux-system/gotk-components.yaml"] = strings.NewReader("") + files["clusters/e2e/flux-system/gotk-sync.yaml"] = strings.NewReader("") err = commitAndPushAll(repo, files, defaultBranch) if err != nil { - return err + return fmt.Errorf("error commiting and pushing manifests: %w", err) } bootstrapCmd := fmt.Sprintf("flux bootstrap git --url=%s --password=%s --kubeconfig=%s"+ " --token-auth --path=clusters/e2e --components-extra image-reflector-controller,image-automation-controller", repoUrl, azdoPat, kubeconfigPath) if err := runCommand(context.Background(), 10*time.Minute, "./", bootstrapCmd); err != nil { - return err + return fmt.Errorf("error running bootstrap: %w", err) } return nil