diff options
author | Philip Whineray <phil@firehol.org> | 2016-12-16 08:50:07 +0000 |
---|---|---|
committer | Philip Whineray <phil@firehol.org> | 2016-12-16 09:28:14 +0000 |
commit | 00a0f2c07ed546ee20a07da043c7b058377fb6f2 (patch) | |
tree | d99645fb17e1c0a73caa1e88ed28e6a95b1b9379 /.travis.yml | |
parent | f4827e695a2a67b3c37e316a61e28705f6972dd0 (diff) |
Fix pull requests from external repositories
Github/travis integration does not make available the encryption keys
for pull requests from remote repositories. Move direct commands from
travis into scripts so that we decrypt and deploy only when we can.
Diffstat (limited to '.travis.yml')
-rw-r--r-- | .travis.yml | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/.travis.yml b/.travis.yml index f88f206e0b..465a8f2173 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,14 +17,7 @@ addons: # # Setup environment before_install: - # Decrypt our private files for CI use only - - openssl aes-256-cbc -K $encrypted_decb6f6387c4_key -iv $encrypted_decb6f6387c4_iv -in .travis/travis_rsa.enc -out .travis/travis_rsa -d - - eval "$(ssh-agent -s)" # start the ssh agent - - chmod 600 .travis/travis_rsa # add our key - - ssh-add .travis/travis_rsa # add our key - - rm -f .travis/travis_rsa # remove to prevent leaks - # WARNING: Any changes to the above 5 lines should be monitored closely - - ssh-keyscan -H firehol.org >> ~/.ssh/known_hosts + - ./.travis/decrypt-if-have-key decb6f6387c4 # # Run before_script: @@ -42,7 +35,7 @@ script: # Deploy as required after_success: - for i in *.tar.*; do md5sum -b $i > $i.md5; sha512sum -b $i > $i.sha; done - - "case \"$TRAVIS_BRANCH\" in master|stable-*) if [ $TRAVIS_PULL_REQUEST = false -a \"$TRAVIS_TAG\" = \"\" -a \"$CC\" = \"gcc\" ]; then ssh travis@firehol.org mkdir -p uploads/netdata/$TRAVIS_BRANCH/ && scp -p *.tar.* travis@firehol.org:uploads/netdata/$TRAVIS_BRANCH/ && ssh travis@firehol.org touch uploads/netdata/$TRAVIS_BRANCH/complete.txt; fi;; esac" + - ./.travis/deploy-if-have-key deploy: # Upload results to GitHub (tag only) - provider: releases |