Addition of gitignore, travis yml, build.sh,README travis status badge and credentials.json.enc

Added action to actions folder and added feed to feeds folder.

Add permission to execute build.sh

Updated install.sh paths

Addition of executable permission to build.sh

Updated encryption

Addition of template credentials json object

Added src folder for tests

Moved Push Notifications tests file to src

Ran encrypt command a second time.

Update yml

Updated enc

Updated credentials.json.enc
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..11cd881
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,2 @@
+tests/credentials.json
+openwhisk
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 0000000..6448e89
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,21 @@
+sudo: required
+language: scala
+scala:
+- 2.11.6
+services:
+- docker
+env:
+  global:
+  - TERM=dumb
+notifications:
+  email: false
+install: true
+before_install:
+- openssl aes-256-cbc -K $encrypted_72eb7f877861_key -iv $encrypted_72eb7f877861_iv
+  -in tests/credentials.json.enc -out tests/credentials.json -d
+- chmod +x ./tools/travis/build.sh
+- git clone https://github.com/openwhisk/openwhisk.git
+- cd openwhisk
+- ./tools/travis/setup.sh
+script:
+- ../tools/travis/build.sh
diff --git a/README.md b/README.md
index 23e158a..c894a9b 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,7 @@
 
 
 # Using the Push package
