Пример #1
0
def create_rule_runner() -> RuleRunner:
    rule_runner = RuleRunner(
        rules=[
            *core_target_types_rules(),
            *dependencies.rules(),
            *docker_binary.rules(),
            *docker_build_args.rules(),
            *docker_build_context.rules(),
            *docker_build_env.rules(),
            *dockerfile.rules(),
            *dockerfile_parser.rules(),
            *package_image.rules(),
            *package_pex_binary.rules(),
            *pex_from_targets.rules(),
            *shell_target_types_rules(),
            *target_types_rules.rules(),
            package.find_all_packageable_targets,
            QueryRule(BuiltPackage, [PexBinaryFieldSet]),
            QueryRule(DockerBuildContext, (DockerBuildContextRequest, )),
        ],
        target_types=[
            DockerImageTarget,
            FilesGeneratorTarget,
            PexBinary,
            ShellSourcesGeneratorTarget,
            ShellSourceTarget,
        ],
    )
    return rule_runner
Пример #2
0
def rule_runner() -> RuleRunner:
    rule_runner = RuleRunner(
        rules=[
            *dockerfile.rules(),
            *dockerfile_parser.rules(),
            package.find_all_packageable_targets,
            *package_image.rules(),
            *package_pex_binary.rules(),
            *package_go_binary.rules(),
            *pex.rules(),
            inject_docker_dependencies,
            py_target_types_rules.generate_targets_from_pex_binaries,
            UnionRule(GenerateTargetsRequest, py_target_types_rules.GenerateTargetsFromPexBinaries),
            QueryRule(InjectedDependencies, (InjectDockerDependencies,)),
        ],
        target_types=[
            DockerImageTarget,
            PexBinary,
            PexBinariesGeneratorTarget,
            GoBinaryTarget,
        ],
    )
    rule_runner.set_options(
        [],
        env_inherit={"PATH", "PYENV_ROOT", "HOME"},
    )
    return rule_runner
Пример #3
0
def rule_runner() -> RuleRunner:
    return RuleRunner(
        rules=[
            *rules(),
            *build_args_rules(),
            *build_env_rules(),
            QueryRule(DockerOptions, []),
            QueryRule(DockerBuildArgs, [DockerBuildArgsRequest]),
            QueryRule(DockerBuildEnvironment, [DockerBuildEnvironmentRequest]),
        ],
        target_types=[DockerImageTarget],
    )
Пример #4
0
def rules():
    return [
        *dependencies.rules(),
        *docker_binary.rules(),
        *docker_build_args.rules(),
        *docker_build_context.rules(),
        *docker_build_env.rules(),
        *dockerfile.rules(),
        *dockerfile_parser.rules(),
        *package_image.rules(),
        *publish.rules(),
        *run_image.rules(),
    ]
Пример #5
0
def rule_runner() -> RuleRunner:
    rule_runner = RuleRunner(
        rules=[
            *dockerfile.rules(),
            *dockerfile_parser.rules(),
            *package_image.rules(),
            *package_pex_binary.rules(),
            *pex.rules(),
            inject_docker_dependencies,
            QueryRule(InjectedDependencies, (InjectDockerDependencies, )),
        ],
        target_types=[DockerImageTarget, PexBinary],
    )
    rule_runner.set_options(
        [],
        env_inherit={"PATH", "PYENV_ROOT", "HOME"},
    )
    return rule_runner