Skip to content

Version 3.3.0 - Python Import Inject

Latest
Compare
Choose a tag to compare
@CCP-Zeulix CCP-Zeulix released this 30 May 11:43
59f6c9c

Added

  • A new expression for injecting values imported from/via Python like so
    ${__PY__:alviss.__version__}
    • This uses the ccptools.tpu.strimp.get_any(...) to import whatever the
      expression key points to and inject into the parsed config
    • The use case here is mainly to inject dynamic Python values into Alviss
      files "on-demand" like when using ccp-stencil
      templates in a CI/CD pipe so you can have the ever-changing version of the
      package you're working on injected automatically into the Alviss config file
      used as Context for rendering Docker files, Kube manifests and so on
      (similar to how it can be done in pyproject.toml)
    • This expression also adheres to the normal format of "defaults" (e.g.
      ${__PY__:alviss.__version__=Unknown}) and "required" (e.g.
      ${__PY__:alviss.__version__!=})