Skip to content
  • Dduvall's avatar
    Refactor builder to support file requirements and run pre-install · 374976d4
    Dduvall authored
    The builder configuration has proven useful for supporting generic
    pre-entrypoint commands such as dependency managers not otherwise
    supported by specific Blubber configuration. Adding additional
    `builder.requirements` config expands support for such commands by
    allowing the user to specify files that should be copied into the image
    before the builder command runs.
    
    To support this extra configuration, `builder` had to be changed from a
    simple string to a mapping. The builder command must now by given as
    `builder.command`.
    
    The pattern of creating parent directories, copying files, and executing
    one or more commands prior to the entrypoint has become a common
    one. Some of the implementation of this pattern was moved from
    `PythonConfig` into shared build macros `build.SortFilesByDir` and
    `build.SyncFiles`. All config types that must have requirements files
    copied over independently of the entire source tree (`PythonConfig`,
    `BuilderConfig`, `NodeConfig`) now delegate to these functions.
    
    Change-Id: I67f33034f22cee2851ec866cfb07ab20c23eba8c
    374976d4