-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Deploy dmg and deb files built on Travis to downloads.mixxx.org.
Adds an RSA key that is authorized to login to downloads-hostgator.mixxx.org. This key is encrypted with a password which is provided as a Travis secure variable.
- Loading branch information
Showing
5 changed files
with
122 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
|
||
# Key Rotation | ||
|
||
# downloads-hostgator.mixxx.org | ||
|
||
SSH access is granted via an RSA key stored in `build/certificates/downloads-hostgator.mixxx.org.key`. | ||
|
||
To rotate this key, generate a new RSA key with a strong password (e.g. 32 character randomly generated). | ||
|
||
``` | ||
ssh-keygen -t rsa -b 4096 -f downloads-hostgator.mixxx.org.key | ||
``` | ||
|
||
Copy the **public** key to `$HOME/.ssh/authorized_keys`, replacing the old file to remove access for the current key. | ||
|
||
Encrypt the password using `travis encrypt` and update `.travis.yml`. | ||
|
||
``` | ||
travis encrypt DOWNLOADS_HOSTGATOR_DOT_MIXXX_DOT_ORG_KEY_PASSWORD=hunter2 -r mixxxdj/mixxx | ||
``` |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
-----BEGIN RSA PRIVATE KEY----- | ||
Proc-Type: 4,ENCRYPTED | ||
DEK-Info: AES-128-CBC,4D25AED6ED1AD07B47186093278F7F27 | ||
|
||
/aFQab21BJ4OnILuHd/FoXQfURebSWX/LhKrukZLqE1TvkftwDVhjHHjxF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N6Zi8xi5VbYMlmaeYwYIrG00PmxxeAzqjVcAIn5Z04tCGJA | ||
-----END RSA PRIVATE KEY----- |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDP1q+/ayZvi1NCqVZBmajI1TP2qAO1H5pNLx80z/qfNkFMWspgrT3//xaItMfhyIjAycQfDBYOatxFCNST5y12Pjm8H1SF74dHLIVhBdAGfb7JtOt4vAqxeJp7E7T3gn7ZmcNCJnnVPnX0Wl4NRNvS/sE7Q5a/UUNOJGWyvKfrfvuvp91J+XQqhB6shUkmGmchL5ISHbq1i6EbH3ZyRqmPQSAROJ9yyQIVBuCuSisgl3teOnqDxibFP8yMOJhysw3VA8U29ERP8gtvSjcTfDJXeiMM6y6Ty4SrYJe3KUU2OQI3u4W31KREUGj9zH9SBcfh/EvUjw/bw/OSgKxsCaJIeH8bOnFz037ipgGCTbYcdvhEKIJRFqy0/kjm7hf4rWITNJ9Wvkn83MAhvEeOVPoV6cajQZd/0r54Fg8/6/mhp7J5yBBNjKNRYDW5wDpYPjwRvxVEIYS5QD1wwUHmRF1qy1YiAJK37YmoWr4Fd8fWNF5g+ozhCacaxIMcWjKneStwCsjxIG4mTBEnJAIt6mFptoX0ewA8ozgw7POBNLSW469LiGDZOf9GTBL6YsGyaV2WzWjSIFYn2dqL+TfSaKNqDBFoHLJ2SZ+Utp5a63NCaLAY5TbGUbzAMmq8j4qrJa1wu6y7GUKiYs5BByik+j9szW0/i28FkQjnZYMPtTSJ/w== mixxx@downloads-hostgator.mixxx.org |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#!/bin/bash | ||
# | ||
# Deploy artifacts (e.g. dmg, deb files) built by Travis to downloads.mixxx.org. | ||
# Run within the cmake_build directory. | ||
|
||
set -eu -o pipefail | ||
|
||
USER=mixxx | ||
HOSTNAME=downloads-hostgator.mixxx.org | ||
TRAVIS_DESTDIR=public_html/downloads/builds/travis | ||
SSH_KEY=../build/certificates/downloads-hostgator.mixxx.org.key | ||
SSH="ssh -i ${SSH_KEY} -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" | ||
|
||
if [[ "${TRAVIS_PULL_REQUEST}" != "false" ]]; then | ||
echo "Skipping deploy since we are in a pull request." | ||
exit 0 | ||
fi | ||
|
||
DEST_PATH=${TRAVIS_DESTDIR}/${TRAVIS_BRANCH}/ | ||
TMP_PATH=${TRAVIS_DESTDIR}/.tmp/$TRAVIS_BUILD_ID/ | ||
|
||
echo Deploying to $TMP_PATH, then to $DEST_PATH. | ||
|
||
# Remove permissions for group and other users so that ssh-keygen does not | ||
# complain about the key not being protected. | ||
chmod go-rwx ${SSH_KEY} | ||
|
||
# "Unlock" the key by removing its password. This is easier than messing with ssh-agent. | ||
ssh-keygen -p -P ${DOWNLOADS_HOSTGATOR_DOT_MIXXX_DOT_ORG_KEY_PASSWORD} -N "" -f ${SSH_KEY} | ||
|
||
# Always upload to a temporary path. | ||
shopt -s extglob | ||
rsync -e "${SSH}" --rsync-path="mkdir -p ${TMP_PATH} && rsync" -r --delete-after --quiet *.@(deb|dmg) ${USER}@${HOSTNAME}:${TMP_PATH} | ||
|
||
# Move from the temporary path to the final destination. | ||
$SSH ${USER}@${HOSTNAME} "mkdir -p ${DEST_PATH} && mv ${TMP_PATH}/* ${DEST_PATH} && rmdir ${TMP_PATH}" |