# Multiple Configuration Extensions

**URL:** <https://drone.discourse.group/t/multiple-configuration-extensions/9384>\
**Category:** Drone Support\
**Created:** [July 16, 2020, 8:35pm UTC](https://drone.discourse.group/t/multiple-configuration-extensions/9384 "2020-07-16T20:35:40Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![captncraig](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/captncraig/32/5888_2.png) [@captncraig](https://drone.discourse.group/u/captncraig)\
**Post date:** [July 16, 2020, 8:35pm UTC](https://drone.discourse.group/t/multiple-configuration-extensions/9384/1 "2020-07-16T20:35:40Z")

</div>

My org is interested in using multiple configuration extensions in some cases. Perhaps we want to use the jsonnet extension for defining our builds, but also want the features of the paths-changed plugin.

We can currently only run one extension so we must choose. Currently the best bet is to probably generate the .drone.yml from jsonnet and check it in. But we don’t really love that.

We could also write another plugin that defers to multiple downstream config extensions in sequence, but that is tricky with signatures and everything, and I’d rather not.

What if drone itself could handle multiple config extensions:

```auto
DRONE_CONVERT_PLUGIN_ENDPOINT=http://jsonnet.svc:3000,http://paths.svc:3000
DRONE_CONVERT_PLUGIN_SECRET=33120981,83120830

```

Could be simple comma separated list of urls, and an equal length list of secrets. The drone server would call everything in the list in sequence and let each one modify the config in turn.

This makes sense to me for config extensions, but maybe not for all others.

Thoughts?

---

<div class="post-metadata">

**Author:** ![ashwilliams1](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/ashwilliams1/32/5549_2.png) [@ashwilliams1](https://drone.discourse.group/u/ashwilliams1)\
**Post date:** [July 16, 2020, 9:08pm UTC](https://drone.discourse.group/t/multiple-configuration-extensions/9384/2 "2020-07-16T21:08:46Z")

</div>

Are you using jsonnet imports? If not, you can use the server’s embedded jsonnet converter by setting [DRONE\_JSONNET\_ENABLED](https://docs.drone.io/server/reference/drone-jsonnet-enabled/).

---

<div class="post-metadata">

**Author:** ![captncraig](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/captncraig/32/5888_2.png) [@captncraig](https://drone.discourse.group/u/captncraig)\
**Post date:** [July 16, 2020, 9:31pm UTC](https://drone.discourse.group/t/multiple-configuration-extensions/9384/3 "2020-07-16T21:31:58Z")

</div>

Yes, we will be using imports.

---

<div class="post-metadata">

**Author:** ![bradrydzewski](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/bradrydzewski/32/3513_2.png) [@bradrydzewski](https://drone.discourse.group/u/bradrydzewski)\
**Post date:** [July 17, 2020, 12:50pm UTC](https://drone.discourse.group/t/multiple-configuration-extensions/9384/4 "2020-07-17T12:50:48Z")

</div>

For an immediate solution, the jsonnet extension is a configuration extension and the paths changed extension [1] is a conversion extension. Since they are two separate extension types, you should be able to use both at the same time. But I certainly agree with your post that we need to support multiple configuration extensions at the same time.

[1] [https://github.com/meltwater/drone-convert-pathschanged](https://github.com/meltwater/drone-convert-pathschanged)

---

<div class="post-metadata">

**Author:** ![captncraig](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/captncraig/32/5888_2.png) [@captncraig](https://drone.discourse.group/u/captncraig)\
**Post date:** [July 17, 2020, 3:06pm UTC](https://drone.discourse.group/t/multiple-configuration-extensions/9384/5 "2020-07-17T15:06:44Z")

</div>

Hmm, in the docs they are both under conversion: [https://docs.drone.io/extensions/conversion/](https://docs.drone.io/extensions/conversion/),

But in the code, yeah, jsonnet is config. That is convenient.

---

<div class="post-metadata">

**Author:** ![captncraig](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/captncraig/32/5888_2.png) [@captncraig](https://drone.discourse.group/u/captncraig)\
**Post date:** [July 17, 2020, 10:06pm UTC](https://drone.discourse.group/t/multiple-configuration-extensions/9384/6 "2020-07-17T22:06:35Z")

</div>

This got a little complicated today. Here’s what I found:

1. The drone-jsonnet standalone extension really did not like my config that returned an array at the top level. `drone jsonnet --stream` and the built-in jsonnet mode work just fine though.
2. The built-in jsonnet works ok for me (even though it has no importer), but it is implemented in the conversion plugin list, and `convert.Combiner` short-circuits after the jsonnet evaluates, so the paths-changed extension never gets called.

I made [https://github.com/drone/drone/pull/2994](https://github.com/drone/drone/pull/2994) which seems to fix my immediate problem with that configuration.
