示例#1
0
def UploadAPKs(options):
    with bot.BuildStep('Upload apk'):
        revision = utils.GetSVNRevision()
        namer = bot_utils.GCSNamer(internal=True)
        # The version of gsutil we have on the bots is not new enough to support
        # the acl set commands.
        bot_utils.GSUtil.USE_DART_REPO_VERSION = True
        gsutil = bot_utils.GSUtil()

        # Archive dartuim
        local = os.path.join(options.build_products_dir, APK_LOCATION)
        # TODO(whesse): pass in arch and mode from reciepe
        remote = namer.dartium_android_apk_filepath(revision,
                                                    'dartium-android', 'arm',
                                                    'release')
        web_link_prefix = 'https://storage.cloud.google.com/'
        dartium_link = string.replace(remote, 'gs://', web_link_prefix)
        UploadSetACL(gsutil, local, remote)
        print "Uploaded dartium, available from: %s" % dartium_link

        # Archive content shell
        local = os.path.join(options.build_products_dir, CS_LOCATION)
        # TODO(whesse): pass in arch and mode from reciepe
        remote = namer.dartium_android_apk_filepath(revision,
                                                    'content_shell-android',
                                                    'arm', 'release')
        content_shell_link = string.replace(remote, 'gs://', web_link_prefix)
        UploadSetACL(gsutil, local, remote)
        print "Uploaded content shell, available from: %s" % content_shell_link
示例#2
0
文件: dart_sdk.py 项目: zhengger/sdk
def DartArchiveUploadSDKs(system, arch, sdk_zip):
    namer = bot_utils.GCSNamer(CHANNEL, bot_utils.ReleaseType.RAW)
    git_number = utils.GetArchiveVersion()
    git_hash = 'hash/%s' % utils.GetGitRevision()
    for revision in [git_number, git_hash, 'latest']:
        path = namer.sdk_zipfilepath(revision, system, arch, 'release')
        DartArchiveFile(sdk_zip, path, checksum_files=True)
示例#3
0
文件: dart_sdk.py 项目: zhengger/sdk
def DartArchiveUploadDartdocAPIDocs(api_zip):
    namer = bot_utils.GCSNamer(CHANNEL, bot_utils.ReleaseType.RAW)
    revision = utils.GetArchiveVersion()
    for revision in [revision, 'latest']:
        destination = (namer.apidocs_directory(revision) + '/' +
                       namer.dartdocs_zipfilename())
        DartArchiveFile(api_zip, destination, checksum_files=False)
示例#4
0
def FTSlave(config):

    # Run SWTBot tests
    if len(sys.argv) > 0:
        scriptdir = os.path.dirname(sys.argv[0])
        builddir = os.path.join(scriptdir, '..', '..', 'editor', 'build')
        testScript = os.path.join(builddir, 'testswteditor.py')
        cmd = [sys.executable, testScript]
        try:
            subprocess.call(cmd, shell=IsWindows())
        except:
            pass

    # Prepare to run EggPlant tests
    with bot.BuildStep('Fetching editor'):
        revision = int(os.environ['BUILDBOT_GOT_REVISION'])
        bot_name, _ = bot.GetBotName()
        print bot_name
        channel = bot_utils.GetChannelFromName(bot_name)
        namer = bot_utils.GCSNamer(channel=channel)
        system = config.system
        if system == 'mac':
            system = 'macos'
        editor_path = namer.editor_zipfilepath(revision, system, 'x64')
        gsutils = bot_utils.GSUtil()
        editor_location = '/home/chrome-bot/Desktop'
        if system == 'macos':
            editor_location = '/Users/chrome-bot/Desktop'
        local_path = os.path.join(editor_location, 'editor.zip')
        if os.path.exists(local_path):
            os.remove(local_path)
        local_extracted = os.path.join(editor_location, 'dart')
        shutil.rmtree(local_extracted, ignore_errors=True)
        gsutils.execute(['cp', editor_path, local_path])
        Run(['unzip', local_path, '-d', editor_location])
示例#5
0
文件: dart_sdk.py 项目: spbennett/sdk
def DartArchiveUploadSDKs(system, sdk32_zip, sdk64_zip):
    namer = bot_utils.GCSNamer(CHANNEL, bot_utils.ReleaseType.RAW)
    revision = utils.GetArchiveVersion()
    for revision in [revision, 'latest']:
        path32 = namer.sdk_zipfilepath(revision, system, 'ia32', 'release')
        path64 = namer.sdk_zipfilepath(revision, system, 'x64', 'release')
        DartArchiveFile(sdk32_zip, path32, checksum_files=True)
        DartArchiveFile(sdk64_zip, path64, checksum_files=True)
示例#6
0
def DartArchiveUnstrippedBinaries():
    namer = bot_utils.GCSNamer(CHANNEL, bot_utils.ReleaseType.RAW)
    revision = utils.GetArchiveVersion()
    binary = namer.unstripped_filename(BUILD_OS)
    for arch in BuildArchitectures():
        binary = BuildRootPath(binary, arch=arch)
        gs_path = namer.unstripped_filepath(revision, BUILD_OS, arch)
        DartArchiveFile(binary, gs_path)
示例#7
0
def GetLatestVersionFromGCS(channel):
    namer = bot_utils.GCSNamer(channel=channel)
    gsutil = bot_utils.GSUtil()
    gcs_version_path = namer.version_filepath('latest')
    print 'Getting latest version from: %s' % gcs_version_path
    version_json = gsutil.cat(gcs_version_path)
    version_map = json.loads(version_json)
    return version_map['version']
示例#8
0
文件: dart_sdk.py 项目: zhengger/sdk
def DartArchiveUnstrippedBinaries():
    namer = bot_utils.GCSNamer(CHANNEL, bot_utils.ReleaseType.RAW)
    revision = utils.GetArchiveVersion()
    binary = namer.unstripped_filename(BUILD_OS)
    for arch in BuildArchitectures():
        binary = os.path.join(bot_utils.DART_DIR,
                              utils.GetBuildRoot(BUILD_OS, 'release', arch),
                              binary)
        gs_path = namer.unstripped_filepath(revision, BUILD_OS, arch)
        DartArchiveFile(binary, gs_path)
示例#9
0
def DartArchiveUnstrippedBinaries():
    namer = bot_utils.GCSNamer(CHANNEL, bot_utils.ReleaseType.RAW)
    revision = utils.GetArchiveVersion()
    binary = namer.unstripped_filename(BUILD_OS)
    ia32_binary = os.path.join(bot_utils.DART_DIR,
                               utils.GetBuildRoot(BUILD_OS, 'release', 'ia32'),
                               binary)
    x64_binary = os.path.join(bot_utils.DART_DIR,
                              utils.GetBuildRoot(BUILD_OS, 'release', 'x64'),
                              binary)
    gs_ia32_path = namer.unstripped_filepath(revision, BUILD_OS, 'ia32')
    gs_x64_path = namer.unstripped_filepath(revision, BUILD_OS, 'x64')
    DartArchiveFile(ia32_binary, gs_ia32_path)
    DartArchiveFile(x64_binary, gs_x64_path)
示例#10
0
def ArchiveArtifacts(tarfile, builddir, channel):
    namer = bot_utils.GCSNamer(channel=channel)
    gsutil = bot_utils.GSUtil()
    revision = utils.GetArchiveVersion()
    # Archive the src tar to the src dir
    remote_tarfile = '/'.join(
        [namer.src_directory(revision),
         os.path.basename(tarfile)])
    gsutil.upload(tarfile, remote_tarfile, public=True)
    # Archive all files except the tar file to the linux packages dir
    for entry in os.listdir(builddir):
        full_path = os.path.join(builddir, entry)
        # We expect a flat structure, not subdirectories
        assert (os.path.isfile(full_path))
        if full_path != tarfile:
            package_dir = namer.linux_packages_directory(revision)
            remote_file = '/'.join([package_dir, os.path.basename(entry)])
            gsutil.upload(full_path, remote_file, public=True)
示例#11
0
def UploadAPKs(options):
  with bot.BuildStep('Upload apk'):
    revision = utils.GetSVNRevision()
    namer = bot_utils.GCSNamer()
    gsutil = bot_utils.GSUtil()

    web_link_prefix = 'https://storage.cloud.google.com/'

    # Archive content shell
    local = os.path.join(options.build_products_dir, CS_LOCATION)
    # TODO(whesse): pass in arch and mode from reciepe
    remote = namer.dartium_android_apk_filepath(revision,
                                                'content_shell-android',
                                                'arm',
                                                'release')
    content_shell_link = string.replace(remote, 'gs://', web_link_prefix)
    UploadSetACL(gsutil, local, remote)
    print "Uploaded content shell, available from: %s" % content_shell_link
示例#12
0
def FTSlave(config):
    with bot.BuildStep('Fetching editor'):
        revision = int(os.environ['BUILDBOT_GOT_REVISION'])
        bot_name, _ = bot.GetBotName()
        print bot_name
        channel = bot_utils.GetChannelFromName(bot_name)
        namer = bot_utils.GCSNamer(channel=channel)
        system = config.system
        if system == 'mac':
            system = 'macos'
        editor_path = namer.editor_zipfilepath(revision, system, 'x64')
        gsutils = bot_utils.GSUtil()
        editor_location = '/home/chrome-bot/Desktop'
        if system == 'macos':
            editor_location = '/Users/chrome-bot/Desktop'
        local_path = os.path.join(editor_location, 'editor.zip')
        if os.path.exists(local_path):
            os.remove(local_path)
        local_extracted = os.path.join(editor_location, 'dart')
        shutil.rmtree(local_extracted, ignore_errors=True)
        gsutils.execute(['cp', editor_path, local_path])
        Run(['unzip', local_path, '-d', editor_location])
示例#13
0
def UploadAPKs(options):
  with bot.BuildStep('Upload apk'):
    bot_name = os.environ.get('BUILDBOT_BUILDERNAME')
    on_fyi = 'fyi-' in os.environ.get('BUILDBOT_SCHEDULER')
    if '-integration' in bot_name or on_fyi:
      return
    channel = bot_utils.GetChannelFromName(bot_name)
    namer = bot_utils.GCSNamer(channel=channel)
    gsutil = bot_utils.GSUtil()

    web_link_prefix = 'https://storage.cloud.google.com/'

    # Archive content shell
    local = os.path.join(options.build_products_dir, CS_LOCATION)

    for revision in [utils.GetArchiveVersion(), 'latest']:
      # TODO(whesse): pass in arch and mode from reciepe
      remote = namer.dartium_android_apk_filepath(revision,
                                                  'content_shell-android',
                                                  'arm',
                                                  'release')
      content_shell_link = string.replace(remote, 'gs://', web_link_prefix)
      UploadSetACL(gsutil, local, remote)
      print "Uploaded content shell, available from: %s" % content_shell_link
示例#14
0
文件: dart_sdk.py 项目: zhengger/sdk
def DartArchiveUploadVersionFile(version_file):
    namer = bot_utils.GCSNamer(CHANNEL, bot_utils.ReleaseType.RAW)
    revision = utils.GetArchiveVersion()
    for revision in [revision, 'latest']:
        destination = namer.version_filepath(revision)
        DartArchiveFile(version_file, destination, checksum_files=False)