You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ts...@apache.org on 2022/10/25 08:15:19 UTC

[camel-k] branch release-1.10.x updated (bcacc777b -> 055b11218)

This is an automated email from the ASF dual-hosted git repository.

tsato pushed a change to branch release-1.10.x
in repository https://gitbox.apache.org/repos/asf/camel-k.git


    from bcacc777b fix(e2e): setting cluster for install
     new 8bb102c98 fix(e2e): stabilise TestNativeBinding
     new 43eb51604 chore(e2e): native test - add warm up before native build testing
     new a931e9e5a fix(e2e): fix TestNativeIntegrations
     new 28224ea56 fix(e2e): increase overall timeout to 90m for native tests
     new f81d5f25b chore(ci): split install-it workflow into two jobs: install, native
     new 797327fb6 fix(e2e): relax constraints for builder kit full build test
     new 055b11218 chore(build): clear staging runtime repo

The 7 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../{e2e-install => e2e-install-native}/action.yml |  6 +--
 .../exec-tests.sh                                  |  7 +--
 .github/actions/e2e-install/exec-tests.sh          | 14 ++----
 .github/actions/e2e-knative/exec-tests.sh          |  3 +-
 .github/workflows/install.yml                      | 24 ++++++++-
 e2e/global/builder/build_test.go                   |  7 +--
 e2e/global/common/kamelet_binding_test.go          | 16 ++++--
 e2e/namespace/native/native_binding_test.go        | 57 +++++++++++++++-------
 e2e/namespace/native/native_test.go                | 31 ++++++++++--
 e2e/support/test_support.go                        | 25 ++++++++--
 script/Makefile                                    |  4 +-
 11 files changed, 139 insertions(+), 55 deletions(-)
 copy .github/actions/{e2e-install => e2e-install-native}/action.yml (97%)
 copy .github/actions/{e2e-knative-yaks => e2e-install-native}/exec-tests.sh (94%)


[camel-k] 01/07: fix(e2e): stabilise TestNativeBinding

Posted by ts...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

tsato pushed a commit to branch release-1.10.x
in repository https://gitbox.apache.org/repos/asf/camel-k.git

commit 8bb102c988f7303951e8ba4d7cd780903a5b9f88
Author: Tadayoshi Sato <sa...@gmail.com>
AuthorDate: Tue Oct 18 14:44:58 2022 +0900

    fix(e2e): stabilise TestNativeBinding
---
 e2e/global/common/kamelet_binding_test.go   | 16 ++++++--
 e2e/namespace/native/native_binding_test.go | 57 ++++++++++++++++++++---------
 e2e/namespace/native/native_test.go         |  5 ++-
 e2e/support/test_support.go                 |  8 ++--
 4 files changed, 60 insertions(+), 26 deletions(-)

