You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by as...@apache.org on 2021/03/24 12:36:47 UTC

[camel-k] branch master updated (f69801c -> 5f8bd10)

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

astefanutti pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/camel-k.git.


    from f69801c  chore(OLM): Remove old Build CRD from OLM package
     new 21a55f8  fix(e2e): Handle external Kamel CLI binary errors
     new 919c5a6  test: Operator upgrade e2e tests
     new d362b12  fix(e2e): Environment variables are step scoped
     new 5e6247c  chore(test): Dump Deployments on test error
     new bf4731c  test: Fix KAMEL_BIN environment variable
     new e038ed3  fix(e2e): Increase timeouts
     new 5f8bd10  fix(e2e): Refresh test client to account for new CRDs

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:
 .github/workflows/{kubernetes.yml => upgrade.yml} |  31 ++++---
 e2e/support/test_support.go                       |  52 +++++------
 e2e/support/util/dump.go                          |  19 +++-
 e2e/{local => upgrade}/files/yaml.yaml            |   0
 e2e/upgrade/upgrade_operator_test.go              | 103 ++++++++++++++++++++++
 script/Makefile                                   |   7 ++
 6 files changed, 166 insertions(+), 46 deletions(-)
 copy .github/workflows/{kubernetes.yml => upgrade.yml} (77%)
 copy e2e/{local => upgrade}/files/yaml.yaml (100%)
 create mode 100644 e2e/upgrade/upgrade_operator_test.go

[camel-k] 01/07: fix(e2e): Handle external Kamel CLI binary errors

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

astefanutti pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel-k.git

commit 21a55f829f35e77114ead8e14eaad1e9775814f7
Author: Antonin Stefanutti <an...@stefanutti.fr>
AuthorDate: Tue Mar 23 12:32:57 2021 +0100

    fix(e2e): Handle external Kamel CLI binary errors
---
 e2e/support/test_support.go | 23 +++++++++++++++--------
 1 file changed, 15 insertions(+), 8 deletions(-)

