dubeejw commented on a change in pull request #184: Create tarball for Nginx 
container in OpenWhisk as part of release deploy script
URL: 
https://github.com/apache/incubator-openwhisk-cli/pull/184#discussion_r162757244
 
 

 ##########
 File path: tools/travis/test_openwhisk.sh
 ##########
 @@ -2,57 +2,87 @@
 
 set -e
 
-cd $TRAVIS_BUILD_DIR
-./tools/travis/scancode.sh
-make lint
-make build
-make test
-export PATH=$PATH:$TRAVIS_BUILD_DIR;
-make native_test;
-
-export OPENWHISK_HOME="$(dirname "$TRAVIS_BUILD_DIR")/incubator-openwhisk";
+#
+#  At this point, the Travis build should already have built the binaries and
+#  the release.  If you're running manually, this command should get you to
+#  the same place:
+#
+#    ./gradlew buildBinaries release --PcrossCompile=true
+#
+#  Also at this point, you should already have incubator-openwhisk pulled down
+#  from gradle in the parent directory, using a command such as:
+#
+#    git clone --depth 3 https://github.com/apache/incubator-openwhisk.git
+#
+#  To be clear, your directory structure will look something like...
+#
+#      $HOMEDIR
+#       |- incubator-openwhisk
+#       |- incubator-openwhisk-cli (This project)
+#       |- incubator-openwhisk-utilities (For scancode)
+#
+#  The idea is to only build once and to be transparent about building in
+#  the Travis script.  To that end, some of the other builds that had been
+#  done in this script will be moved into Travis.yml.
+#
+
+#
+#  Figure out default directories, etc., so we're not beholden to Travis
+#  when running tests of the script.
+#
+scriptdir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
+
+TRAVIS_BUILD_DIR="$( cd "${TRAVIS_BUILD_DIR:-$scriptdir/../..}" && pwd )"
+export TRAVIS_BUILD_DIR
+
+# For the gradle builds.
 HOMEDIR="$(dirname "$TRAVIS_BUILD_DIR")"
-cd $HOMEDIR
+OPENWHISK_HOME="$( cd "${OPENWHISK_HOME:-$HOMEDIR/incubator-openwhisk}" && pwd 
)"
+export OPENWHISK_HOME
 
-# Clone the OpenWhisk code
-git clone --depth 3 https://github.com/apache/incubator-openwhisk.git
+#
+#  These are the basic tests
+#
+../incubator-openwhisk-utilities/scancode/scanCode.py $TRAVIS_BUILD_DIR
 
-# Build script for Travis-CI.
-WHISKDIR="$HOMEDIR/incubator-openwhisk"
+#  Run separate test scopes as separate
+./gradlew --console=plain goLint
+./gradlew --console=plain goTest -PgoTags=unit
+export PATH=$PATH:$TRAVIS_BUILD_DIR
+./gradlew --console=plain goTest -PgoTags=native
 
-cd $WHISKDIR
+#
+#  Set up the OpenWhisk environment ( TODO: reusable script for 
incubtor-openwhisk? )
+cd $OPENWHISK_HOME
 ./tools/travis/setup.sh
 
 ANSIBLE_CMD="ansible-playbook -i environments/local -e 
docker_image_prefix=testing"
-TERM=dumb ./gradlew distDocker -PdockerImagePrefix=testing
+./gradlew --console=plain distDocker -PdockerImagePrefix=testing
 
-cd $WHISKDIR/ansible
+cd $OPENWHISK_HOME/ansible
 $ANSIBLE_CMD setup.yml
 $ANSIBLE_CMD prereq.yml
 $ANSIBLE_CMD couchdb.yml
 $ANSIBLE_CMD initdb.yml
 $ANSIBLE_CMD apigateway.yml
-
-cd $TRAVIS_BUILD_DIR
-TERM=dumb ./gradlew buildBinaries
-
-cd $WHISKDIR/ansible
 $ANSIBLE_CMD wipe.yml
+# TODO -- Some flag might be needed to get CLI from local directory (?)
 
 Review comment:
   Nope. What you have is right.

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to