diff --git a/e2e/global/common/kamelet_binding_test.go b/e2e/global/common/kamelet_binding_test.go
index a98854254..97aca4411 100644
--- a/e2e/global/common/kamelet_binding_test.go
+++ b/e2e/global/common/kamelet_binding_test.go
@@ -71,7 +71,10 @@ func TestKameletBinding(t *testing.T) {
 			t.Run("throw error test", func(t *testing.T) {
 				RegisterTestingT(t)
 
-				Expect(BindKameletToWithErrorHandler(ns, "throw-error-binding", map[string]string{}, from, to, map[string]string{"message": "throw Error"}, map[string]string{"loggerName": "integrationLogger"}, errorHandler)()).To(Succeed())
+				Expect(BindKameletToWithErrorHandler(ns, "throw-error-binding", map[string]string{},
+					from, to,
+					map[string]string{"message": "throw Error"}, map[string]string{"loggerName": "integrationLogger"},
+					errorHandler)()).To(Succeed())
 
 				Eventually(IntegrationPodPhase(ns, "throw-error-binding"), TestTimeoutLong).Should(Equal(corev1.PodRunning))
 				Eventually(IntegrationLogs(ns, "throw-error-binding"), TestTimeoutShort).Should(ContainSubstring("kameletErrorHandler"))
@@ -82,7 +85,10 @@ func TestKameletBinding(t *testing.T) {
 			t.Run("don't throw error test", func(t *testing.T) {
 				RegisterTestingT(t)
 
-				Expect(BindKameletToWithErrorHandler(ns, "no-error-binding", map[string]string{}, from, to, map[string]string{"message": "true"}, map[string]string{"loggerName": "integrationLogger"}, errorHandler)()).To(Succeed())
+				Expect(BindKameletToWithErrorHandler(ns, "no-error-binding", map[string]string{},
+					from, to,
+					map[string]string{"message": "true"}, map[string]string{"loggerName": "integrationLogger"},
+					errorHandler)()).To(Succeed())
 
 				Eventually(IntegrationPodPhase(ns, "no-error-binding"), TestTimeoutLong).Should(Equal(corev1.PodRunning))
 				Eventually(IntegrationLogs(ns, "no-error-binding"), TestTimeoutShort).ShouldNot(ContainSubstring("kameletErrorHandler"))
@@ -112,7 +118,11 @@ func TestKameletBinding(t *testing.T) {
 				APIVersion: v1alpha1.SchemeGroupVersion.String(),
 			}
 
-			Expect(BindKameletTo(ns, "kb-with-traits", map[string]string{"trait.camel.apache.org/camel.properties": "[\"camel.prop1=a\",\"camel.prop2=b\"]"}, from, to, map[string]string{"message": "hello from test"}, map[string]string{"loggerName": "integrationLogger"})()).To(Succeed())
+			Expect(BindKameletTo(ns, "kb-with-traits",
+				map[string]string{"trait.camel.apache.org/camel.properties": "[\"camel.prop1=a\",\"camel.prop2=b\"]"},
+				from, to,
+				map[string]string{"message": "hello from test"}, map[string]string{"loggerName": "integrationLogger"})()).
+				To(Succeed())
 
 			Eventually(IntegrationPodPhase(ns, "kb-with-traits"), TestTimeoutLong).Should(Equal(corev1.PodRunning))
 			Eventually(IntegrationLogs(ns, "kb-with-traits"), TestTimeoutShort).Should(ContainSubstring("hello from test"))
diff --git a/e2e/namespace/native/native_binding_test.go b/e2e/namespace/native/native_binding_test.go
index f2af7d681..18063d100 100644
--- a/e2e/namespace/native/native_binding_test.go
+++ b/e2e/namespace/native/native_binding_test.go
@@ -23,9 +23,10 @@ limitations under the License.
 package native
 
 import (
-	"github.com/apache/camel-k/pkg/apis/camel/v1alpha1"
 	"testing"
 
+	"github.com/apache/camel-k/pkg/apis/camel/v1alpha1"
+
 	. "github.com/onsi/gomega"
 
 	corev1 "k8s.io/api/core/v1"
@@ -38,27 +39,46 @@ func TestNativeBinding(t *testing.T) {
 	WithNewTestNamespace(t, func(ns string) {
 		operatorID := "camel-k-native-binding"
 		Expect(KamelInstallWithID(operatorID, ns,
-			"--build-timeout", "15m0s",
-			"--operator-resources", "limits.memory=4Gi",
+			"--build-timeout", "40m0s",
+			"--operator-resources", "limits.memory=4.5Gi",
+			"--maven-cli-option", "-Dquarkus.native.native-image-xmx=3g",
 		).Execute()).To(Succeed())
 		Eventually(PlatformPhase(ns), TestTimeoutMedium).Should(Equal(v1.IntegrationPlatformPhaseReady))
 
-		t.Run("kamelet binding with native build", func(t *testing.T) {
-			from := corev1.ObjectReference{
-				Kind:       "Kamelet",
-				Name:       "timer-source",
-				APIVersion: v1alpha1.SchemeGroupVersion.String(),
-			}
-
-			to := corev1.ObjectReference{
-				Kind:       "Kamelet",
-				Name:       "log-sink",
-				APIVersion: v1alpha1.SchemeGroupVersion.String(),
-			}
+		from := corev1.ObjectReference{
+			Kind:       "Kamelet",
+			Name:       "timer-source",
+			APIVersion: v1alpha1.SchemeGroupVersion.String(),
+		}
+		to := corev1.ObjectReference{
+			Kind:       "Kamelet",
+			Name:       "log-sink",
+			APIVersion: v1alpha1.SchemeGroupVersion.String(),
+		}
+		message := "Magicstring!"
+
+		t.Run("warm up before native build testing", func(t *testing.T) {
+			// The following native build test is under tight time constraints, so here it runs
+			// a warm up testing to make sure necessary jars are already downloaded.
+			bindingName := "warm-up-binding"
+			Expect(BindKameletTo(ns, bindingName, map[string]string{},
+				from, to,
+				map[string]string{"message": message}, map[string]string{})()).To(Succeed())
+
+			Eventually(IntegrationPodPhase(ns, bindingName), TestTimeoutLong).Should(Equal(corev1.PodRunning))
+			Eventually(IntegrationLogs(ns, bindingName), TestTimeoutShort).Should(ContainSubstring(message))
+
+			// Clean up
+			Expect(Kamel("delete", bindingName, "-n", ns).Execute()).To(Succeed())
+			Expect(DeleteKits(ns)).To(Succeed())
+		})
 
+		t.Run("kamelet binding with native build", func(t *testing.T) {
 			bindingName := "native-binding"
-			message := "Magicstring!"
-			Expect(BindKameletTo(ns, bindingName, map[string]string{"trait.camel.apache.org/quarkus.package-type": "native"}, from, to, map[string]string{"message": message}, map[string]string{})()).To(Succeed())
+			Expect(BindKameletTo(ns, bindingName,
+				map[string]string{"trait.camel.apache.org/quarkus.package-type": "native"},
+				from, to,
+				map[string]string{"message": message}, map[string]string{})()).To(Succeed())
 
 			Eventually(Kits(ns, withNativeLayout, KitWithPhase(v1.IntegrationKitPhaseReady)),
 				TestTimeoutVeryLong).Should(HaveLen(1))
@@ -69,7 +89,8 @@ func TestNativeBinding(t *testing.T) {
 			Eventually(IntegrationLogs(ns, bindingName), TestTimeoutShort).Should(ContainSubstring(message))
 
 			Eventually(IntegrationPod(ns, bindingName), TestTimeoutShort).
-				Should(WithTransform(getContainerCommand(), MatchRegexp(".*camel-k-integration-\\d+\\.\\d+\\.\\d+[-A-Za-z]*-runner.*")))
+				Should(WithTransform(getContainerCommand(),
+					MatchRegexp(".*camel-k-integration-\\d+\\.\\d+\\.\\d+[-A-Za-z]*-runner.*")))
 
 			// Clean up
 			Expect(Kamel("delete", bindingName, "-n", ns).Execute()).To(Succeed())
diff --git a/e2e/namespace/native/native_test.go b/e2e/namespace/native/native_test.go
index 74e2b8375..f8d5fec91 100644
--- a/e2e/namespace/native/native_test.go
+++ b/e2e/namespace/native/native_test.go
@@ -43,8 +43,9 @@ func TestNativeIntegrations(t *testing.T) {
 	WithNewTestNamespace(t, func(ns string) {
 		operatorID := "camel-k-quarkus-native"
 		Expect(KamelInstallWithID(operatorID, ns,
-			"--build-timeout", "15m0s",
-			"--operator-resources", "limits.memory=4Gi",
+			"--build-timeout", "40m0s",
+			"--operator-resources", "limits.memory=4.5Gi",
+			"--maven-cli-option", "-Dquarkus.native.native-image-xmx=3g",
 		).Execute()).To(Succeed())
 		Eventually(PlatformPhase(ns), TestTimeoutMedium).Should(Equal(v1.IntegrationPlatformPhaseReady))
 
diff --git a/e2e/support/test_support.go b/e2e/support/test_support.go
index 7860c8bc6..59d064fa1 100644
--- a/e2e/support/test_support.go
+++ b/e2e/support/test_support.go
@@ -94,7 +94,7 @@ var TestTimeoutMedium = 5 * time.Minute
 var TestTimeoutLong = 10 * time.Minute
 
 // TestTimeoutVeryLong should be used only for testing native builds.
-var TestTimeoutVeryLong = 30 * time.Minute
+var TestTimeoutVeryLong = 40 * time.Minute
 
 var NoOlmOperatorImage string
 
@@ -1843,11 +1843,13 @@ func CreateTimerKamelet(ns string, name string) func() error {
 	return CreateKamelet(ns, name, flow, props, nil)
 }
 
-func BindKameletTo(ns string, name string, annotations map[string]string, from corev1.ObjectReference, to corev1.ObjectReference, sourceProperties map[string]string, sinkProperties map[string]string) func() error {
+func BindKameletTo(ns, name string, annotations map[string]string, from, to corev1.ObjectReference,
+	sourceProperties, sinkProperties map[string]string) func() error {
 	return BindKameletToWithErrorHandler(ns, name, annotations, from, to, sourceProperties, sinkProperties, nil)
 }
 
-func BindKameletToWithErrorHandler(ns string, name string, annotations map[string]string, from corev1.ObjectReference, to corev1.ObjectReference, sourceProperties map[string]string, sinkProperties map[string]string, errorHandler map[string]interface{}) func() error {
+func BindKameletToWithErrorHandler(ns, name string, annotations map[string]string, from, to corev1.ObjectReference,
+	sourceProperties, sinkProperties map[string]string, errorHandler map[string]interface{}) func() error {
 	return func() error {
 		kb := v1alpha1.NewKameletBinding(ns, name)
 		kb.Annotations = annotations


[camel-k] 06/07: fix(e2e): relax constraints for builder kit full build test

Posted by ts...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

tsato pushed a commit to branch release-1.10.x
in repository https://gitbox.apache.org/repos/asf/camel-k.git

commit 797327fb6a5b13cc0cf1cbc4c21120953a130460
Author: Tadayoshi Sato <sa...@gmail.com>
AuthorDate: Fri Sep 2 17:06:19 2022 +0900

    fix(e2e): relax constraints for builder kit full build test
---
 e2e/global/builder/build_test.go | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/e2e/global/builder/build_test.go b/e2e/global/builder/build_test.go
index 7a379ae2e..b69265d84 100644
--- a/e2e/global/builder/build_test.go
+++ b/e2e/global/builder/build_test.go
@@ -41,7 +41,7 @@ type kitOptions struct {
 }
 
 func TestKitTimerToLogFullBuild(t *testing.T) {
-	doKitFullBuild(t, "timer-to-log", "300Mi", "5m0s", TestTimeoutLong, kitOptions{
+	doKitFullBuild(t, "timer-to-log", "500Mi", "8m0s", TestTimeoutLong, kitOptions{
 		dependencies: []string{
 			"camel:timer", "camel:log",
 		},
@@ -49,7 +49,7 @@ func TestKitTimerToLogFullBuild(t *testing.T) {
 }
 
 func TestKitKnativeFullBuild(t *testing.T) {
-	doKitFullBuild(t, "knative", "300Mi", "5m0s", TestTimeoutLong, kitOptions{
+	doKitFullBuild(t, "knative", "500Mi", "8m0s", TestTimeoutLong, kitOptions{
 		dependencies: []string{
 			"camel-k-knative",
 		},
@@ -72,7 +72,8 @@ func TestKitTimerToLogFullNativeBuild(t *testing.T) {
 	})
 }
 
-func doKitFullBuild(t *testing.T, name string, memoryLimit string, buildTimeout string, testTimeout time.Duration, options kitOptions) {
+func doKitFullBuild(t *testing.T, name string, memoryLimit string, buildTimeout string, testTimeout time.Duration,
+	options kitOptions) {
 	t.Helper()
 
 	WithNewTestNamespace(t, func(ns string) {


[camel-k] 04/07: fix(e2e): increase overall timeout to 90m for native tests

Posted by ts...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

tsato pushed a commit to branch release-1.10.x
in repository https://gitbox.apache.org/repos/asf/camel-k.git

commit 28224ea5678334c4b6d48bec12e0f81b76e736bd
Author: Tadayoshi Sato <sa...@gmail.com>
AuthorDate: Tue Oct 18 23:06:53 2022 +0900

    fix(e2e): increase overall timeout to 90m for native tests
---
 script/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/script/Makefile b/script/Makefile
index 3933acb82..231f4a9ab 100644
--- a/script/Makefile
+++ b/script/Makefile
@@ -295,7 +295,7 @@ test-install: do-build
 
 test-quarkus-native: do-build
 	STAGING_RUNTIME_REPO="$(STAGING_RUNTIME_REPO)" \
-	go test -timeout 60m -v ./e2e/namespace/native -tags=integration $(TEST_QUARKUS_RUN) -json 2>&1 | gotestfmt
+	go test -timeout 90m -v ./e2e/namespace/native -tags=integration $(TEST_QUARKUS_RUN) -json 2>&1 | gotestfmt
 
 test-upgrade: do-build
 	STAGING_RUNTIME_REPO="$(STAGING_RUNTIME_REPO)" \


[camel-k] 03/07: fix(e2e): fix TestNativeIntegrations

Posted by ts...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

tsato pushed a commit to branch release-1.10.x
in repository https://gitbox.apache.org/repos/asf/camel-k.git

commit a931e9e5a66166f0a1fbe9da7c1474f9d98b1f94
Author: Tadayoshi Sato <sa...@gmail.com>
AuthorDate: Tue Oct 18 20:21:11 2022 +0900

    fix(e2e): fix TestNativeIntegrations
---
 e2e/namespace/native/native_test.go | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/e2e/namespace/native/native_test.go b/e2e/namespace/native/native_test.go
index 20d4f9fa0..3b536bcc4 100644
--- a/e2e/namespace/native/native_test.go
+++ b/e2e/namespace/native/native_test.go
@@ -92,7 +92,7 @@ func TestNativeIntegrations(t *testing.T) {
 
 			// Check the fast-jar Kit is ready
 			Eventually(Kits(ns, withFastJarLayout, KitWithPhase(v1.IntegrationKitPhaseReady)),
-				TestTimeoutVeryLong).Should(HaveLen(1))
+				TestTimeoutLong).Should(HaveLen(1))
 
 			fastJarKit := Kits(ns, withFastJarLayout, KitWithPhase(v1.IntegrationKitPhaseReady))()[0]
 			// Check the Integration uses the fast-jar Kit
@@ -109,7 +109,7 @@ func TestNativeIntegrations(t *testing.T) {
 
 			// Check the native Kit is ready
 			Eventually(Kits(ns, withNativeLayout, KitWithPhase(v1.IntegrationKitPhaseReady)),
-				TestTimeoutLong).Should(HaveLen(1))
+				TestTimeoutVeryLong).Should(HaveLen(1))
 
 			nativeKit := Kits(ns, withNativeLayout, KitWithPhase(v1.IntegrationKitPhaseReady))()[0]
 			// Check the Integration uses the native Kit


[camel-k] 05/07: chore(ci): split install-it workflow into two jobs: install, native

Posted by ts...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

tsato pushed a commit to branch release-1.10.x
in repository https://gitbox.apache.org/repos/asf/camel-k.git

commit f81d5f25b1faf5c6577c628a57091fca2d05397b
Author: Tadayoshi Sato <sa...@gmail.com>
AuthorDate: Thu Sep 1 16:35:59 2022 +0900

    chore(ci): split install-it workflow into two jobs: install, native
---
 .github/actions/e2e-install-native/action.yml      | 117 +++++++++++++++++++++
 .../exec-tests.sh                                  |  16 +--
 .github/actions/e2e-install/exec-tests.sh          |  14 +--
 .github/actions/e2e-knative/exec-tests.sh          |   3 +-
 .github/workflows/install.yml                      |  24 ++++-
 5 files changed, 150 insertions(+), 24 deletions(-)

diff --git a/.github/actions/e2e-install-native/action.yml b/.github/actions/e2e-install-native/action.yml
new file mode 100644
index 000000000..1061ff8e5
--- /dev/null
+++ b/.github/actions/e2e-install-native/action.yml
@@ -0,0 +1,117 @@
+# ---------------------------------------------------------------------------
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ---------------------------------------------------------------------------
+
+name: e2e-install-native
+description: 'End-to-End tests for install use-cases (namespaced rather than global operator so no global operator install) with native builds'
+
+inputs:
+  cluster-config-data:
+    description: 'The configuration of the underlying cluster (if cluster-type is custom)'
+    required: false
+  cluster-kube-config-data:
+    description: 'Base16 encoded kube config - required for custom cluster type only'
+    required: false
+
+runs:
+  using: "composite"
+
+  steps:
+  - id: prepare-env
+    name: Prepare Test Environment
+    uses: ./.github/actions/kamel-prepare-env
+
+  - id: config-cluster
+    name: Configure Platform
+    uses: ./.github/actions/kamel-config-cluster
+    with:
+      cluster-type: ${{ env.TEST_CLUSTER }}
+      cluster-config-data: ${{ inputs.cluster-config-data }}
+      cluster-kube-config-data: ${{ inputs.cluster-kube-config-data }}
+
+  #
+  # Try and ensure the cluster is in a vanilla state before
+  # starting in on an installation
+  #
+  - id: pre-clean-cluster
+    name: Pre Clean Cluster
+    uses: ./.github/actions/kamel-cleanup
+    if: ${{ always() }}
+    with:
+      catalog-source-name: ${{ steps.config-cluster.outputs.cluster-catalog-source-name }}
+      catalog-source-namespace: ${{ steps.config-cluster.outputs.cluster-catalog-source-namespace }}
+      image-namespace: ${{ steps.config-cluster.outputs.cluster-image-namespace }}
+      global-operator-namespace: ${{ steps.config-cluster.outputs.cluster-global-operator-namespace }}
+
+  - id: build-kamel
+    name: Build Kamel
+    uses: ./.github/actions/kamel-build
+    with:
+      image-registry-push-host: ${{ steps.config-cluster.outputs.cluster-image-registry-push-host }}
+      image-registry-pull-host: ${{ steps.config-cluster.outputs.cluster-image-registry-pull-host }}
+      image-namespace: ${{ steps.config-cluster.outputs.cluster-image-namespace }}
+      # Builds the bundle if an OLM is available - depends on cluster being tested
+      build-bundle: ${{ steps.config-cluster.outputs.cluster-has-olm }}
+      # Both can be empty and so catalog source will not be created
+      catalog-source-name: ${{ steps.config-cluster.outputs.cluster-catalog-source-name }}
+      catalog-source-namespace: ${{ steps.config-cluster.outputs.cluster-catalog-source-namespace }}
+
+  - id: install-kamel-cluster-setup
+    name: Install Kamel Cluster Setup
+    uses: ./.github/actions/kamel-install-cluster-setup
+    with:
+      kube-admin-user-ctx: ${{ steps.config-cluster.outputs.cluster-kube-admin-user-ctx }}
+
+  - id: preflight-test
+    name: Preflight Check Test
+    uses: ./.github/actions/kamel-preflight-test
+    with:
+      catalog-source-name: ${{ steps.config-cluster.outputs.cluster-catalog-source-name }}
+      catalog-source-namespace: ${{ steps.config-cluster.outputs.cluster-catalog-source-namespace }}
+      image-namespace: ${{ steps.config-cluster.outputs.cluster-image-namespace }}
+      image-registry-host: ${{ steps.config-cluster.outputs.cluster-image-registry-pull-host }}
+      image-name: ${{ steps.build-kamel.outputs.build-binary-local-image-name }}
+      image-registry-insecure: ${{steps.config-cluster.outputs.cluster-image-registry-insecure }}
+      image-version: ${{ steps.build-kamel.outputs.build-binary-local-image-version }}
+
+  - id: report-problematic
+    name: List Tests Marked As Problematic
+    uses: ./.github/actions/kamel-report-problematic
+    with:
+      test-suite: namespace/install
+
+  - id: run-it
+    name: Run IT
+    shell: bash
+    run: |
+      ./.github/actions/e2e-install-native/exec-tests.sh \
+        -b "${{ steps.config-cluster.outputs.cluster-catalog-source-name }}" \
+        -c "${{ steps.config-cluster.outputs.cluster-catalog-source-namespace }}" \
+        -i "${{ steps.config-cluster.outputs.cluster-image-namespace }}" \
+        -l "${{ steps.config-cluster.outputs.cluster-image-registry-pull-host }}" \
+        -n "${{ steps.build-kamel.outputs.build-binary-local-image-name }}" \
+        -s "${{steps.config-cluster.outputs.cluster-image-registry-insecure }}" \
+        -v "${{ steps.build-kamel.outputs.build-binary-local-image-version }}" \
+        -x "${{ env.CAMEL_K_TEST_SAVE_FAILED_TEST_NAMESPACE }}"
+
+  - name: Cleanup
+    uses: ./.github/actions/kamel-cleanup
+    if: ${{ always() }}
+    with:
+      catalog-source-name: ${{ steps.config-cluster.outputs.cluster-catalog-source-name }}
+      catalog-source-namespace: ${{ steps.config-cluster.outputs.cluster-catalog-source-namespace }}
+      image-namespace: ${{ steps.config-cluster.outputs.cluster-image-namespace }}
+      global-operator-namespace: ${{ steps.config-cluster.outputs.cluster-global-operator-namespace }}
diff --git a/.github/actions/e2e-install/exec-tests.sh b/.github/actions/e2e-install-native/exec-tests.sh
similarity index 89%
copy from .github/actions/e2e-install/exec-tests.sh
copy to .github/actions/e2e-install-native/exec-tests.sh
index 1b2a206ca..db67931c1 100755
--- a/.github/actions/e2e-install/exec-tests.sh
+++ b/.github/actions/e2e-install-native/exec-tests.sh
@@ -19,7 +19,7 @@
 
 ####
 #
-# Execute the install tests
+# Execute the install native tests
 #
 ####
 
@@ -101,7 +101,8 @@ if [ -n "${BUILD_CATALOG_SOURCE_NAMESPACE}" ]; then
   export KAMEL_INSTALL_OLM_CHANNEL="${NEW_XY_CHANNEL}"
 fi
 
-export KAMEL_INSTALL_MAVEN_REPOSITORIES=$(make get-staging-repo)
+KAMEL_INSTALL_MAVEN_REPOSITORIES=$(make get-staging-repo)
+export KAMEL_INSTALL_MAVEN_REPOSITORIES
 export KAMEL_INSTALL_REGISTRY=${REGISTRY_PULL_HOST}
 export KAMEL_INSTALL_REGISTRY_INSECURE=${REGISTRY_INSECURE}
 export KAMEL_INSTALL_OPERATOR_IMAGE=${CUSTOM_IMAGE}:${CUSTOM_VERSION}
@@ -115,12 +116,5 @@ export CAMEL_K_TEST_IMAGE_NAME=${CUSTOM_IMAGE}
 export CAMEL_K_TEST_IMAGE_VERSION=${CUSTOM_VERSION}
 export CAMEL_K_TEST_SAVE_FAILED_TEST_NAMESPACE=${SAVE_FAILED_TEST_NS}
 
-# Then run all integration tests rather than ending on first failure
-set -e
-exit_code=0
-DO_TEST_PREBUILD=false make test-install || exit_code=1
-DO_TEST_PREBUILD=false make test-quarkus-native || exit_code=1
-set +e
-
-echo "Tests completed with exit code: ${exit_code}"
-exit ${exit_code}
+# Then run integration tests
+DO_TEST_PREBUILD=false make test-quarkus-native
diff --git a/.github/actions/e2e-install/exec-tests.sh b/.github/actions/e2e-install/exec-tests.sh
index 1b2a206ca..3b780d7f3 100755
--- a/.github/actions/e2e-install/exec-tests.sh
+++ b/.github/actions/e2e-install/exec-tests.sh
@@ -101,7 +101,8 @@ if [ -n "${BUILD_CATALOG_SOURCE_NAMESPACE}" ]; then
   export KAMEL_INSTALL_OLM_CHANNEL="${NEW_XY_CHANNEL}"
 fi
 
-export KAMEL_INSTALL_MAVEN_REPOSITORIES=$(make get-staging-repo)
+KAMEL_INSTALL_MAVEN_REPOSITORIES=$(make get-staging-repo)
+export KAMEL_INSTALL_MAVEN_REPOSITORIES
 export KAMEL_INSTALL_REGISTRY=${REGISTRY_PULL_HOST}
 export KAMEL_INSTALL_REGISTRY_INSECURE=${REGISTRY_INSECURE}
 export KAMEL_INSTALL_OPERATOR_IMAGE=${CUSTOM_IMAGE}:${CUSTOM_VERSION}
@@ -115,12 +116,5 @@ export CAMEL_K_TEST_IMAGE_NAME=${CUSTOM_IMAGE}
 export CAMEL_K_TEST_IMAGE_VERSION=${CUSTOM_VERSION}
 export CAMEL_K_TEST_SAVE_FAILED_TEST_NAMESPACE=${SAVE_FAILED_TEST_NS}
 
-# Then run all integration tests rather than ending on first failure
-set -e
-exit_code=0
-DO_TEST_PREBUILD=false make test-install || exit_code=1
-DO_TEST_PREBUILD=false make test-quarkus-native || exit_code=1
-set +e
-
-echo "Tests completed with exit code: ${exit_code}"
-exit ${exit_code}
+# Then run integration tests
+DO_TEST_PREBUILD=false make test-install
diff --git a/.github/actions/e2e-knative/exec-tests.sh b/.github/actions/e2e-knative/exec-tests.sh
index 328571b3d..fd591cbb7 100755
--- a/.github/actions/e2e-knative/exec-tests.sh
+++ b/.github/actions/e2e-knative/exec-tests.sh
@@ -104,7 +104,8 @@ if [ -n "${BUILD_CATALOG_SOURCE_NAMESPACE}" ]; then
   export KAMEL_INSTALL_OLM_CHANNEL="${NEW_XY_CHANNEL}"
 fi
 
-export KAMEL_INSTALL_MAVEN_REPOSITORIES=$(make get-staging-repo)
+KAMEL_INSTALL_MAVEN_REPOSITORIES=$(make get-staging-repo)
+export KAMEL_INSTALL_MAVEN_REPOSITORIES
 export KAMEL_INSTALL_REGISTRY=${REGISTRY_PULL_HOST}
 export KAMEL_INSTALL_REGISTRY_INSECURE=${REGISTRY_INSECURE}
 export KAMEL_INSTALL_OPERATOR_IMAGE=${CUSTOM_IMAGE}:${CUSTOM_VERSION}
diff --git a/.github/workflows/install.yml b/.github/workflows/install.yml
index 158b1444f..261316c37 100644
--- a/.github/workflows/install.yml
+++ b/.github/workflows/install.yml
@@ -68,9 +68,7 @@ concurrency:
 
 jobs:
   install-it:
-
     runs-on: ubuntu-20.04
-
     steps:
     - name: Checkout code
       uses: actions/checkout@v2
@@ -90,3 +88,25 @@ jobs:
       with:
         cluster-config-data: ${{ secrets.E2E_CLUSTER_CONFIG }}
         cluster-kube-config-data: ${{ secrets.E2E_KUBE_CONFIG }}
+
+  native-it:
+    runs-on: ubuntu-20.04
+    steps:
+    - name: Checkout code
+      uses: actions/checkout@v2
+      with:
+        persist-credentials: false
+        submodules: recursive
+    - name: Convert input parameters to env vars
+      shell: bash
+      run: |
+        ./.github/workflows/manual-exec-process-inputs.sh \
+          -i "${{ github.event.inputs.pre-built-kamel-image }}" \
+          -p "${{ github.event.inputs.skip-problematic }}" \
+          -t "${{ github.event.inputs.test-filters }}"
+
+    - name: Execute Tests
+      uses: ./.github/actions/e2e-install-native
+      with:
+        cluster-config-data: ${{ secrets.E2E_CLUSTER_CONFIG }}
+        cluster-kube-config-data: ${{ secrets.E2E_KUBE_CONFIG }}


[camel-k] 02/07: chore(e2e): native test - add warm up before native build testing

Posted by ts...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

tsato pushed a commit to branch release-1.10.x
in repository https://gitbox.apache.org/repos/asf/camel-k.git

commit 43eb51604198e847c5e1dbf0c6f361eb09487074
Author: Tadayoshi Sato <sa...@gmail.com>
AuthorDate: Thu Sep 1 14:54:46 2022 +0900

    chore(e2e): native test - add warm up before native build testing
---
 e2e/namespace/native/native_test.go | 22 +++++++++++++++++++++-
 e2e/support/test_support.go         | 17 +++++++++++++++--
 2 files changed, 36 insertions(+), 3 deletions(-)

diff --git a/e2e/namespace/native/native_test.go b/e2e/namespace/native/native_test.go
index f8d5fec91..20d4f9fa0 100644
--- a/e2e/namespace/native/native_test.go
+++ b/e2e/namespace/native/native_test.go
@@ -56,7 +56,27 @@ func TestNativeIntegrations(t *testing.T) {
 			).Execute()).To(Succeed())
 
 			Eventually(IntegrationPhase(ns, name)).Should(Equal(v1.IntegrationPhaseError))
-			Eventually(IntegrationConditionStatus(ns, name, v1.IntegrationConditionKitAvailable)).Should(Equal(corev1.ConditionFalse))
+			Eventually(IntegrationConditionStatus(ns, name, v1.IntegrationConditionKitAvailable)).
+				Should(Equal(corev1.ConditionFalse))
+
+				// Clean up
+			Expect(Kamel("delete", name, "-n", ns).Execute()).To(Succeed())
+		})
+
+		t.Run("warm up before native build testing", func(t *testing.T) {
+			// The following native build test is under tight time constraints, so here it runs
+			// a warm up testing to make sure necessary jars are already downloaded.
+			name := "warm-up-yaml"
+			Expect(KamelRunWithID(operatorID, ns, "files/yaml.yaml", "--name", name).Execute()).To(Succeed())
+
+			Eventually(IntegrationPodPhase(ns, name), TestTimeoutLong).Should(Equal(corev1.PodRunning))
+			Eventually(IntegrationConditionStatus(ns, name, v1.IntegrationConditionReady), TestTimeoutShort).
+				Should(Equal(corev1.ConditionTrue))
+			Eventually(IntegrationLogs(ns, name), TestTimeoutShort).Should(ContainSubstring("Magicstring!"))
+
+			// Clean up
+			Expect(Kamel("delete", name, "-n", ns).Execute()).To(Succeed())
+			Expect(DeleteKits(ns)).To(Succeed())
 		})
 
 		t.Run("automatic rollout deployment from fast-jar to native kit", func(t *testing.T) {
diff --git a/e2e/support/test_support.go b/e2e/support/test_support.go
index 59d064fa1..72c7e8d21 100644
--- a/e2e/support/test_support.go
+++ b/e2e/support/test_support.go
@@ -1107,6 +1107,20 @@ func Kits(ns string, options ...interface{}) func() []v1.IntegrationKit {
 	}
 }
 
+func DeleteKits(ns string) error {
+	kits := Kits(ns)()
+	if len(kits) == 0 {
+		return nil
+	}
+	for _, kit := range kits {
+		if err := TestClient().Delete(TestContext, &kit); err != nil {
+			return err
+		}
+	}
+
+	return nil
+}
+
 func OperatorImage(ns string) func() string {
 	return func() string {
 		pod := OperatorPod(ns)()
@@ -1375,8 +1389,7 @@ func DeletePlatform(ns string) func() bool {
 		if pl == nil {
 			return true
 		}
-		err := TestClient().Delete(TestContext, pl)
-		if err != nil {
+		if err := TestClient().Delete(TestContext, pl); err != nil {
 			log.Error(err, "Got error while deleting the platform")
 		}
 		return false


[camel-k] 07/07: chore(build): clear staging runtime repo

Posted by ts...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

tsato pushed a commit to branch release-1.10.x
in repository https://gitbox.apache.org/repos/asf/camel-k.git

commit 055b11218a4671e4f21697a66020e7399918f23f
Author: Tadayoshi Sato <sa...@gmail.com>
AuthorDate: Fri Oct 21 16:26:49 2022 +0900

    chore(build): clear staging runtime repo
---
 script/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/script/Makefile b/script/Makefile
index 231f4a9ab..2b9f4652c 100644
--- a/script/Makefile
+++ b/script/Makefile
@@ -75,7 +75,7 @@ OPM := opm
 # Used to push pre-release artifacts
 STAGING_IMAGE_NAME := docker.io/camelk/camel-k
 
-STAGING_RUNTIME_REPO := https://repository.apache.org/content/repositories/orgapachecamel-1483
+STAGING_RUNTIME_REPO :=
 
 # Define here the repo containing the default Kamelet catalog (if any)
 KAMELET_CATALOG_REPO := https://github.com/apache/camel-kamelets.git