예제 #1
0
def DartArchiveUploadUpdateSite(local_path):
    namer = bot_utils.GCSNamer(CHANNEL, bot_utils.ReleaseType.RAW)
    gsutil = bot_utils.GSUtil()
    for revision in [REVISION, 'latest']:
        update_site_dir = namer.editor_eclipse_update_directory(revision)
        try:
            gsutil.remove(update_site_dir, recursive=True)
        except:
            # Ignore this, in the general case there is nothing.
            pass
        gsutil.upload(local_path, update_site_dir, recursive=True, public=True)
예제 #2
0
def DartArchiveUploadUpdateSite(local_path):
  namer = bot_utils.GCSNamer(CHANNEL, bot_utils.ReleaseType.RAW)
  gsutil = bot_utils.GSUtil()
  for revision in [REVISION, 'latest']:
    update_site_dir = namer.editor_eclipse_update_directory(revision)
    try:
      gsutil.remove(update_site_dir, recursive=True)
    except:
      # Ignore this, in the general case there is nothing.
      pass
    gsutil.upload(local_path, update_site_dir, recursive=True, public=True)
예제 #3
0
def DartArchiveFile(local_path, remote_path, create_md5sum=False):
  # Copy it to the new unified gs://dart-archive bucket
  gsutil = bot_utils.GSUtil()
  gsutil.upload(local_path, remote_path, public=True)
  if create_md5sum:
    # 'local_path' may have a different filename than 'remote_path'. So we need
    # to make sure the *.md5sum file contains the correct name.
    assert '/' in remote_path and not remote_path.endswith('/')
    mangled_filename = remote_path[remote_path.rfind('/') + 1:]
    local_md5sum = bot_utils.CreateChecksumFile(local_path, mangled_filename)
    gsutil.upload(local_md5sum, remote_path + '.md5sum', public=True)
예제 #4
0
def DartArchiveFile(local_path, remote_path, create_md5sum=False):
    # Copy it to the new unified gs://dart-archive bucket
    gsutil = bot_utils.GSUtil()
    gsutil.upload(local_path, remote_path, public=True)
    if create_md5sum:
        # 'local_path' may have a different filename than 'remote_path'. So we need
        # to make sure the *.md5sum file contains the correct name.
        assert '/' in remote_path and not remote_path.endswith('/')
        mangled_filename = remote_path[remote_path.rfind('/') + 1:]
        local_md5sum = bot_utils.CreateChecksumFile(local_path,
                                                    mangled_filename)
        gsutil.upload(local_md5sum, remote_path + '.md5sum', public=True)
예제 #5
0
def DartArchiveUploadUpdateSite(local_path):
  # TODO(kustermann): We don't archive trunk builds to gs://dart-archive/
  # Remove this once the channel transition is done.
  if CHANNEL == 'trunk': return
  namer = bot_utils.GCSNamer(CHANNEL, bot_utils.ReleaseType.RAW)
  gsutil = bot_utils.GSUtil()
  for revision in [REVISION, 'latest']:
    update_site_dir = namer.editor_eclipse_update_directory(revision)
    try:
      gsutil.remove(update_site_dir, recursive=True)
    except:
      # Ignore this, in the general case there is nothing.
      pass
    gsutil.upload(local_path, update_site_dir, recursive=True, public=True)
예제 #6
0
def DartArchiveFile(local_path, remote_path, checksum_files=False):
    # Copy it to the new unified gs://dart-archive bucket
    gsutil = bot_utils.GSUtil()
    gsutil.upload(local_path, remote_path, public=True)
    if checksum_files:
        # 'local_path' may have a different filename than 'remote_path'. So we need
        # to make sure the *.md5sum file contains the correct name.
        assert "/" in remote_path and not remote_path.endswith("/")

        mangled_filename = remote_path[remote_path.rfind("/") + 1 :]
        local_md5sum = bot_utils.CreateMD5ChecksumFile(local_path, mangled_filename)
        gsutil.upload(local_md5sum, remote_path + ".md5sum", public=True)
        local_sha256 = bot_utils.CreateSha256ChecksumFile(local_path, mangled_filename)
        gsutil.upload(local_sha256, remote_path + ".sha256sum", public=True)