Skip to content

Commit

Permalink
.travis.yml: move SSH key logic into shell script from yaml file
Browse files Browse the repository at this point in the history
Unclutters the .travis.yml file and we can check if the env vars exist for
creating that key.

Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
  • Loading branch information
commodo committed Nov 23, 2018
1 parent ddc3e4b commit 9814b5b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 1 addition & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,7 @@ notifications:

before_deploy:
- . ${TRAVIS_BUILD_DIR}/CI/travis/before_deploy
- openssl aes-256-cbc -K $encrypted_48a720578612_key -iv $encrypted_48a720578612_iv -in ${TRAVIS_BUILD_DIR}/CI/travis/deploy.rsa.enc -out /tmp/deploy.rsa -d
- eval "$(ssh-agent -s)"
- chmod 600 /tmp/deploy.rsa
- ssh-add /tmp/deploy.rsa

deploy:
- provider: releases
api_key:
Expand Down
5 changes: 5 additions & 0 deletions CI/travis/before_deploy
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
# Don't prepare a deploy on a Coverity build
if [ "x${COVERITY_SCAN_PROJECT_NAME}" != "x" ] ; then exit 0; fi

openssl aes-256-cbc -K $encrypted_48a720578612_key -iv $encrypted_48a720578612_iv -in ${TRAVIS_BUILD_DIR}/CI/travis/deploy.rsa.enc -out /tmp/deploy.rsa -d
eval "$(ssh-agent -s)"
chmod 600 /tmp/deploy.rsa
ssh-add /tmp/deploy.rsa

deploy=0
if [ -z "$TRAVIS_BUILD_DIR" ] ; then
t=$(find ./ -name CMakeCache.txt|head -1)
Expand Down

0 comments on commit 9814b5b

Please sign in to comment.