Beispiel #1
0
def verify_options(cmd_options, config):
    """Check release_configs against command-line opts"""
    success = True
    if cmd_options.version and cmd_options.version != config['version']:
        log.error("version passed in does not match release_configs")
        success = False
        error_tally.add('verify_options')
    if cmd_options.buildNumber and int(cmd_options.buildNumber) != int(config['buildNumber']):
        log.error("buildNumber passed in does not match release_configs")
        success = False
        error_tally.add('verify_options')
    if not getRepoMatchingBranch(cmd_options.branch, config['sourceRepositories']):
        log.error("branch passed in does not exist in release config")
        success = False
        error_tally.add('verify_options')
    return success
Beispiel #2
0
def verify_options(cmd_options, config):
    """Check release_configs against command-line opts"""
    success = True
    if cmd_options.version and cmd_options.version != config['version']:
        log.error("version passed in does not match release_configs")
        success = False
        error_tally.add('verify_options')
    if cmd_options.buildNumber and int(cmd_options.buildNumber) != int(
            config['buildNumber']):
        log.error("buildNumber passed in does not match release_configs")
        success = False
        error_tally.add('verify_options')
    if not getRepoMatchingBranch(cmd_options.branch,
                                 config['sourceRepositories']):
        log.error("branch passed in does not exist in release config")
        success = False
        error_tally.add('verify_options')
    return success
Beispiel #3
0
            for sr in releaseConfig['sourceRepositories'].values():
                sourceRepoPath = sr.get('clonePath', sr['path'])
                if not verify_repo(sourceRepoPath, sr['revision'],
                                   branchConfig['hghost']):
                    test_success = False
                    log.error("Error verifying repos")

    if test_success:
        if not options.dryrun:
            if not options.skip_reconfig:
                fabric_helper = FabricHelper(
                    masters_json_file=options.masters_json_file,
                    concurrency=options.concurrency,
                    roles=['build', 'scheduler'])
                fabric_helper.update_and_reconfig()
            sourceRepoPath = getRepoMatchingBranch(
                options.branch, releaseConfig['sourceRepositories'])['path']
            sendchange(
                sourceRepoPath,
                "%s_RELEASE" % releaseConfig['baseTag'],
                options.username,
                args[0],
                products,
            )
        else:
            log.info("Tests Passed! Did not run reconfig/sendchange."
                     " Rerun without `-d`")
            if cleanup_configs:
                log.info("Removing temporary directory: %s" % configs_dir)
                rmtree(configs_dir)
    else:
        log.fatal("Tests Failed! Not running sendchange!")
Beispiel #4
0
                if not verify_repo(sourceRepoPath, sr['revision'],
                                   branchConfig['hghost']):
                    test_success = False
                    log.error("Error verifying repos")

            #if this is a respin, verify that the version/milestone files have been bumped
            if buildNumber > 1:
                for sr in releaseConfig['sourceRepositories'].values():
                    if not verify_build(sr, branchConfig['hghost']):
                        test_success = False

    check_buildbot()
    if test_success:
        if not options.dryrun:
            reconfig()
            sourceRepoPath = getRepoMatchingBranch(
                options.branch, releaseConfig['sourceRepositories'])['path']
            sendchange(
                sourceRepoPath,
                "%s_RELEASE" % releaseConfig['baseTag'],
                options.username,
                args[0],
                options.products,
            )
        else:
            log.info(
                "Tests Passed! Did not run reconfig/sendchange. Rerun without `-d`"
            )
    else:
        log.fatal("Tests Failed! Not running sendchange!")
        log.fatal("Failed tests (run with -b to skip) :")
        for error in error_tally: