Plugin.yml schema?

I’m trying to write a buildkite plugin, but it’s not really clear what the full plugin.yml schema is. I found a schema in the linter, but it just says is an object; it doesn’t go into detail on what that object’s keys can be. Browsing through the plugins repo, there seem to be a lot of complex options that could go in there. Are they documented anywhere?

Edit: oops, posted too soon :sweat_smile:here’s the full thing!

Hey @ianwremmel :wave:t2: We don’t have docs for the schema yet, but we’re working on it!

The properties object is a pretty loose one, intentionally. You can define whatever variables your plugin requires using the ‘properties’ object like so:

    type: [ string, boolean ]

The only thing to keep in mind is that the properties key needs to be valid JSON schema.

So then using the ‘message’ property we defined above in a plugin would look like:

  - command: ...
      - my-plugin#v1.0.0:
          message: "Hello I'm a message"

Let me know if that helps, or if you want some more info or examples :+1:t2:

If you’d like a sneak peek of the new plugins guides we’re working on, you can find them in a PR on our docs repo here: :blush:

Oh, awesome, thanks! I should have put it together that all the fancy stuff I saw in other plugins were from JSON-schema and not buildkite-specific. The new docs are great. Even though they’re incomplete, they’re a huge improvement :slight_smile:

1 Like