Add private key
This commit is contained in:
parent
cf69fc6860
commit
c4788fec12
3 changed files with 24 additions and 4 deletions
|
|
@ -1,8 +1,11 @@
|
|||
language: csharp
|
||||
solution: ./TShockAPI/TShockAPI.csproj
|
||||
solution: "./TShockAPI/TShockAPI.csproj"
|
||||
install:
|
||||
- nuget restore
|
||||
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 ssh_private_key.enc -out ssh_private_key -d
|
||||
|
|
|
|||
|
|
@ -92,14 +92,30 @@ def package_debug():
|
|||
def delete_files():
|
||||
os.chdir(release_dir)
|
||||
os.remove(mysql_bin_name)
|
||||
os.remove(sqlite_bin_name)
|
||||
os.remove(sqlite_dep)
|
||||
# os.remove(sqlite_bin_name)
|
||||
# os.remove(sqlite_dep)
|
||||
os.remove(json_bin_name)
|
||||
os.remove(bcrypt_bin_name)
|
||||
os.remove(http_bin_name)
|
||||
os.remove(geoip_db_name)
|
||||
os.chdir(cur_wd)
|
||||
|
||||
def upload_artifacts():
|
||||
if os.environ.get('TRAVIS_PULL_REQUEST', 'false') == 'false':
|
||||
os.chdir(cur_wd)
|
||||
os.mkdir(os.environ.get('TRAVIS_BRANCH', 'test-branch'))
|
||||
os.chdir(os.environ.get('TRAVIS_BRANCH', 'test-branch'))
|
||||
os.mkdir(os.environ.get('TRAVIS_BUILD_NUMBER', 'test-0407'))
|
||||
os.chdir(cur_wd)
|
||||
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')))
|
||||
target = open('./id_rsa', 'w')
|
||||
target.write(os.environ.get('SECRET_SSH_KEY', 'nokey'))
|
||||
target.close()
|
||||
os.chmod('./id_rsa', 0600)
|
||||
upload_process = subprocess.Popen(['scp', '-i', './id_rsa', '-r', os.environ.get('TRAVIS_BRANCH', 'test-branch'), 'tshock-travis@arc.shanked.me:/usr/share/nginx/tshock-travis/'])
|
||||
upload_process.wait()
|
||||
|
||||
def update_terraria_source():
|
||||
subprocess.check_call(['/usr/bin/git', 'submodule', 'init'])
|
||||
subprocess.check_call(['/usr/bin/git', 'submodule', 'update'])
|
||||
|
|
@ -122,3 +138,4 @@ if __name__ == '__main__':
|
|||
package_release()
|
||||
package_debug()
|
||||
delete_files()
|
||||
upload_artifacts()
|
||||
|
|
|
|||
BIN
scripts/ssh_private_key.enc
Normal file
BIN
scripts/ssh_private_key.enc
Normal file
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue