Last active
August 29, 2015 14:08
-
-
Save mikesplain/c6041676ef6ae0b30c27 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
after_success: | |
- git config --global user.email "[email protected]" | |
- git config --global user.name "Travis CI" | |
- echo -e "Host github.com\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config | |
- ssh-add travis-openstack-clients-cookbook | |
- echo -n $RELEASE_{00..30} >> release_base64 | |
- base64 --decode --ignore-garbage release_base64 > release.pem |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!/bin/bash | |
# travis_ssh_key_encrypt_for_mac.ssh | |
# Encrypts private SSH keys for use in .travis.yml. | |
# Based on the excellent linux version: | |
# https://gist.github.com/lukewpatterson/4242707 | |
# Also see the travis documentation: | |
# http://docs.travis-ci.com/user/build-configuration/#Secure-environment-variables | |
# Usage: | |
# Go to your git project: | |
# cd my_project | |
# Then run: | |
# ./travis_key_encrypt.sh ~/.ssh/my_private_key | |
SSH_KEY_PATH=$1 | |
base64 --break 64 ${SSH_KEY_PATH} > ${SSH_KEY_PATH}_base64 | |
if [[ ! $(which travis) ]] | |
then | |
gem install travis | |
fi | |
travis login --pro --auto | |
for l in $(cat ${SSH_KEY_PATH}_base64); | |
do | |
LINE=$(grep -n $l ${SSH_KEY_PATH}_base64 | cut -d: -f1); | |
echo "- secure: $(travis encrypt \"RELEASE_$LINE=$l\")"; | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment