Drone

How to use Jsonnet multiple pipelines on OSS edition?

Hello,

I would like to use Jsonnet multiple pipelines on OSS edition (v1.7.0, single machine).

I tried following .drone.jsonnet, but I just got yaml: line 1: mapping values are not allowed in this context error.

local pipeline(version) = {
  kind: "pipeline",
  name: "default"+version,
  steps: [
    {
      name: "hello",
      image: "alpine:"+version,
      commands: [
        "echo hello"
      ]
    }
  ],
};

[
  pipeline('3.8'),
  pipeline('3.9'),
]

However, I ran .drone.yml generated by drone jsonnet --stream from the .drone.jsonnet successfully.

How can I run original multiple-pipelined .drone.jsonnet, or OSS edition doesn’t support multiple pipelines jsonnet?

I also read an article below, but I could not realize how to run.

Works fine for me. Did you configure using the jsonnet?

Hello, Matthias.

Did you configure using the jsonnet?

Yes, I’ve set DRONE_JSONNET_ENABLED as true and .drone.jsonnet on the filename of Configuration of pre-repository settings.

By the way, I was able to run same multiple jsonnet on v1.2.3 OSS edition.