You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by nf...@apache.org on 2020/02/21 23:38:25 UTC

[camel-k] branch master updated (2608d83 -> 9a7c4f7)

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

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


    from 2608d83  fix(platform): Default to pod build strategy for Kaniko
     new b8cd437  Fix #1205: change the warn message in case of env variables not bound
     new c548eea  Fix #1257: add e2e test for CBR in knative
     new 9a7c4f7  chore(ci): upgrade to actions/checkout@v2

The 3 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/build.yml                           |  2 +-
 .github/workflows/knative.yml                         |  2 +-
 .github/workflows/kubernetes.yml                      |  2 +-
 .github/workflows/openshift.yml                       |  2 +-
 .github/workflows/validate.yml                        |  2 +-
 e2e/files/knative1.groovy                             | 10 ++++++++--
 e2e/files/{knativegetpost2.groovy => knative3.groovy} |  4 ++--
 e2e/knative_test.go                                   | 10 +++++++++-
 pkg/trait/container.go                                |  4 ++--
 9 files changed, 26 insertions(+), 12 deletions(-)
 copy e2e/files/{knativegetpost2.groovy => knative3.groovy} (91%)


[camel-k] 02/03: Fix #1257: add e2e test for CBR in knative

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

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

commit c548eea0ad603ba8874551550d6d14221ab134ab
Author: Nicola Ferraro <ni...@gmail.com>
AuthorDate: Fri Feb 21 10:12:56 2020 +0100

    Fix #1257: add e2e test for CBR in knative
---
 e2e/files/knative1.groovy                      | 10 ++++++++--
 e2e/files/{knative1.groovy => knative3.groovy} |  6 ++----
 e2e/knative_test.go                            | 10 +++++++++-
 3 files changed, 19 insertions(+), 7 deletions(-)

diff --git a/e2e/files/knative1.groovy b/e2e/files/knative1.groovy
index d49be14..a089525 100644
--- a/e2e/files/knative1.groovy
+++ b/e2e/files/knative1.groovy
@@ -17,5 +17,11 @@
 
 from('timer:tick')
   .setBody().constant("")
-  .to('knative:endpoint/knative2')
-  .log('Received: ${body}')
+  .choice()
+	.when().simple('${random(0, 2)} == 0')
+	  .to('knative:endpoint/knative2')
+      .log('Received from 2: ${body}')
+	.otherwise()
+	  .to('knative:endpoint/knative3')
+      .log('Received from 3: ${body}')
+	.end()
diff --git a/e2e/files/knative1.groovy b/e2e/files/knative3.groovy
similarity index 88%
copy from e2e/files/knative1.groovy
copy to e2e/files/knative3.groovy
index d49be14..5603298 100644
--- a/e2e/files/knative1.groovy
+++ b/e2e/files/knative3.groovy
@@ -15,7 +15,5 @@
  * limitations under the License.
  */
 
-from('timer:tick')
-  .setBody().constant("")
-  .to('knative:endpoint/knative2')
-  .log('Received: ${body}')
+from('knative:endpoint/knative3')
+  .setBody().constant("Hello from knative3")
diff --git a/e2e/knative_test.go b/e2e/knative_test.go
index 0b4dbf7..564ca4a 100644
--- a/e2e/knative_test.go
+++ b/e2e/knative_test.go
@@ -35,9 +35,17 @@ func TestRunServiceCombo(t *testing.T) {
 		Expect(kamel("install", "-n", ns, "--trait-profile", "knative").Execute()).Should(BeNil())
 		Expect(kamel("run", "-n", ns, "files/knative2.groovy").Execute()).Should(BeNil())
 		Eventually(integrationPodPhase(ns, "knative2"), 10*time.Minute).Should(Equal(v1.PodRunning))
+		Expect(kamel("run", "-n", ns, "files/knative3.groovy").Execute()).Should(BeNil())
+		Eventually(integrationPodPhase(ns, "knative3"), 10*time.Minute).Should(Equal(v1.PodRunning))
 		Expect(kamel("run", "-n", ns, "files/knative1.groovy").Execute()).Should(BeNil())
 		Eventually(integrationPodPhase(ns, "knative1"), 10*time.Minute).Should(Equal(v1.PodRunning))
-		Eventually(integrationLogs(ns, "knative1"), 5*time.Minute).Should(ContainSubstring("Received: Hello from knative2"))
+		// Correct logs
+		Eventually(integrationLogs(ns, "knative1"), 5*time.Minute).Should(ContainSubstring("Received from 2: Hello from knative2"))
+		Eventually(integrationLogs(ns, "knative1"), 5*time.Minute).Should(ContainSubstring("Received from 3: Hello from knative3"))
+		// Incorrect logs
+		Consistently(integrationLogs(ns, "knative1"), 10*time.Second).ShouldNot(ContainSubstring("Received from 2: Hello from knative3"))
+		Consistently(integrationLogs(ns, "knative1"), 10*time.Second).ShouldNot(ContainSubstring("Received from 3: Hello from knative2"))
+		// Cleanup
 		Expect(kamel("delete", "--all", "-n", ns).Execute()).Should(BeNil())
 	})
 }