diff --git a/e2e/support/test_support.go b/e2e/support/test_support.go
index b296bec..f9a6f5c 100644
--- a/e2e/support/test_support.go
+++ b/e2e/support/test_support.go
@@ -176,19 +176,26 @@ func KamelWithContext(ctx context.Context, args ...string) *cobra.Command {
 		fmt.Printf("Using external kamel binary on path %s\n", kamelBin)
 		c = &cobra.Command{
 			DisableFlagParsing: true,
-			Run: func(cmd *cobra.Command, args []string) {
-
-				externalBin := exec.Command(kamelBin, args...)
+			RunE: func(cmd *cobra.Command, args []string) error {
+				externalBin := exec.CommandContext(ctx, kamelBin, args...)
 				var stdout io.Reader
 				stdout, err = externalBin.StdoutPipe()
 				if err != nil {
 					panic(err)
 				}
-
-				externalBin.Start()
-				io.Copy(c.OutOrStdout(), stdout)
-				externalBin.Wait()
-
+				err := externalBin.Start()
+				if err != nil {
+					return err
+				}
+				_, err = io.Copy(c.OutOrStdout(), stdout)
+				if err != nil {
+					return err
+				}
+				err = externalBin.Wait()
+				if err != nil {
+					return err
+				}
+				return nil
 			},
 		}
 	} else {

[camel-k] 02/07: test: Operator upgrade e2e tests

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

astefanutti pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel-k.git

commit 919c5a6407fe1686c667130b2e00682cc97c0791
Author: Antonin Stefanutti <an...@stefanutti.fr>
AuthorDate: Tue Mar 23 12:36:14 2021 +0100

    test: Operator upgrade e2e tests
---
 .github/workflows/upgrade.yml        | 115 +++++++++++++++++++++++++++++++++++
 e2e/upgrade/files/yaml.yaml          |  28 +++++++++
 e2e/upgrade/upgrade_operator_test.go |  92 ++++++++++++++++++++++++++++
 script/Makefile                      |   7 +++
 4 files changed, 242 insertions(+)

diff --git a/.github/workflows/upgrade.yml b/.github/workflows/upgrade.yml
new file mode 100644
index 0000000..04bca28
--- /dev/null
+++ b/.github/workflows/upgrade.yml
@@ -0,0 +1,115 @@
+# ---------------------------------------------------------------------------
+# 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: upgrade
+
+on:
+  pull_request:
+    branches:
+      - master
+      - "release-*"
+    paths-ignore:
+      - '**.adoc'
+      - 'KEYS'
+      - 'LICENSE'
+      - 'NOTICE'
+  push:
+    branches:
+      - master
+      - "release-*"
+    paths-ignore:
+      - '**.adoc'
+      - 'KEYS'
+      - 'LICENSE'
+      - 'NOTICE'
+
+jobs:
+  build:
+
+    runs-on: ubuntu-20.04
+
+    steps:
+    - name: Checkout code
+      uses: actions/checkout@v2
+    - name: Cleanup
+      run: |
+        ls -lart
+        echo "Initial status:"
+        df -h
+
+        echo "Cleaning up resources:"
+        sudo swapoff -a
+        sudo rm -f /swapfile
+        sudo apt clean
+        docker rmi $(docker image ls -aq)
+
+        echo "Final status:"
+        df -h
+    - name: Set up JDK 11
+      uses: AdoptOpenJDK/install-jdk@v1
+      with:
+        version: "11"
+    - name: Set Go
+      uses: actions/setup-go@v1
+      with:
+        go-version: 1.13.x
+    - name: Kubernetes KinD Cluster
+      uses: container-tools/kind-action@v1
+      with:
+        node_image: kindest/node:v1.20.2
+    - name: Info
+      run: |
+        kubectl cluster-info
+        kubectl describe nodes
+    - name: Get Kamel CLI
+      run: |
+        export KAMEL_VERSION=$(make get-last-released-version)
+        curl -L https://github.com/apache/camel-k/releases/download/v${KAMEL_VERSION}/camel-k-client-${KAMEL_VERSION}-linux-64bit.tar.gz -o kamel.tar.gz
+        tar -zxf kamel.tar.gz
+        sudo mv kamel /usr/local/bin/
+    - name: Build Operator
+      run: |
+        echo "Build project"
+        make build-kamel bundle-kamelets
+        echo "Adding maven artifacts to the image context"
+        make PACKAGE_ARTIFACTS_STRATEGY=download package-artifacts
+        echo "Copying binary file to docker dir"
+        mkdir -p ./build/_output/bin
+        cp ./kamel ./build/_output/bin/
+        echo "Building the images"
+        export LOCAL_IMAGE=$KIND_REGISTRY/apache/camel-k:$(make get-version)
+        docker build -t "${LOCAL_IMAGE}" -f build/Dockerfile .
+        docker push ${LOCAL_IMAGE}
+    - name: Run IT
+      run: |
+        # Use the last released Kamel CLI
+        KAMEL_BIN=kamel
+
+        # Configure install options
+        export KAMEL_INSTALL_BUILD_PUBLISH_STRATEGY=Spectrum
+        export KAMEL_INSTALL_MAVEN_REPOSITORIES=$(make get-staging-repo)
+        export KAMEL_INSTALL_REGISTRY=$KIND_REGISTRY
+        export KAMEL_INSTALL_REGISTRY_INSECURE=true
+
+        # TODO: Install OLM and cover upgrade managed by OLM
+        export KAMEL_INSTALL_OLM=false
+
+        # Configure test options
+        export KAMEL_K_TEST_OPERATOR_CURRENT_IMAGE=$KIND_REGISTRY/apache/camel-k:$(make get-version)
+
+        # Then run integration tests
+        make test-upgrade
diff --git a/e2e/upgrade/files/yaml.yaml b/e2e/upgrade/files/yaml.yaml
new file mode 100644
index 0000000..9ccf652
--- /dev/null
+++ b/e2e/upgrade/files/yaml.yaml
@@ -0,0 +1,28 @@
+# ---------------------------------------------------------------------------
+# 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.
+# ---------------------------------------------------------------------------
+
+- from:
+    uri: "timer:yaml"
+    parameters:
+      period: "5000"
+    steps:
+      - set-header:
+          name: "m"
+          constant: "string!"
+      - set-body:
+          simple: "Magic${header.m}"
+      - to: "log:info"
diff --git a/e2e/upgrade/upgrade_operator_test.go b/e2e/upgrade/upgrade_operator_test.go
new file mode 100644
index 0000000..4ba51b6
--- /dev/null
+++ b/e2e/upgrade/upgrade_operator_test.go
@@ -0,0 +1,92 @@
+// +build integration
+
+// To enable compilation of this file in Goland, go to "Settings -> Go -> Vendoring & Build Tags -> Custom Tags" and add "integration"
+
+/*
+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.
+*/
+
+package common
+
+import (
+	"os"
+	"testing"
+	"time"
+
+	. "github.com/onsi/gomega"
+
+	v1 "k8s.io/api/core/v1"
+
+	. "github.com/apache/camel-k/e2e/support"
+	camelv1 "github.com/apache/camel-k/pkg/apis/camel/v1"
+	"github.com/apache/camel-k/pkg/util/defaults"
+)
+
+func TestOperatorUpgrade(t *testing.T) {
+	WithNewTestNamespace(t, func(ns string) {
+		version, ok := os.LookupEnv("KAMEL_VERSION")
+		Expect(ok).To(BeTrue())
+
+		image, ok := os.LookupEnv("KAMEL_K_TEST_OPERATOR_CURRENT_IMAGE")
+		Expect(ok).To(BeTrue())
+
+		Expect(Kamel("install", "--cluster-setup").Execute()).To(Succeed())
+		Expect(Kamel("install", "-n", ns).Execute()).To(Succeed())
+		Eventually(PlatformVersion(ns)).Should(Equal(version))
+
+		// Run the Integration
+		name := "yaml"
+		Expect(Kamel("run", "-n", ns, "files/yaml.yaml").Execute()).To(Succeed())
+		Eventually(IntegrationPodPhase(ns, name), TestTimeoutMedium).Should(Equal(v1.PodRunning))
+		Eventually(IntegrationCondition(ns, name, camelv1.IntegrationConditionReady), TestTimeoutShort).Should(Equal(v1.ConditionTrue))
+		// Check the Integration version
+		Eventually(IntegrationVersion(ns, "yaml")).Should(Equal(version))
+		kit := IntegrationKit(ns, "yaml")()
+
+		// Clear the KAMEL_BIN environment variable so that the current version is used from now on
+		Expect(os.Setenv("KAMEL_BIN", "")).To(Succeed())
+
+		// Upgrade the operator by installing the current version
+		// FIXME: it seems forcing the installation does not re-install the CRDs
+		Expect(Kamel("install", "--cluster-setup", "--force").Execute()).To(Succeed())
+		Expect(Kamel("install", "-n", ns, "--force", "--operator-image", image).Execute()).To(Succeed())
+
+		Eventually(OperatorImage(ns)).Should(Equal(image))
+		Eventually(OperatorPodPhase(ns)).Should(Equal(v1.PodRunning))
+		Eventually(PlatformVersion(ns)).Should(Equal(defaults.Version))
+
+		// Check the Integration hasn't been upgraded
+		Consistently(IntegrationVersion(ns, "yaml"), 3*time.Second).Should(Equal(version))
+
+		// Force the Integration upgrade
+		Expect(Kamel("rebuild", "yaml", "-n", ns).Execute()).To(Succeed())
+
+		// Check the Integration version change
+		Eventually(IntegrationVersion(ns, "yaml")).Should(Equal(defaults.Version))
+		// Check the previous kit is not garbage collected
+		Eventually(KitsWithVersion(ns, version)).Should(Equal(1))
+		// Check a new kit is created with the current version
+		Eventually(KitsWithVersion(ns, defaults.Version)).Should(Equal(1))
+		// Check the Integration uses the new kit
+		Eventually(IntegrationKit(ns, "yaml"), TestTimeoutMedium).ShouldNot(Equal(kit))
+		// Check the Integration runs correctly
+		Eventually(IntegrationPodPhase(ns, "yaml"), TestTimeoutMedium).Should(Equal(v1.PodRunning))
+		Eventually(IntegrationCondition(ns, name, camelv1.IntegrationConditionReady), TestTimeoutShort).Should(Equal(v1.ConditionTrue))
+
+		// Clean up
+		Expect(Kamel("delete", "--all", "-n", ns).Execute()).To(Succeed())
+	})
+}
diff --git a/script/Makefile b/script/Makefile
index 527613b..0cf0dde 100644
--- a/script/Makefile
+++ b/script/Makefile
@@ -173,6 +173,10 @@ test-kamel-cli: build
 	STAGING_RUNTIME_REPO="$(STAGING_RUNTIME_REPO)" go test -timeout 60m -v ./e2e/common/cli -tags=integration
 	#go test -timeout 60m -v ./e2e/common/cli -tags=integration
 
+test-upgrade: build
+	STAGING_RUNTIME_REPO="$(STAGING_RUNTIME_REPO)" \
+	go test -timeout 60m -v ./e2e/upgrade -tags=integration
+
 build-kamel:
 # Ensure the binary is statically linked when building on Linux due to ABI changes in newer glibc 2.32, otherwise
 # it would not run on older versions. See https://github.com/apache/camel-k/pull/2141#issuecomment-800990117
@@ -261,6 +265,9 @@ images-push-staging:
 get-version:
 	@echo $(VERSION)
 
+get-last-released-version:
+	@echo $(LAST_RELEASED_VERSION)
+
 set-version:
 	./script/set_version.sh $(VERSION) $(IMAGE_NAME)
 

[camel-k] 07/07: fix(e2e): Refresh test client to account for new CRDs

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

astefanutti pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel-k.git

commit 5f8bd10de70a5e8e7b1179f1d8521e2263fd678e
Author: Antonin Stefanutti <an...@stefanutti.fr>
AuthorDate: Wed Mar 24 10:06:45 2021 +0100

    fix(e2e): Refresh test client to account for new CRDs
---
 e2e/support/test_support.go          | 29 +++++++++--------------------
 e2e/upgrade/upgrade_operator_test.go |  4 ++++
 2 files changed, 13 insertions(+), 20 deletions(-)

diff --git a/e2e/support/test_support.go b/e2e/support/test_support.go
index f9a6f5c..1b45266 100644
--- a/e2e/support/test_support.go
+++ b/e2e/support/test_support.go
@@ -93,6 +93,15 @@ func TestClient() client.Client {
 	return testClient
 }
 
+func SyncClient() client.Client {
+	var err error
+	testClient, err = NewTestClient()
+	if err != nil {
+		panic(err)
+	}
+	return testClient
+}
+
 // KamelHooks contains hooks useful to add option to kamel commands at runtime
 var KamelHooks []func([]string) []string
 
@@ -550,15 +559,6 @@ func IntegrationKit(ns string, name string) func() string {
 	}
 }
 
-func SetIntegrationVersion(ns string, name string, version string) error {
-	it := Integration(ns, name)()
-	if it == nil {
-		return fmt.Errorf("no integration named %s found", name)
-	}
-	it.Status.Version = version
-	return TestClient().Status().Update(TestContext, it)
-}
-
 func UpdateIntegration(ns string, name string, upd func(it *v1.Integration)) error {
 	it := Integration(ns, name)()
 	if it == nil {
@@ -596,17 +596,6 @@ func KitsWithVersion(ns string, version string) func() int {
 	}
 }
 
-func SetAllKitsVersion(ns string, version string) error {
-	for _, k := range Kits(ns)() {
-		kit := k
-		kit.Status.Version = version
-		if err := TestClient().Status().Update(TestContext, &kit); err != nil {
-			return err
-		}
-	}
-	return nil
-}
-
 func OperatorImage(ns string) func() string {
 	return func() string {
 		pod := OperatorPod(ns)()
diff --git a/e2e/upgrade/upgrade_operator_test.go b/e2e/upgrade/upgrade_operator_test.go
index 13b0960..9510846 100644
--- a/e2e/upgrade/upgrade_operator_test.go
+++ b/e2e/upgrade/upgrade_operator_test.go
@@ -48,6 +48,10 @@ func TestOperatorUpgrade(t *testing.T) {
 
 		// Check the operator pod is running
 		Eventually(OperatorPodPhase(ns), TestTimeoutMedium).Should(Equal(v1.PodRunning))
+
+		// Refresh the test client to account for the newly installed CRDs
+		SyncClient()
+
 		// Check the IntegrationPlatform has been reconciled
 		Eventually(PlatformVersion(ns), TestTimeoutMedium).Should(Equal(version))
 

[camel-k] 06/07: fix(e2e): Increase timeouts

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

astefanutti pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel-k.git

commit e038ed3278727bcefac4bc827fc4ed415d307cb4
Author: Antonin Stefanutti <an...@stefanutti.fr>
AuthorDate: Tue Mar 23 19:33:51 2021 +0100

    fix(e2e): Increase timeouts
---
 e2e/upgrade/upgrade_operator_test.go | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/e2e/upgrade/upgrade_operator_test.go b/e2e/upgrade/upgrade_operator_test.go
index a26cce4..13b0960 100644
--- a/e2e/upgrade/upgrade_operator_test.go
+++ b/e2e/upgrade/upgrade_operator_test.go
@@ -45,7 +45,11 @@ func TestOperatorUpgrade(t *testing.T) {
 
 		Expect(Kamel("install", "--cluster-setup").Execute()).To(Succeed())
 		Expect(Kamel("install", "-n", ns).Execute()).To(Succeed())
-		Eventually(PlatformVersion(ns)).Should(Equal(version))
+
+		// Check the operator pod is running
+		Eventually(OperatorPodPhase(ns), TestTimeoutMedium).Should(Equal(v1.PodRunning))
+		// Check the IntegrationPlatform has been reconciled
+		Eventually(PlatformVersion(ns), TestTimeoutMedium).Should(Equal(version))
 
 		// Run the Integration
 		name := "yaml"
@@ -64,9 +68,12 @@ func TestOperatorUpgrade(t *testing.T) {
 		Expect(Kamel("install", "--cluster-setup", "--force").Execute()).To(Succeed())
 		Expect(Kamel("install", "-n", ns, "--force", "--operator-image", image).Execute()).To(Succeed())
 
+		// Check the operator image is the current built one
 		Eventually(OperatorImage(ns)).Should(Equal(image))
-		Eventually(OperatorPodPhase(ns)).Should(Equal(v1.PodRunning))
-		Eventually(PlatformVersion(ns)).Should(Equal(defaults.Version))
+		// Check the operator pod is running
+		Eventually(OperatorPodPhase(ns), TestTimeoutMedium).Should(Equal(v1.PodRunning))
+		// Check the IntegrationPlatform has been reconciled
+		Eventually(PlatformVersion(ns), TestTimeoutMedium).Should(Equal(defaults.Version))
 
 		// Check the Integration hasn't been upgraded
 		Consistently(IntegrationVersion(ns, "yaml"), 3*time.Second).Should(Equal(version))

[camel-k] 03/07: fix(e2e): Environment variables are step scoped

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

astefanutti pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel-k.git

commit d362b1204451e5cbf29a7171cdf7d8c940181d47
Author: Antonin Stefanutti <an...@stefanutti.fr>
AuthorDate: Tue Mar 23 13:04:36 2021 +0100

    fix(e2e): Environment variables are step scoped
---
 .github/workflows/upgrade.yml        | 1 +
 e2e/upgrade/upgrade_operator_test.go | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/.github/workflows/upgrade.yml b/.github/workflows/upgrade.yml
index 04bca28..239ce4a 100644
--- a/.github/workflows/upgrade.yml
+++ b/.github/workflows/upgrade.yml
@@ -109,6 +109,7 @@ jobs:
         export KAMEL_INSTALL_OLM=false
 
         # Configure test options
+        export KAMEL_K_TEST_RELEASE_VERSION=$(make get-last-released-version)
         export KAMEL_K_TEST_OPERATOR_CURRENT_IMAGE=$KIND_REGISTRY/apache/camel-k:$(make get-version)
 
         # Then run integration tests
diff --git a/e2e/upgrade/upgrade_operator_test.go b/e2e/upgrade/upgrade_operator_test.go
index 4ba51b6..a26cce4 100644
--- a/e2e/upgrade/upgrade_operator_test.go
+++ b/e2e/upgrade/upgrade_operator_test.go
@@ -37,7 +37,7 @@ import (
 
 func TestOperatorUpgrade(t *testing.T) {
 	WithNewTestNamespace(t, func(ns string) {
-		version, ok := os.LookupEnv("KAMEL_VERSION")
+		version, ok := os.LookupEnv("KAMEL_K_TEST_RELEASE_VERSION")
 		Expect(ok).To(BeTrue())
 
 		image, ok := os.LookupEnv("KAMEL_K_TEST_OPERATOR_CURRENT_IMAGE")

[camel-k] 04/07: chore(test): Dump Deployments on test error

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

astefanutti pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel-k.git

commit 5e6247c557e5d4f68fcd1d118a79e80b52ef68c4
Author: Antonin Stefanutti <an...@stefanutti.fr>
AuthorDate: Tue Mar 23 15:13:07 2021 +0100

    chore(test): Dump Deployments on test error
---
 e2e/support/util/dump.go | 19 +++++++++++++++++--
 1 file changed, 17 insertions(+), 2 deletions(-)

diff --git a/e2e/support/util/dump.go b/e2e/support/util/dump.go
index 46da455..8a456ad 100644
--- a/e2e/support/util/dump.go
+++ b/e2e/support/util/dump.go
@@ -25,11 +25,12 @@ import (
 	"fmt"
 	"testing"
 
+	v1 "k8s.io/api/core/v1"
+	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+
 	"github.com/apache/camel-k/pkg/client"
 	"github.com/apache/camel-k/pkg/client/camel/clientset/versioned"
 	"github.com/apache/camel-k/pkg/util/kubernetes"
-	v1 "k8s.io/api/core/v1"
-	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
 )
 
 // Dump prints all information about the given namespace to debug errors
@@ -97,6 +98,20 @@ func Dump(ctx context.Context, c client.Client, ns string, t *testing.T) error {
 		t.Logf("---\n%s\n---\n", string(pdata))
 	}
 
+	deployments, err := c.AppsV1().Deployments(ns).List(ctx, metav1.ListOptions{})
+	if err != nil {
+		return err
+	}
+	t.Logf("Found %d deployments:\n", len(iks.Items))
+	for _, deployment := range deployments.Items {
+		ref := deployment
+		data, err := kubernetes.ToYAML(&ref)
+		if err != nil {
+			return err
+		}
+		t.Logf("---\n%s\n---\n", string(data))
+	}
+
 	lst, err := c.CoreV1().Pods(ns).List(ctx, metav1.ListOptions{})
 	if err != nil {
 		return err

[camel-k] 05/07: test: Fix KAMEL_BIN environment variable

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

astefanutti pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel-k.git

commit bf4731c8c5adb099d76620ac6f9fa4977dd20636
Author: Antonin Stefanutti <an...@stefanutti.fr>
AuthorDate: Tue Mar 23 18:46:41 2021 +0100

    test: Fix KAMEL_BIN environment variable
---
 .github/workflows/upgrade.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.github/workflows/upgrade.yml b/.github/workflows/upgrade.yml
index 239ce4a..b3b2e2a 100644
--- a/.github/workflows/upgrade.yml
+++ b/.github/workflows/upgrade.yml
@@ -97,7 +97,7 @@ jobs:
     - name: Run IT
       run: |
         # Use the last released Kamel CLI
-        KAMEL_BIN=kamel
+        export KAMEL_BIN=/usr/local/bin/kamel
 
         # Configure install options
         export KAMEL_INSTALL_BUILD_PUBLISH_STRATEGY=Spectrum