Move decryption of secret key file into create release script

This commit is contained in:
Lucas Nicodemus 2016-10-15 14:27:17 -06:00
parent b433e2f232
commit b20e2060a2
2 changed files with 3 additions and 4 deletions

View file

@ -7,6 +7,3 @@ script: python ./scripts/create_release.py
notifications:
slack:
secure: O4Nibe2fdaUa2ZxuETUg6WEoQKvNM2CotnfaIVgm3fjfe61dfE1P+EgTpbwDG8646jSmpTqMDw8Z6I/WJwGTlXV/ZQsbwu63Cps4MgOTvPHZ0Lsye5azySlJZs1iI4ItYSj2czXfcnJ+qAl1SOOkXJrjB5uyTMWtDpCrSCFB3MA=
before_install:
- openssl aes-256-cbc -K $encrypted_1d7cd15ffdb4_key -iv $encrypted_1d7cd15ffdb4_iv
-in ./scripts/ssh_private_key.enc -out ./scripts/ssh_private_key -d

View file

@ -110,6 +110,8 @@ def upload_artifacts():
shutil.copy(os.path.join(release_dir, 'tshock_release.zip'), os.path.join(os.environ.get('TRAVIS_BRANCH', 'test-branch'), os.environ.get('TRAVIS_BUILD_NUMBER', 'test-0407')))
shutil.copy(os.path.join(release_dir, 'tshock_debug.zip'), os.path.join(os.environ.get('TRAVIS_BRANCH', 'test-branch'), os.environ.get('TRAVIS_BUILD_NUMBER', 'test-0407')))
os.chmod('./scripts/ssh_private_key', 0600)
decrypt_process = subprocess.Popen(['openssl', 'aes-256-cbc', '-K', os.environ.get('encrypted_1d7cd15ffdb4_key'), '-iv', os.environ.get('encrypted_1d7cd15ffdb4_iv'), '-in', './scripts/ssh_private_key.enc', '-out', './scripts/ssh_private_key', '-d'])
decrypt_process.wait()
upload_process = subprocess.Popen(['scp', '-oStrictHostKeyChecking=no', '-i', './scripts/ssh_private_key', '-r', os.environ.get('TRAVIS_BRANCH', 'test-branch'), 'tshock-travis@arc.shanked.me:/usr/share/nginx/tshock-travis/'])
upload_process.wait()