~doanac/ubuntu-ci-services-itself/lander-base-image

« back to all changes in this revision

Viewing changes to cli/ci_libs/file_handler.py

  • Committer: Chris Johnston
  • Author(s): Andy Doan
  • Date: 2014-02-24 19:42:48 UTC
  • mfrom: (256.1.2 ubuntu-ci-services-itself)
  • Revision ID: chris_johnston-20140224194248-8btg00w2xbgh81ku
[r=Francis Ginther, PS Jenkins bot] update components to use a consistent container for artifacts
  
This gets our components all using the same container name for
artifacts of a given ticket.  from Andy Doan

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
logger.setLevel(log.level)
22
22
 
23
23
from ci_libs import utils
24
 
from ci_utils.data_store import DataStore
 
24
from ci_utils import data_store
25
25
 
26
26
 
27
27
class FileToUploadNotFound(IOError):
111
111
 
112
112
 
113
113
def upload_files(file_path, ticket_id):
114
 
    ds = DataStore('ticket-system.{}'.format(ticket_id), utils.AUTH_CONFIG)
115
 
    ds.change_visibility(public=True)
 
114
    ds = data_store.create_for_ticket(ticket_id, utils.AUTH_CONFIG)
116
115
    with open(file_path, 'r') as fp:
117
116
        location = ds.put_file(file_path, fp)
118
117
    return location