You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2022/11/25 13:36:18 UTC

[camel-kamelets] branch azure-storage-blob-sink created (now 5c667afb)

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

acosentino pushed a change to branch azure-storage-blob-sink
in repository https://gitbox.apache.org/repos/asf/camel-kamelets.git


      at 5c667afb Azure Storage Blob Sink/Source Kamelets it-tests: Don't log useless information

This branch includes the following new commits:

     new 6e218353 Azure Storage Blob Sink Kamelet: Add it-test
     new 8d0f499f Azure Storage Blob Sink Kamelet: Add it-test to Makefile
     new 5c667afb Azure Storage Blob Sink/Source Kamelets it-tests: Don't log useless information

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.



[camel-kamelets] 02/03: Azure Storage Blob Sink Kamelet: Add it-test to Makefile

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

acosentino pushed a commit to branch azure-storage-blob-sink
in repository https://gitbox.apache.org/repos/asf/camel-kamelets.git

commit 8d0f499fdaecd1f019bdd1ab59c8ba3c80c8a377
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Fri Nov 25 14:28:35 2022 +0100

    Azure Storage Blob Sink Kamelet: Add it-test to Makefile
    
    Signed-off-by: Andrea Cosentino <an...@gmail.com>
---
 it-tests/Makefile | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/it-tests/Makefile b/it-tests/Makefile
index 9fbb1e05..5017f22c 100644
--- a/it-tests/Makefile
+++ b/it-tests/Makefile
@@ -41,6 +41,8 @@ all:
 	./timer-scp-it-test.sh $(camel-version)
 	cd azure/azure-storage-blob/source/ && \
 	./azure-storage-blob-log-it-test.sh $(camel-version)
+	cd azure/azure-storage-blob/sink/ && \
+	./timer-azure-storage-blob-it-test.sh $(camel-version)
 	./scripts/results.sh
 	rm -rf tests	
 aws:
@@ -69,6 +71,8 @@ azure:
 	mkdir -p tests
 	cd azure/azure-storage-blob/source/ && \
 	./azure-storage-blob-log-it-test.sh $(camel-version)
+	cd azure/azure-storage-blob/sink/ && \
+	./timer-azure-storage-blob-it-test.sh $(camel-version)
 	./scripts/results.sh
 	rm -rf tests	
 misc:


[camel-kamelets] 01/03: Azure Storage Blob Sink Kamelet: Add it-test

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

acosentino pushed a commit to branch azure-storage-blob-sink
in repository https://gitbox.apache.org/repos/asf/camel-kamelets.git

commit 6e218353f0d48c69101562da2c4be0f6f15f3b33
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Fri Nov 25 14:26:08 2022 +0100

    Azure Storage Blob Sink Kamelet: Add it-test
    
    Signed-off-by: Andrea Cosentino <an...@gmail.com>
---
 .../azure-storage-blob/sink/terraform/main.tf      | 52 ++++++++++++++++++++++
 .../sink/timer-azure-storage-blob-it-test.sh       | 47 +++++++++++++++++++
 .../sink/timer-azure-storage-blob.yaml             | 28 ++++++++++++
 3 files changed, 127 insertions(+)

