options = self.parse_commandline()
        self.options = options

        if options.verbose:
            enable_logging()

        if not should_tasks_be_generated(self.evergreen_api, self.config_options.task_id):
            LOGGER.info("Not generating configuration due to previous successful generation.")
            return

        LOGGER.debug("Starting execution for options %s", options)
        LOGGER.debug("config options %s", self.config_options)
        end_date = datetime.datetime.utcnow().replace(microsecond=0)
        start_date = end_date - datetime.timedelta(days=options.duration_days)

        prepare_directory_for_suite(CONFIG_DIR)

        suites = self.calculate_suites(start_date, end_date)

        LOGGER.debug("Creating %d suites for %s", len(suites), self.config_options.task)

        render_suite(suites, self.config_options.suite)
        render_misc_suite(self.test_list, self.config_options.suite)

        self.write_evergreen_configuration(suites, self.config_options.task)


if __name__ == "__main__":
    Main(EvergreenApi.get_api(config_file=CONFIG_FILE)).main()
예제 #2
0
파일: main.py 프로젝트: zamj/evergreen.py
def cli(ctx, display_format):
    ctx.ensure_object(dict)
    ctx.obj['api'] = EvergreenApi.get_api(use_config_file=True)
    ctx.obj['format'] = display_format
예제 #3
0
        if options.verbose:
            enable_logging()

        if not should_tasks_be_generated(self.evergreen_api,
                                         self.config_options.task_id):
            LOGGER.info(
                "Not generating configuration due to previous successful generation."
            )
            return

        LOGGER.debug("Starting execution for options %s", options)
        LOGGER.debug("config options %s", self.config_options)
        end_date = datetime.datetime.utcnow().replace(microsecond=0)
        start_date = end_date - datetime.timedelta(days=options.duration_days)

        prepare_directory_for_suite(CONFIG_DIR)

        suites = self.calculate_suites(start_date, end_date)

        LOGGER.debug("Creating %d suites for %s", len(suites),
                     self.config_options.task)

        render_suite(suites, self.config_options.suite)
        render_misc_suite(self.test_list, self.config_options.suite)

        self.write_evergreen_configuration(suites, self.config_options.task)


if __name__ == "__main__":
    Main(EvergreenApi.get_api(config_file=CONFIG_FILE)).main()