I've sent off the PR to get it listed in the meantime :) Before starting to invest time writing this task plugin I tried to do my homework as best as I could. I did not find as much documentation / guides / general resources on GoCD as I expected. Therefore, writing this plugin is/was also a good way of getting to know GoCD better. Other than that: If I get GoCD to do what I want I'll have several dozen C++ projects to manage with intricate dependencies. I expect to end up with about 100 pipelines. Templates certainly help a lot but there are certain limitations such as no possibility to extend a template (creating a template from another template / nested templates) and I already got tired of creating the custom command(s) for my cmake builds every time. This plugin is merely taking away some of the pain when defining new templates as I can't really re-use existing ones (other than copy-pasting the XML).
I fully understand that I could achieve everything I want (in terms of functionality that is) by simply going with the *Custom Commands* and in-repo scripts. CMake itself already takes away a lot of hassle and it basically boils down to two commands: One to generate the buildsystem (cmake itself is not a buildsystem, it just generates one) and then one to launch the build itself. This is nativity at it's best but I don't plan to move away from GoCD anytime soon once I setup everything. If I have (or want to) migrate to a different CD system in the future most of the hassle will be setting the CD system itself up. The two *Custom Commands* (or whatever the "new" CD system will call them) are not really what is going to keep me busy. Best regards, ~ Joel On Wednesday, December 2, 2020 at 11:12:28 PM UTC+1 Aravind SV wrote: > You certainly don’t need to pull it. :) You should submit a PR to get it > listed on the site too. > > I’d urge you and others to not depend on task plugins, because it ties you > to the tool unnecessarily. That’s all. > > I’ve seen others ask: “Why isn’t there a plug-in for X??” before and > understanding the reason for it helps sometimes. > > Cheers, > Aravind > > On Wed, 2 Dec 2020 at 22:03, Joel Bodenmann <[email protected]> wrote: > >> Well, I literally just finished publishing the first version of my task >> plugin (see my other conversation announcing it). So this is a bit of a >> bummer now... :-( >> I guess I'm gonna sleep a night over it but I think pulling back the new >> plugin would be a bit of a shame. >> >> I fully understand where you come from and I am certainly far from >> qualified to take place in any kind of discussion like that as I am brand >> new to GoCD. I am coming from Jenkins so I might be a bit biased from that >> side as you also explained. >> >> >> Best regards, >> ~ Joel >> >> On Wednesday, December 2, 2020 at 7:49:07 PM UTC+1 Aravind SV wrote: >> >>> Yes, it's complicated because it's an Angular template with its own >>> syntax. This is so that a plugin can provide the template. If you have code >>> publicly available, I might be able to take a look in a couple of days. >>> >>> By the way: I'm a big opponent (is that the right word a non-proponent?) >>> of task plugins. I think they shouldn't exist / be used. I rant about them >>> often. Here's one of them: >>> https://groups.google.com/d/topic/go-cd/9bmEV3R7JBk/discussion. It's >>> very different from how (for instance) the Jenkins world thinks about >>> plugins. I'd really consider pipelines as code >>> <https://github.com/tomzo/gocd-json-config-plugin> or simple shell >>> scripts instead of task plugins. >>> >>> Cheers, >>> Aravind >>> >>> On Wed, Dec 2, 2020 at 5:40 PM Joel Bodenmann <[email protected]> wrote: >>> >>>> Never mind - got it working. I needed to specify *ng-true-value* and >>>> *ng-false-value* to strings that Java's *Boolean.parseBoolean()* can >>>> understand. >>>> >>>> Now the only thing left is fixing the issue that my *number* input is >>>> not set to the value from the XML (although it is being saved correctly) >>>> when opening the task config view. It's always empty (showing the >>>> placeholder) instead of displaying the value from the XML config. >>>> >>>> >>>> Best regards, >>>> ~ Joel >>>> >>>> On Wednesday, December 2, 2020 at 5:00:27 PM UTC+1 Joel Bodenmann wrote: >>>> >>>>> Aravind, >>>>> >>>>> I've come across that piece of documentation when starting to look at >>>>> the possibility of creating my own Task plugin. In my opinion the >>>>> documentation does a good job at giving a quick overview but I found that >>>>> some more advanced/complex examples might be helpful. >>>>> Once I gathered the necessary experience to finish my first plugin >>>>> I'll look into providing a PR extending the documentation. >>>>> >>>>> I am not a web developer so please forgive me if I should really not >>>>> ask this here but: I managed to get everything working so far. I've a >>>>> task >>>>> plugin with the HTML config view that uses HTML input fields of type >>>>> *text *and *number * to configure my task. So far so good. >>>>> Next I wanted to add a checkbox for some conditional task behavior. >>>>> However, I can't manage to get the checkbox to save to the XML. I've >>>>> copied >>>>> the fragments of my other *text* and *number* fields and simply >>>>> changed the type to *checkbox* and adjusted the *ng-model* attribute >>>>> to "link" to the new boolean setting. >>>>> >>>>> Is there anything special about getting back the checked/unchecked >>>>> state of a checkbox? >>>>> >>>>> This is my HTML fragment for the checkbox: >>>>> >>>>> <div class="form_item_block"> >>>>> <input type="checkbox" ng-model="perform_build" ng-required >>>>> ="false"/> >>>>> <label>Enable</label> >>>>> </div> >>>>> >>>>> If I look at the config form using the inspector I can see that my >>>>> *text* and *number* input fields still have the *ng-** attributes but >>>>> the checkbox in question has been stripped of the *ng-model* and >>>>> *ng-required* attribute. >>>>> >>>>> I'd appreciate it a lot if somebody could help out an embedded C++ >>>>> developer here not accustomed to work with AngularJS. >>>>> >>>>> >>>>> Best regards, >>>>> ~ Joel >>>>> On Wednesday, December 2, 2020 at 3:09:31 PM UTC+1 Aravind SV wrote: >>>>> >>>>>> Agree! >>>>>> >>>>>> The source of the current documentation is: >>>>>> >>>>>> https://github.com/gocd/plugin-api.go.cd/blob/master/source/includes/shared/_angular-templates.md >>>>>> >>>>>> It looks like this: >>>>>> https://plugin-api.gocd.org/current/tasks/ >>>>>> >>>>>> Pull requests are always welcome. Not just from Joel. :) But, for >>>>>> anyone who finds that the documentation can be improved. >>>>>> >>>>>> Cheers, >>>>>> Aravind >>>>>> >>>>> -- >>>> 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 [email protected]. >>>> To view this discussion on the web visit >>>> https://groups.google.com/d/msgid/go-cd/e316992e-3e4a-44c9-aa4c-6c5cb36e6733n%40googlegroups.com >>>> >>>> <https://groups.google.com/d/msgid/go-cd/e316992e-3e4a-44c9-aa4c-6c5cb36e6733n%40googlegroups.com?utm_medium=email&utm_source=footer> >>>> . >>>> >>> -- >> 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 [email protected]. >> > To view this discussion on the web visit >> https://groups.google.com/d/msgid/go-cd/f52a3ec6-f3d5-481a-b455-8b314ae54945n%40googlegroups.com >> >> <https://groups.google.com/d/msgid/go-cd/f52a3ec6-f3d5-481a-b455-8b314ae54945n%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> > -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/go-cd/8c8ca923-ea46-4ae2-806e-b94dd60624d0n%40googlegroups.com.