-
+[![Build Status](https://travis-ci.org/openwhisk/openwhisk-package-pushnotifications?branch=master)](https://travis-ci.org/openwhisk/openwhisk-package-pushnotifications)
 The `/whisk.system/pushnotifications` package enables you to use Push Notification service with Whisk. It includes the following action and feed.
 
 | Entity | Type | Parameters | Description |
diff --git a/sendMessage.js b/actions/sendMessage.js
similarity index 100%
rename from sendMessage.js
rename to actions/sendMessage.js
diff --git a/webhook.js b/feeds/webhook.js
similarity index 100%
rename from webhook.js
rename to feeds/webhook.js
diff --git a/install.sh b/install.sh
index d610eaf..f21a0dd 100644
--- a/install.sh
+++ b/install.sh
@@ -20,6 +20,8 @@
 AUTH="$2"
 WSK_CLI="$3"
 
+PACKAGE_HOME="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
+
 # pushnotifications actions
 
 echo Installing pushnotifications package.
@@ -29,7 +31,7 @@
 -a parameters '[ {"name":"appId", "required":true, "description":"Bluemix application GUID"}, {"name":"appSecret", "required":true, "bindTime":true, "type":"password", "description":"Bluemix Push Service Secret"}]' \
 -a prettyName "Push Notifications"
 
-$WSK_CLI --apihost "$APIHOST" action update --auth "$AUTH" --shared yes pushnotifications/webhook "webhook.js" \
+$WSK_CLI --apihost "$APIHOST" action update --auth "$AUTH" --shared yes pushnotifications/webhook "$PACKAGE_HOME/feeds/webhook.js" \
 -a feed true \
 -a description 'pushnotifications feed' \
 -a parameters '[ {"name":"appId", "required":true, "description":"Bluemix application GUID"}, {"name":"appSecret", "required":true, "bindTime":true, "type":"password", "description":"Bluemix Push Service Secret"},{"name":"events", "required":true, "description":"Name of the event user want to subscribe"} ]' \
@@ -37,7 +39,7 @@
 -a sampleOutput '{"tagName": "tagName","eventType": "onDeviceRegister","applicationId": "xxx-xxx-xx"}'
 
 
-$WSK_CLI --apihost "$APIHOST" action update --auth "$AUTH" --shared yes pushnotifications/sendMessage "sendMessage.js" \
+$WSK_CLI --apihost "$APIHOST" action update --auth "$AUTH" --shared yes pushnotifications/sendMessage "$PACKAGE_HOME/actions/sendMessage.js" \
 -a description 'Send push notification to all application users or to a specific set of devices' \
 -a parameters '[ {"name":"appId", "required":true, "description":"Bluemix application GUID"}, {"name":"appSecret", "required":true, "bindTime":true, "type":"password", "description":"Bluemix Push Service Secret"}, {"name":"text", "required":true, "description":"The notification message to be shown to the user"}, {"name":"url", "required":false, "description":"An optional URL that can be sent along with the alert"}, {"name":"deviceIds", "required":false, "description":"Array of device IDs"}, {"name":"platforms", "required":false, "description":"Array of device platform"},{"name":"tagNames", "required":false, "description":"Array of tag names"},{"name":"gcmPayload", "required":false, "description":"Additional payload"},{"name":"gcmSound", "required":false, "description":"Sound file name"},{"name":"gcmCollapseKey", "required":false, "description":"This parameter identifies a group of messages"},{"name":"gcmDelayWhileIdle", "required":false, "description":"Send message when device is active"}, {"name":"gcmPriority", "required":false, "description":"Sets the priority of the message"}, {"name":"gcmTimeToLive", "required":false, "description":"Time limit for message to be delievered"}, {"name":"apnsBadge", "required":false, "description":"Value for Badge"}, {"name":"apnsCategory", "required":false, "description":"The category name"}, {"name":"apnsIosActionKey", "required":false, "description":"Title for the push notification action Key"},{"name":"apnsPayload", "required":false, "description":"Additional payload"},{"name":"apnsType", "required":false, "description":"Push notification type name"},{"name":"apnsSound", "required":false, "description":"APNS sound name"}]' \
 -a sampleInput '{"appId":"xxx-xxx-xx", "appSecret":"yyy-yyy-yyy", "text":"hi there"}' \
diff --git a/tests/credentials.json.enc b/tests/credentials.json.enc
new file mode 100644
index 0000000..49a5574
--- /dev/null
+++ b/tests/credentials.json.enc
Binary files differ
diff --git a/tests/PushNotificationsTests.scala b/tests/src/PushNotificationsTests.scala
similarity index 100%
rename from tests/PushNotificationsTests.scala
rename to tests/src/PushNotificationsTests.scala
diff --git a/tests/template_credentials.json b/tests/template_credentials.json
new file mode 100644
index 0000000..4849df0
--- /dev/null
+++ b/tests/template_credentials.json
@@ -0,0 +1,20 @@
+{
+    "template_service": [{
+        "name": "Service x",
+        "label": "service-x",
+        "credentials": {
+            "apiKey": "XXXXXXXX",
+            "apiToken": "YYYYYYY",
+            "base_uri": "https://openwhisk.ng.bluemix.net/api/v1",
+        }
+    }],
+    "another_service": [{
+        "name": "Service y",
+        "label": "service-y",
+        "credentials": {
+            "apiKey": "ZZZZZZZZZZ",
+            "apiToken": "MMMMMMMMMM",
+            "base_uri": "https://openwhisk.ng.bluemix.net/api/v1",
+        }
+    }]
+}
diff --git a/tools/travis/build.sh b/tools/travis/build.sh
new file mode 100644
index 0000000..8fda47b
--- /dev/null
+++ b/tools/travis/build.sh
@@ -0,0 +1,48 @@
+# Build script for Travis-CI.
+
+SCRIPTDIR=$(cd $(dirname "$0") && pwd)
+ROOTDIR="$SCRIPTDIR/../../openwhisk"
+
+cd $ROOTDIR
+
+cp $ROOTDIR/../tests/src/* $ROOTDIR/tests/src/packages/
+
+tools/build/scanCode.py .
+
+cd $ROOTDIR/ansible
+
+ANSIBLE_CMD="ansible-playbook -i environments/travis"
+
+$ANSIBLE_CMD setup.yml
+$ANSIBLE_CMD prereq.yml
+$ANSIBLE_CMD couchdb.yml
+$ANSIBLE_CMD initdb.yml
+
+cd $ROOTDIR
+
+./gradlew distDocker
+
+cd $ROOTDIR/ansible
+
+$ANSIBLE_CMD openwhisk.yml
+
+cd $ROOTDIR
+
+VCAP_SERVICES_FILE="$(readlink -f $ROOTDIR/../tests/credentials.json)"
+
+#update whisk.properties to add tests/credentials.json file to vcap.services.file, which is needed in tests
+WHISKPROPS_FILE="$ROOTDIR/whisk.properties"
+sed -i 's:^[ \t]*vcap.services.file[ \t]*=\([ \t]*.*\)$:vcap.services.file='$VCAP_SERVICES_FILE':'  $WHISKPROPS_FILE
+cat whisk.properties
+
+WSK_CLI=$ROOTDIR/bin/wsk
+AUTH_KEY=$(cat $ROOTDIR/ansible/files/auth.whisk.system)
+EDGE_HOST=$(grep '^edge.host=' $WHISKPROPS_FILE | cut -d'=' -f2) 
+
+# Install the package
+source $ROOTDIR/../install.sh $EDGE_HOST $AUTH_KEY $WSK_CLI
+
+#Test only the test cases classes in tests/src (Openwhisk dependencies are needed)
+X="./gradlew :tests:test "
+for f in $(ls $ROOTDIR/../tests/src | sed -e 's/\..*$//'); do X="$X --tests \"packages.$f\""; done
+eval $X