tree: 8dd9e883ec1b22da7976104a3025c4b768657d5d [path history] [tgz]
  1. jsontoproto/
  2. buildbucket.libsonnet
  3. canonicalize-and-diff.sh
  4. cr-buildbucket.jsonnet
  5. cr-scheduler.jsonnet
  6. integration-tests.jsonnet
  7. README.md
  8. scheduler.libsonnet
services/jsonnet/README.md

Jsonnet LUCI configs

Usage

  1. build jsonnet from source as described here: https://jsonnet.org/learning/getting_started.html
  2. build jsontoproto: cd jsontoproto; go build -o /tmp/jsontoproto; cd ... If this fails you may need to run go get to get missing libraries.
  3. jsonnet cr-buildbucket.jsonnet | /tmp/jsontoproto -config_type=buildbucket

Example output

buckets: <
  name: "luci.fuchsia.ci"
  acls: <
    role: SCHEDULER
    identity: "user:luci-scheduler@appspot.gserviceaccount.com"
  >
  acl_sets: "default"
  swarming: <
    hostname: "chromium-swarm.appspot.com"
    url_format: "https://luci-milo.appspot.com/swarming/task/{task_id}"
    builder_defaults: <
      swarming_tags: "allow_milo:1"
      swarming_tags: "vpython:native-python-wrapper"
      dimensions: "pool:luci.fuchsia.ci"
      recipe: <
        name: "fuchsia"
        cipd_package: "fuchsia/infra/recipe_bundles/fuchsia.googlesource.com/infra/recipes"
        properties: "remote:https://fuchsia.googlesource.com/manifest"
        properties: "manifest:fuchsia"
        properties_j: "packages:[\"topaz/packages/buildbot\"]"
      >
      execution_timeout_secs: 3600
    >
    builders: <
      name: "build-roller"
      dimensions: "os:Linux"
      recipe: <
        name: "fuchsia_roller"
        properties_j: "poll_timeout_secs:5400"
        properties_j: "$kitchen:{\"git_auth\": true}"
        properties_j: "project:garnet"
        properties_j: "remote:https://fuchsia.googlesource.com/garnet"
        properties_j: "manifest:manifest/minimal"
        properties_j: "import_in:manifest/garnet"
        properties_j: "import_from:build"
      >
      execution_timeout_secs: 6000
      service_account: "third-party-roller@fuchsia-infra.iam.gserviceaccount.com"
    >
  >
>
acl_sets: <
  name: "default"
  acls: <
    group: "all"
  >
>

Note that fields that are set to the default value (as defined in the .proto file) are omited from the output, even if they are explicitly set in the input.

Style

Using Google JavaScript style, where applicable, because it seems to match the jsonnet standard library. Also a nice coincidence that the field names in the LUCI protos generally use snake_case, so there's a visual hint if an identifier refers to a proto field name or not.