You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by GitBox <gi...@apache.org> on 2018/05/08 15:14:50 UTC

[GitHub] ddragosd closed pull request #297: refactor travis setup

ddragosd closed pull request #297: refactor travis setup
URL: https://github.com/apache/incubator-openwhisk-apigateway/pull/297
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/tools/travis/build.sh b/tools/travis/build.sh
index f5f91e2..29f9813 100755
--- a/tools/travis/build.sh
+++ b/tools/travis/build.sh
@@ -16,22 +16,23 @@
 # limitations under the License.
 #
 
-set -e
-set -x
+set -ex
 
 # Build script for Travis-CI.
 SCRIPTDIR="$(cd "$(dirname "$0")" && pwd)"
 ROOTDIR="$SCRIPTDIR/../.."
 HOMEDIR="$ROOTDIR/.."
-WHISKDIR="$ROOTDIR/../openwhisk"
-UTILDIR="$ROOTDIR/../incubator-openwhisk-utilities"
+WHISKDIR="$HOMEDIR/openwhisk"
+UTILDIR="$HOMEDIR/incubator-openwhisk-utilities"
+# Set Environment
+export OPENWHISK_HOME=$WHISKDIR
 
 # run scancode util. against project source using the ASF strict configuration
 cd $UTILDIR
 scancode/scanCode.py --config scancode/ASF-Release.cfg $ROOTDIR
 
 # Install OpenWhisk
-cd $WHISKDIR/ansible
+cd $OPENWHISK_HOME/ansible
 
 ANSIBLE_CMD="ansible-playbook -i environments/local  -e docker_image_prefix=openwhisk"
 
@@ -56,11 +57,10 @@ $ANSIBLE_CMD apigateway.yml -e apigateway_local_build=true
 $ANSIBLE_CMD wipe.yml
 $ANSIBLE_CMD openwhisk.yml -e cli_installation_mode=remote -e controllerProtocolForSetup=http
 
-# Set Environment
-export OPENWHISK_HOME=$WHISKDIR
+
 
 # Tests
-cd $WHISKDIR
+cd $OPENWHISK_HOME
 cat whisk.properties
 
 WSK_TESTS_DEPS_EXCLUDE="-x :actionRuntimes:pythonAction:distDocker -x :actionRuntimes:javaAction:distDocker -x :actionRuntimes:nodejs6Action:distDocker -x :actionRuntimes:nodejs8Action:distDocker -x :actionRuntimes:actionProxy:distDocker -x :sdk:docker:distDocker -x :actionRuntimes:python2Action:distDocker -x :tests:dat:blackbox:badaction:distDocker -x :tests:dat:blackbox:badproxy:distDocker"
diff --git a/tools/travis/setup.sh b/tools/travis/setup.sh
index 1358ef1..27d7b10 100755
--- a/tools/travis/setup.sh
+++ b/tools/travis/setup.sh
@@ -17,7 +17,7 @@
 #
 
 SCRIPTDIR=$(cd $(dirname "$0") && pwd)
-HOMEDIR="$SCRIPTDIR/../../../"
+HOMEDIR="$SCRIPTDIR/../../.."
 
 sudo gpasswd -a travis docker
 sudo -E bash -c 'echo '\''DOCKER_OPTS="-H tcp://0.0.0.0:4243 -H unix:///var/run/docker.sock --storage-driver=overlay --userns-remap=default"'\'' > /etc/default/docker'
@@ -31,20 +31,15 @@ docker version
 echo "Docker Info:"
 docker info
 
-# Python
-pip install --user jsonschema
-pip install --user couchdb
-
-# Ansible
-pip install --user ansible==2.5.0
-
 # jshint support
 sudo apt-get -y install nodejs npm
 sudo npm install -g jshint
 
-# clone OpenWhisk main repo.
+# clone OpenWhisk utilities repo. in order to run scanCode
 cd $HOMEDIR
-git clone --depth=1 https://github.com/apache/incubator-openwhisk.git openwhisk
-
-# clone the openwhisk utilities repo.
 git clone https://github.com/apache/incubator-openwhisk-utilities.git
+
+# clone main openwhisk repo. for testing purposes
+git clone --depth=1 https://github.com/apache/incubator-openwhisk.git openwhisk
+cd openwhisk
+./tools/travis/setup.sh


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services