From 64c838acba34a2ea2ee3b71a3d80573ec22913cc Mon Sep 17 00:00:00 2001 From: sebv Date: Mon, 31 Mar 2014 22:06:04 +0800 Subject: [PATCH] build upload to sauce --- .travis.yml | 23 ++++++++++++++--------- ci/upload_build_to_sauce.sh | 10 ++++++++++ 2 files changed, 24 insertions(+), 9 deletions(-) create mode 100755 ci/upload_build_to_sauce.sh diff --git a/.travis.yml b/.travis.yml index b45d1bca3..5a682e5a8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,14 +3,19 @@ osx_image: mavericks notifications: email: false env: + global: + - secure: KNDEn/ryhd0yRGzpJSfHRKBzBIC73RKaHWFDkqD4E+iUXepwBfF2bBfningf8f++9qLNscumYZOHjQ0PWf/YALQCr5B2vHsGN+eHWc331d8f5sU/b6oyCAxsayI32lr/mNVCuHd44+ManMcKUH6831Q1qwa15o5w4dDPtJKuv6Y= + - secure: gZ9B0mE58AYdjVxvj5z27c+0pNJqrRzJiXdSe8T0UswR3gFxhOYoW1ikFTcij1NcQhdzDwGIDDJl30D6Z69Y73W3wagowkELasPeNcKobWqerof5lG8A6Qud90jXedABdXw9FEGnY47mG3/ZWwyx1KyOVkIlxoabkCqUwd7xaio= matrix: - - CI_CONFIG=unit - - CI_CONFIG=build + - CI_CONFIG=unit + - CI_CONFIG=build before_script: - - ./ci/install-node.sh - - ./ci/show-env.sh - - npm install -g jshint grunt-cli - - npm install - - ./ci/before_script_extra.sh -script: - - ./ci/script.sh +- ./ci/install-node.sh +- ./ci/show-env.sh +- npm install -g jshint grunt-cli +- npm install +- ./ci/before_script_extra.sh +script: +- ./ci/script.sh +after_success: +- ./ci/upload_build_to_sauce.sh diff --git a/ci/upload_build_to_sauce.sh b/ci/upload_build_to_sauce.sh new file mode 100755 index 000000000..1395202d5 --- /dev/null +++ b/ci/upload_build_to_sauce.sh @@ -0,0 +1,10 @@ +#!/bin/sh +GIT_COMMIT=git rev-parse --short HEAD 2> /dev/null | sed "s/\(.*\)/\1/" +tar cvfj - --exclude=node_modules --exclude=submodules . | \ +curl \ + --verbose \ + --progress-bar \ + -u $SAUCE_USERNAME:$SAUCE_ACCESS_KEY \ + -X POST "https://saucelabs.com/rest/v1/storage/${SAUCE_USERNAME}/appium-dev-$(GIT_COMMIT).bjz?overwrite=true" \ + -H "Content-Type: application/octet-stream" \ + --data-binary @- > /tmp/curl.out