Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make travis more efficient #84

Closed
wants to merge 11 commits into from
Closed
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,7 @@ notifications:
install: true

before_install:
- 'if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then openssl aes-256-cbc -K $encrypted_ff5bbb6225c5_key -iv $encrypted_ff5bbb6225c5_iv -in tests/credentials.json.enc -out tests/credentials.json -d; fi'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why are you removing the encryption. it needs this to get the credentials for the test case.

- git clone https://github.com/openwhisk/openwhisk.git
- cd openwhisk
- 'if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then bash ./tools/travis/setup.sh; fi'

- ./tools/travis/setup.sh

script:
- ../tools/travis/build.sh
- ./tools/travis/build.sh
22 changes: 13 additions & 9 deletions tools/travis/build.sh
Original file line number Diff line number Diff line change
@@ -1,17 +1,22 @@
#!/bin/bash
set -e

# Build script for Travis-CI.

SCRIPTDIR=$(cd $(dirname "$0") && pwd)
ROOTDIR="$SCRIPTDIR/../.."
WHISKDIR="$ROOTDIR/openwhisk"

cd $WHISKDIR
WHISKDIR="$ROOTDIR/../openwhisk"
Copy link
Contributor

@jasonpet jasonpet Nov 30, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you need to change the location of where openwhisk is cloned to if you want to make this change. currently this is cloned by the setup.sh that is found in the openwhisk repo. you can create your own setup.sh if you want and clone it to a different location.

UTILDIR="$ROOTDIR/../incubator-openwhisk-utilities"

tools/build/scanCode.py $ROOTDIR
# run scancode
cd $UTILDIR
scancode/scanCode.py $ROOTDIR

# No point to continue with PRs, since encryption is on
if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then exit 0; fi
# run jshint
cd $ROOTDIR/packages
jshint .

# Install OpenWhisk
cd $WHISKDIR/ansible

ANSIBLE_CMD="ansible-playbook -i environments/local"
Expand All @@ -23,7 +28,7 @@ $ANSIBLE_CMD initdb.yml

cd $WHISKDIR

./gradlew distDocker
TERM=dumb ./gradlew distDocker

cd $WHISKDIR/ansible

Expand Down Expand Up @@ -51,5 +56,4 @@ source $ROOTDIR/packages/installCatalog.sh $AUTH_KEY $EDGE_HOST $WSK_CLI

# Test
cd $ROOTDIR
./gradlew :tests:test

TERM=dumb ./gradlew :tests:test
18 changes: 18 additions & 0 deletions tools/travis/setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/bash

SCRIPTDIR=$(cd $(dirname "$0") && pwd)
HOMEDIR="$SCRIPTDIR/../../../"

# jshint support
sudo apt-get -y install nodejs npm
sudo npm install -g jshint

# clone utilties repo. in order to run scanCode.py
cd $HOMEDIR
git clone https://github.com/apache/incubator-openwhisk-utilities.git

# shallow clone OpenWhisk repo.
git clone --depth 1 https://github.com/apache/incubator-openwhisk.git openwhisk

cd openwhisk
./tools/travis/setup.sh