From 3575e2a203b32a4210af02cceb7dbb381c3c9850 Mon Sep 17 00:00:00 2001 From: Sascha Schwarze Date: Fri, 12 Jul 2024 20:37:36 +0200 Subject: [PATCH] Pin to newer Node version that is still supported by Paketo --- test/e2e/v1alpha1/common_suite_test.go | 8 ++++++++ test/e2e/v1alpha1/e2e_image_mutate_test.go | 1 + test/e2e/v1beta1/common_suite_test.go | 8 ++++++++ test/e2e/v1beta1/e2e_image_mutate_test.go | 1 + 4 files changed, 18 insertions(+) diff --git a/test/e2e/v1alpha1/common_suite_test.go b/test/e2e/v1alpha1/common_suite_test.go index d7c1a18f7f..3defacfcd5 100644 --- a/test/e2e/v1alpha1/common_suite_test.go +++ b/test/e2e/v1alpha1/common_suite_test.go @@ -110,6 +110,14 @@ func (b *buildPrototype) Dockerfile(dockerfile string) *buildPrototype { return b } +func (b *buildPrototype) Env(key string, value string) *buildPrototype { + b.build.Spec.Env = append(b.build.Spec.Env, core.EnvVar{ + Name: key, + Value: value, + }) + return b +} + func (b *buildPrototype) determineParameterIndex(name string) int { index := -1 for i, paramValue := range b.build.Spec.ParamValues { diff --git a/test/e2e/v1alpha1/e2e_image_mutate_test.go b/test/e2e/v1alpha1/e2e_image_mutate_test.go index 024edf608f..87b498a179 100644 --- a/test/e2e/v1alpha1/e2e_image_mutate_test.go +++ b/test/e2e/v1alpha1/e2e_image_mutate_test.go @@ -181,6 +181,7 @@ var _ = Describe("For a Kubernetes cluster with Tekton and build installed", fun OutputImageCredentials(os.Getenv(EnvVarImageRepoSecret)). OutputImageInsecure(insecure). OutputTimestamp(outputTimestamp). + Env("BP_NODE_VERSION", "~20"). BuildSpec()). MustCreate() } diff --git a/test/e2e/v1beta1/common_suite_test.go b/test/e2e/v1beta1/common_suite_test.go index 494a9818b5..a9821937c0 100644 --- a/test/e2e/v1beta1/common_suite_test.go +++ b/test/e2e/v1beta1/common_suite_test.go @@ -154,6 +154,14 @@ func (b *buildPrototype) OutputImage(image string) *buildPrototype { return b } +func (b *buildPrototype) Env(key string, value string) *buildPrototype { + b.build.Spec.Env = append(b.build.Spec.Env, core.EnvVar{ + Name: key, + Value: value, + }) + return b +} + func (b *buildPrototype) OutputVulnerabilitySettings(settings buildv1beta1.VulnerabilityScanOptions) *buildPrototype { b.build.Spec.Output.VulnerabilityScan = &settings return b diff --git a/test/e2e/v1beta1/e2e_image_mutate_test.go b/test/e2e/v1beta1/e2e_image_mutate_test.go index 8a36253c94..078cc9a8ba 100644 --- a/test/e2e/v1beta1/e2e_image_mutate_test.go +++ b/test/e2e/v1beta1/e2e_image_mutate_test.go @@ -181,6 +181,7 @@ var _ = Describe("For a Kubernetes cluster with Tekton and build installed", fun OutputImageCredentials(os.Getenv(EnvVarImageRepoSecret)). OutputImageInsecure(insecure). OutputTimestamp(outputTimestamp). + Env("BP_NODE_VERSION", "~20"). BuildSpec()). MustCreate() }