Beispiel #1
0
def execute():
    logger.info("The following set of commands is available for execution: %s" % ",".join([s for s,c in CONF.COMMANDS]))
    logger.info("The following set of commands will be executed: %s" % ",".join(commandsToRun))
    
    if ( "CLEANUP_WWW_AREA" in commandsToRun ) :
      logger.info("Cleaning up logs area...")
      CONF.cleanupLogs()
    for section,cmds in CONF.COMMANDS:
      if section in commandsToRun :
        logger.info("----++++ %s ++++----" % section)
        for cmd in cmds:
            system(cmd,log=True, exception=False)
Beispiel #2
0
def execute():
    logger.info(
        "The following set of commands is available for execution: %s" %
        ",".join([s for s, c in CONF.COMMANDS]))
    logger.info("The following set of commands will be executed: %s" %
                ",".join(commandsToRun))

    if ("CLEANUP_WWW_AREA" in commandsToRun):
        logger.info("Cleaning up logs area...")
        CONF.cleanupLogs()
    for section, cmds in CONF.COMMANDS:
        if section in commandsToRun:
            logger.info("----++++ %s ++++----" % section)
            for cmd in cmds:
                system(cmd, log=True, exception=False)
Beispiel #3
0
      
    if listonly :
      print "The following set of commands is available for execution: %s" % ",".join([s for s,c in CONF.COMMANDS])
      sys.exit(0)

    # Check if command list given is valid
    for command in commandsToRun:
      if command in [s for s,c in CONF.COMMANDS] :
        continue
      else:
        sys.stderr.write( "ERROR: Command '" + command + "' is not available.\n" )
        sys.stderr.write( "List of available commands : %s\n" % str([s for s,c in CONF.COMMANDS]) )
        sys.exit(2)
    
    if not silent :
      logger.info("Reports will be sent to: %s" % CONF.TO_EMAIL )
    
    # Execute build/test/etc.
    try:
        execute()
    except KeyboardInterrupt,e:
        logger.warning('Aborting after CTRL-C...\n')
        sys.exit(1)
    except Exception,e:
        logger.error(e)


    if silent:
        logger.info("Final reporting and email notifications were disabled")
    else:
        logger.info("----++++REPORTING++++----")
Beispiel #4
0
            [s for s, c in CONF.COMMANDS])
        sys.exit(0)

    # Check if command list given is valid
    for command in commandsToRun:
        if command in [s for s, c in CONF.COMMANDS]:
            continue
        else:
            sys.stderr.write("ERROR: Command '" + command +
                             "' is not available.\n")
            sys.stderr.write("List of available commands : %s\n" %
                             str([s for s, c in CONF.COMMANDS]))
            sys.exit(2)

    if not silent:
        logger.info("Reports will be sent to: %s" % CONF.TO_EMAIL)

    # Execute build/test/etc.
    try:
        execute()
    except KeyboardInterrupt, e:
        logger.warning('Aborting after CTRL-C...\n')
        sys.exit(1)
    except Exception, e:
        logger.error(e)

    if silent:
        logger.info("Final reporting and email notifications were disabled")
    else:
        logger.info("----++++REPORTING++++----")
        nanalyzer.report(CONF)