def METHOD_NAME(job, cmdline=None):
    """
    Records all required job information.
    """
    base_dir = init_dir(job.logdir, JOB_DATA_DIR)
    path_cfg = os.path.join(base_dir, CONFIG_FILENAME)
    path_references = os.path.join(base_dir, TEST_REFERENCES_FILENAME)
    path_pwd = os.path.join(base_dir, PWD_FILENAME)
    path_job_config = os.path.join(base_dir, JOB_CONFIG_FILENAME)
    path_cmdline = os.path.join(base_dir, CMDLINE_FILENAME)
    references = job.config.get("resolver.references")
    if references:
        with open(path_references, "w", encoding="utf-8") as references_file:
            references_file.write(f"{references}")
            references_file.flush()
            os.fsync(references_file)
    with open(path_cfg, "w", encoding="utf-8") as config_file:
        settings.config.write(config_file)
        config_file.flush()
        os.fsync(config_file)
    for idx, suite in enumerate(job.test_suites, 1):
        if suite.name:
            suite_var_name = f"variants-{idx}-{suite.name}.json"
        else:
            suite_var_name = f"variants-{idx}.json"
        suite_var_name = string_to_safe_path(suite_var_name)
        path_suite_variant = os.path.join(base_dir, suite_var_name)
        record_suite_variant(path_suite_variant, suite)
    with open(path_pwd, "w", encoding="utf-8") as pwd_file:
        pwd_file.write(f"{os.getcwd()}")
        pwd_file.flush()
        os.fsync(pwd_file)
    with open(path_job_config, "w", encoding="utf-8") as job_config_file:
        json.dump(job.config, job_config_file, cls=ConfigEncoder)
        job_config_file.flush()
        os.fsync(job_config_file)
    with open(path_cmdline, "w", encoding="utf-8") as cmdline_file:
        cmdline_file.write(f"{cmdline}")
        cmdline_file.flush()
        os.fsync(cmdline_file)