diff --git a/it-tests/azure/azure-storage-blob/sink/terraform/main.tf b/it-tests/azure/azure-storage-blob/sink/terraform/main.tf
new file mode 100644
index 00000000..319b107a
--- /dev/null
+++ b/it-tests/azure/azure-storage-blob/sink/terraform/main.tf
@@ -0,0 +1,52 @@
+/*
+ * 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.
+ */
+
+# We strongly recommend using the required_providers block to set the
+# Azure Provider source and version being used
+terraform {
+  required_providers {
+    azurerm = {
+      source  = "hashicorp/azurerm"
+      version = "=3.0.0"
+    }
+  }
+}
+
+# Configure the Microsoft Azure Provider
+provider "azurerm" {
+  features {}
+}
+
+resource "azurerm_resource_group" "kamelets" {
+  name     = "kamelets-resources"
+  location = "West Europe"
+}
+
+resource "azurerm_storage_account" "kamelets" {
+  name                     = "kameletsaccount"
+  resource_group_name      = azurerm_resource_group.kamelets.name
+  location                 = azurerm_resource_group.kamelets.location
+  account_tier             = "Standard"
+  account_replication_type = "LRS"
+}
+
+resource "azurerm_storage_container" "camelkamelets" {
+  name                  = "kamelets"
+  storage_account_name  = azurerm_storage_account.kamelets.name
+  container_access_type = "private"
+}
+	
diff --git a/it-tests/azure/azure-storage-blob/sink/timer-azure-storage-blob-it-test.sh b/it-tests/azure/azure-storage-blob/sink/timer-azure-storage-blob-it-test.sh
new file mode 100755
index 00000000..64ccbb27
--- /dev/null
+++ b/it-tests/azure/azure-storage-blob/sink/timer-azure-storage-blob-it-test.sh
@@ -0,0 +1,47 @@
+#!/bin/bash
+
+if [ $# -ne 1 ]; then
+    echo $0: usage: timer-azure-storage-blob-it-test.sh camel-version
+    exit 1
+fi
+
+camel_version=$1
+
+cd terraform/
+terraform init
+terraform apply -auto-approve
+cd ../
+
+sleep 10
+
+accountKey=`az storage account keys list -n kameletsaccount | jq -r ' .[0] | .value'`
+echo $accountKey
+az storage account keys list -n kameletsaccount | echo "camel.kamelet.azure-storage-blob-sink.accessKey = $accountKey" > azure-keys.properties
+
+jbang run --fresh -Dcamel.jbang.version=$camel_version camel@apache/camel run --properties=azure-keys.properties timer-azure-storage-blob.yaml &
+
+sleep 30
+
+variable=`jbang run -Dcamel.jbang.version=$camel_version camel@apache/camel get integration timer-azure-storage-blob | tail -n +2` 
+echo $variable 
+success=`echo $variable | cut -d' ' -f11`
+fail=`echo $variable | cut -d' ' -f12`
+echo $success $fail
+if [[ $success == 5 && $fail == 0 ]] 
+then 
+    mkdir -p ../../../tests/
+    echo "Test Successful" > ../../../tests/timer-azure-storage-blob-it-test.result ;
+else
+    mkdir -p ../../../tests/
+    echo "Test failed" > ../../../tests/timer-azure-storage-blob-it-test.result ;
+fi
+
+jbang run -Dcamel.jbang.version=$camel_version camel@apache/camel stop timer-azure-storage-blob
+
+cd terraform/
+terraform destroy -auto-approve
+cd ../
+
+rm -rf azure-keys.properties
+
+cat ../../../tests/timer-azure-storage-blob-it-test.result
diff --git a/it-tests/azure/azure-storage-blob/sink/timer-azure-storage-blob.yaml b/it-tests/azure/azure-storage-blob/sink/timer-azure-storage-blob.yaml
new file mode 100644
index 00000000..12de526a
--- /dev/null
+++ b/it-tests/azure/azure-storage-blob/sink/timer-azure-storage-blob.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.
+## ---------------------------------------------------------------------------
+
+- route:
+    from:
+      uri: "timer://foo?delay=0&fixedRate=true&period=1000&repeatCount=5"
+      steps:
+      - set-body:
+          constant: "test"
+      - to: 
+          uri: "kamelet:azure-storage-blob-sink"
+          parameters:
+            accountName: "kameletsaccount"
+            containerName: "kamelets"


[camel-kamelets] 03/03: Azure Storage Blob Sink/Source Kamelets it-tests: Don't log useless information

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

acosentino pushed a commit to branch azure-storage-blob-sink
in repository https://gitbox.apache.org/repos/asf/camel-kamelets.git

commit 5c667afbdbf5f290ee9fa725c16c309b1cc85a7f
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Fri Nov 25 14:35:46 2022 +0100

    Azure Storage Blob Sink/Source Kamelets it-tests: Don't log useless information
    
    Signed-off-by: Andrea Cosentino <an...@gmail.com>
---
 .../azure-storage-blob/sink/timer-azure-storage-blob-it-test.sh      | 5 +----
 .../azure-storage-blob/source/azure-storage-blob-log-it-test.sh      | 1 -
 2 files changed, 1 insertion(+), 5 deletions(-)

diff --git a/it-tests/azure/azure-storage-blob/sink/timer-azure-storage-blob-it-test.sh b/it-tests/azure/azure-storage-blob/sink/timer-azure-storage-blob-it-test.sh
index 64ccbb27..16a2b922 100755
--- a/it-tests/azure/azure-storage-blob/sink/timer-azure-storage-blob-it-test.sh
+++ b/it-tests/azure/azure-storage-blob/sink/timer-azure-storage-blob-it-test.sh
@@ -15,18 +15,15 @@ cd ../
 sleep 10
 
 accountKey=`az storage account keys list -n kameletsaccount | jq -r ' .[0] | .value'`
-echo $accountKey
 az storage account keys list -n kameletsaccount | echo "camel.kamelet.azure-storage-blob-sink.accessKey = $accountKey" > azure-keys.properties
 
 jbang run --fresh -Dcamel.jbang.version=$camel_version camel@apache/camel run --properties=azure-keys.properties timer-azure-storage-blob.yaml &
 
 sleep 30
 
-variable=`jbang run -Dcamel.jbang.version=$camel_version camel@apache/camel get integration timer-azure-storage-blob | tail -n +2` 
-echo $variable 
+variable=`jbang run -Dcamel.jbang.version=$camel_version camel@apache/camel get integration timer-azure-storage-blob | tail -n +2`  
 success=`echo $variable | cut -d' ' -f11`
 fail=`echo $variable | cut -d' ' -f12`
-echo $success $fail
 if [[ $success == 5 && $fail == 0 ]] 
 then 
     mkdir -p ../../../tests/
diff --git a/it-tests/azure/azure-storage-blob/source/azure-storage-blob-log-it-test.sh b/it-tests/azure/azure-storage-blob/source/azure-storage-blob-log-it-test.sh
index b86a845e..e00fc064 100755
--- a/it-tests/azure/azure-storage-blob/source/azure-storage-blob-log-it-test.sh
+++ b/it-tests/azure/azure-storage-blob/source/azure-storage-blob-log-it-test.sh
@@ -13,7 +13,6 @@ terraform apply -auto-approve
 cd ../
 
 accountKey=`az storage account keys list -n kameletsaccount | jq -r ' .[0] | .value'`
-echo $accountKey
 az storage account keys list -n kameletsaccount | echo "camel.kamelet.azure-storage-blob-source.accessKey = $accountKey" > azure-keys.properties
 
 jbang run --fresh -Dcamel.jbang.version=$camel_version camel@apache/camel run --properties=azure-keys.properties azure-storage-blob-log.yaml &