[camel-k] 01/03: Fix #1205: change the warn message in case of env variables not bound

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

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

commit b8cd4373c4092a47e404bd268d4bacfaa7327b3e
Author: Nicola Ferraro <ni...@gmail.com>
AuthorDate: Fri Feb 21 09:46:01 2020 +0100

    Fix #1205: change the warn message in case of env variables not bound
---
 pkg/trait/container.go | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pkg/trait/container.go b/pkg/trait/container.go
index 7bd473f..d7f9eca 100644
--- a/pkg/trait/container.go
+++ b/pkg/trait/container.go
@@ -139,9 +139,9 @@ func (t *containerTrait) Apply(e *Environment) error {
 			case env.ValueFrom.FieldRef != nil && env.ValueFrom.FieldRef.FieldPath == "metadata.namespace":
 				envvar.SetVar(&container.Env, corev1.EnvVar{Name: env.Name, Value: e.Integration.Namespace})
 			case env.ValueFrom.FieldRef != nil:
-				t.L.Infof("Environment variable %s uses fieldRef and cannot be set on a Knative service", env.Name)
+				t.L.Infof("Skipping environment variable %s (fieldRef)", env.Name)
 			case env.ValueFrom.ResourceFieldRef != nil:
-				t.L.Infof("Environment variable %s uses resourceFieldRef and cannot be set on a Knative service", env.Name)
+				t.L.Infof("Skipping environment variable %s (resourceFieldRef)", env.Name)
 			default:
 				envvar.SetVar(&container.Env, env)
 			}


[camel-k] 03/03: chore(ci): upgrade to actions/checkout@v2

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

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

commit 9a7c4f719df807662124db7eadc279ab229b8f9a
Author: Nicola Ferraro <ni...@gmail.com>
AuthorDate: Fri Feb 21 23:11:42 2020 +0100

    chore(ci): upgrade to actions/checkout@v2
---
 .github/workflows/build.yml      | 2 +-
 .github/workflows/knative.yml    | 2 +-
 .github/workflows/kubernetes.yml | 2 +-
 .github/workflows/openshift.yml  | 2 +-
 .github/workflows/validate.yml   | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index f3d9671..9f1ca15 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -38,7 +38,7 @@ jobs:
       with:
         go-version: 1.13.x
     - name: Checkout code
-      uses: actions/checkout@v1
+      uses: actions/checkout@v2
     - name: Cache modules
       uses: actions/cache@v1
       with:
diff --git a/.github/workflows/knative.yml b/.github/workflows/knative.yml
index 8c8a498..ef63c4e 100644
--- a/.github/workflows/knative.yml
+++ b/.github/workflows/knative.yml
@@ -32,7 +32,7 @@ jobs:
 
     steps:
     - name: Checkout code
-      uses: actions/checkout@v1
+      uses: actions/checkout@v2
     - name: Info
       run: |
         ls -lart
diff --git a/.github/workflows/kubernetes.yml b/.github/workflows/kubernetes.yml
index bd577e2..40e6902 100644
--- a/.github/workflows/kubernetes.yml
+++ b/.github/workflows/kubernetes.yml
@@ -32,7 +32,7 @@ jobs:
 
     steps:
     - name: Checkout code
-      uses: actions/checkout@v1
+      uses: actions/checkout@v2
     - name: Info
       run: |
         ls -lart
diff --git a/.github/workflows/openshift.yml b/.github/workflows/openshift.yml
index 1f44ed7..a390c1c 100644
--- a/.github/workflows/openshift.yml
+++ b/.github/workflows/openshift.yml
@@ -32,7 +32,7 @@ jobs:
 
     steps:
     - name: Checkout code
-      uses: actions/checkout@v1
+      uses: actions/checkout@v2
     - name: Info
       run: |
         ls -lart
diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml
index 16ac8ad..f8c2be7 100644
--- a/.github/workflows/validate.yml
+++ b/.github/workflows/validate.yml
@@ -29,7 +29,7 @@ jobs:
     runs-on: ubuntu-latest
     steps:
       - name: Check out code
-        uses: actions/checkout@v1
+        uses: actions/checkout@v2
       - name: Cache modules
         uses: actions/cache@v1
         with: