Skip to content

jsonnet_library to support ext_code param #89

Open

Description

@borg286

I have a use case where I want to take values fetched from bazel BUILD files and pipe them into my jsonnet_library targets. More notably I want to pipe in the BUILD_USER into a value in my library, then use that library elsewhere. This is similar to the "data" param common in other bazel rules, but this one routes variables in BUILD files rather than the contents of files in.

Activity

  1. borg286 commented on Dec 29, 2018

    @borg286
    Author

    I was able to work around it by having a jsonnet_to_json target where I used ext_code to pass the variable in. The jsonnet simply pulled the variable in via std.extVar and output it. I then used the "data" param on jsonnet_library to consume this json and pull out the values I wanted. Still it would be nice to avoid this hack.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions