Is there a reason why task plugins do not have plugin settings?

14 views
Skip to first unread message

M S

unread,
Sep 30, 2019, 8:25:51 PM9/30/19
to go...@googlegroups.com
Hello,

I know that currently task plugins do not support having any plugin-settings. 

Is there any specific reason why this was never implemented?

I ask because I'm thinking of contributing, but I wanted to check first to see if anyone knew why the task plugin capabilities lacked this capability.

Thanks,
-Mike

Varsha Varadarajan

unread,
Sep 30, 2019, 9:14:19 PM9/30/19
to go-cd
Hello,

The task plugins execute tasks on GoCD agents. The plugin settings is stored on the GoCD server and is used for server side plugins and not passed to the GoCD agents. Any settings that the task needs can and should be configured in the task configuration that the plugin provides. 

This is the same for any plugin that operates on the agent - scm and artifact plugins also do not support plugin settings, but rather have configurations that get passed along to the GoCD agents. 

Thanks,
Varsha

M S

unread,
Sep 30, 2019, 9:24:33 PM9/30/19
to go...@googlegroups.com
Okay, understood. 
Then in the scenario where someone wants to have some "global default" settings for a specific task plugin, what would be the recommended approach? 

Right now it feels like the only way to achieve this is by including something like a properties file that is packaged together with the plugin. The downside to this is that anytime you update the configuration in that type of resource, I would also need to restart GoCD server as well.

I also noticed that Task Plugins are not allowed to have icons that can appear in the plugins manager page. That makes me a little sad.  :(

-Mike

--
You received this message because you are subscribed to the Google Groups "go-cd" group.
To unsubscribe from this group and stop receiving emails from it, send an email to go-cd+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/go-cd/c9d7314d-4672-413c-8ae5-791c68613ff2%40googlegroups.com.

Aravind SV

unread,
Oct 1, 2019, 6:34:03 PM10/1/19
to go...@googlegroups.com
Hello,

On Tue, Oct 01, 2019 at 09:24:13 +0800, M S wrote:
> Then in the scenario where someone wants to have some "global default"
> settings for a specific task plugin, what would be the recommended
> approach?
>
> Right now it feels like the only way to achieve this is by including
> something like a properties file that is packaged together with the plugin.
> The downside to this is that anytime you update the configuration in that
> type of resource, I would also need to restart GoCD server as well.

Task plugins were the first kind of plugins in GoCD's plugin infrastructure. They used to have plugin settings a long time ago, if I recall correctly. That ability was then removed. Even normal tasks are fully self-contained. Adding plugin settings seemed to add confusion to it.

I agree that this ended up making them inconsistent, compared to the other plugins. You're right that the way to approach is to have a properties file. It need not be packaged with the plugin, though. It just needs to expect it in a certain location on the filesystem.


> I also noticed that Task Plugins are not allowed to have icons that can
> appear in the plugins manager page. That makes me a little sad. :(

Oh, that makes me a little sad as well. :(

I think our thinking around task plugins evolved to the extent that we subconsciously started ignoring it. Task plugins are a bit of an anti-pattern, in that it isn't what is recommended practice in CD -- in that the plugin ties you to the CD system, rather than allowing you to deploy / build independent of it. Ideally, it's part of a script which is version controlled and called from the CD system. At least that's what I think.

Cheers,
Aravind
Reply all
Reply to author
Forward
0 new messages