Upload symbols to S3
This commit is contained in:
parent
15a05b3639
commit
caa0634df8
1 changed files with 10 additions and 1 deletions
|
@ -1,8 +1,9 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
import glob
|
||||||
|
|
||||||
from lib.util import execute, rm_rf, safe_mkdir
|
from lib.util import execute, rm_rf, safe_mkdir, s3put, s3_config
|
||||||
|
|
||||||
|
|
||||||
SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
|
SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
|
||||||
|
@ -21,11 +22,19 @@ def main():
|
||||||
for pdb in PDB_LIST:
|
for pdb in PDB_LIST:
|
||||||
run_symstore(pdb, SYMBOLS_DIR, 'AtomShell')
|
run_symstore(pdb, SYMBOLS_DIR, 'AtomShell')
|
||||||
|
|
||||||
|
bucket, access_key, secret_key = s3_config()
|
||||||
|
files = glob.glob(SYMBOLS_DIR + '/*.pdb/*/*.pdb')
|
||||||
|
upload_symbols(bucket, access_key, secret_key, files)
|
||||||
|
|
||||||
|
|
||||||
def run_symstore(pdb, dest, product):
|
def run_symstore(pdb, dest, product):
|
||||||
execute(['symstore', 'add', '/r', '/f', pdb, '/s', dest, '/t', product])
|
execute(['symstore', 'add', '/r', '/f', pdb, '/s', dest, '/t', product])
|
||||||
|
|
||||||
|
|
||||||
|
def upload_symbols(bucket, access_key, secret_key, files):
|
||||||
|
s3put(bucket, access_key, secret_key, SYMBOLS_DIR, 'atom-shell/symbols', files)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
import sys
|
import sys
|
||||||
sys.exit(main())
|
sys.exit(main())
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue