Пример #1
0
 def clean_repo(cls, repo, pull_repo):
     if os.path.exists(os.path.join(repo, '.hg')):
         log.info("Cleaning up the repo")
         mq.qpop(repo=repo)
         run_cmd(["rm", "-rf", os.path.join(repo, ".hg/patches")])
         run_cmd([cls.hg, "update", "-C"], cwd=repo)
         run_cmd([cls.hg, "--config", "extensions.purge=", "purge"],
                 cwd=repo)
         cleanOutgoingRevs(repo, pull_repo, username=None, sshKey=None)
Пример #2
0
                          sleeptime)
                time.sleep(sleeptime)
        except Exception, e:
            log.error("Caught exception when polling:", exc_info=True)
            sys.exit(5)

    # Clean up after any potential previous attempts before starting.
    # Not doing this could end up with multiple heads on the same branch.
    for repo, workdir, push_repo in (
        (buildbot_configs, configs_workdir, configs_pushRepo),
        (buildbotcustom, custom_workdir, custom_pushRepo),
        (tools, tools_workdir, tools_pushRepo)
    ):

        retry(mercurial, args=(repo, workdir))
        cleanOutgoingRevs(workdir, push_repo, hg_username,
                          hg_ssh_key)

    # Create symlinks if needed
    if 'symlinks' in config.sections():
        format_dict = dict(buildbot_configs=configs_workdir,
                           buildbotcustom=custom_workdir, tools=tools_workdir)
        for target in config.options('symlinks'):
            symlink = config.get('symlinks', target).format(**format_dict)
            if path.exists(symlink):
                log.warning("Skipping %s -> %s symlink" % (symlink, target))
            else:
                log.info("Adding %s -> %s symlink" % (symlink, target))
                os.symlink(target, symlink)

    tags = []
Пример #3
0
 def cleanup_wrapper():
     cleanOutgoingRevs(reponame, pushRepo, config['hgUsername'],
                       config['hgSshKey'])
Пример #4
0
 def cleanup_wrapper():
     cleanOutgoingRevs(reponame, pushRepo, config['hgUsername'],
                       config['hgSshKey'])
Пример #5
0
 def cleanup_wrapper():
     cleanOutgoingRevs(reponame, pushRepo, username, sshKey)
Пример #6
0
 def cleanup_wrapper():
     cleanOutgoingRevs(reponame, pushRepo, username, sshKey)
Пример #7
0
                          sleeptime)
                time.sleep(sleeptime)
        except Exception, e:
            log.error("Caught exception when polling:", exc_info=True)
            sys.exit(5)

    # Clean up after any potential previous attempts before starting.
    # Not doing this could end up with multiple heads on the same branch.
    for repo, workdir, push_repo in ((buildbot_configs, configs_workdir,
                                      configs_pushRepo),
                                     (buildbotcustom, custom_workdir,
                                      custom_pushRepo), (tools, tools_workdir,
                                                         tools_pushRepo)):

        retry(mercurial, args=(repo, workdir))
        cleanOutgoingRevs(workdir, push_repo, hg_username, hg_ssh_key)

    # Send email to r-d for a fast notification
    for release in rr.new_releases:
        cfgFile = configs_workdir + "/mozilla/" + getReleaseConfigName(
            release['product'], path.basename(release['branch']),
            release['version'], staging)
        sendMailRD(smtp_server, notify_from, cfgFile, release)

    # Create symlinks if needed
    if 'symlinks' in config.sections():
        format_dict = dict(buildbot_configs=configs_workdir,
                           buildbotcustom=custom_workdir,
                           tools=tools_workdir)
        for target in config.options('symlinks'):
            symlink = config.get('symlinks', target).format(**format_dict)