Move decryption of secret key file into create release script
This commit is contained in:
parent
b433e2f232
commit
b20e2060a2
2 changed files with 3 additions and 4 deletions
|
|
@ -6,7 +6,4 @@ install:
|
|||
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
|
||||
secure: O4Nibe2fdaUa2ZxuETUg6WEoQKvNM2CotnfaIVgm3fjfe61dfE1P+EgTpbwDG8646jSmpTqMDw8Z6I/WJwGTlXV/ZQsbwu63Cps4MgOTvPHZ0Lsye5azySlJZs1iI4ItYSj2czXfcnJ+qAl1SOOkXJrjB5uyTMWtDpCrSCFB3MA=
|
||||
|
|
@ -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()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue