jenkinsci / zulip-plugin

Jenkins plugin for Zulip notifications of build status
https://zulip.com/integrations/doc/jenkins
MIT License
14 stars 22 forks source link

Support DSL #6

Closed pixie79 closed 5 years ago

pixie79 commented 8 years ago

Hi,

It would be good if the zulip plugin supported the job-dsl-plugin so that when we build our jobs via DSL we can enable Zulip notifications automatically.

https://github.com/jenkinsci/job-dsl-plugin/wiki/Extending-the-DSL

Thanks

Mark

DoCode commented 6 years ago

What about Jenkins Pipeline syntax?

lfaraone commented 6 years ago

What about Jenkins Pipeline syntax?

please open a separate issue on the main https://github.com/zulip/zulip repository

timabbott commented 6 years ago

@lfaraone why would an issue on zulip/zulip be the right place to ask about Jenkins Pipeline syntax?

I think a separate issue in this project makes more sense, but @DoCode you should provide more clarity about what you're trying to do; I don't think anyone's going to be able to help with such a brief description of your issue.

timabbott commented 6 years ago

Back to the original issue: Contributions welcome! This project is a small plugin, so it's a great place to get involved in contributing open source.

timabbott commented 5 years ago

@DoCode and others: I believe pipeline syntax was added via https://github.com/zulip/zulip-jenkins-plugin/pull/8.

butchyyyy commented 5 years ago

There's no explicit DSL support, but Zulip steps can be used just fine by the dynamically generated DSLs

Example of DSL creating frestyle job using both Zulip Send and Zulip Notification:

job('DSL-Freestyle') {
  steps {
    zulipSend {
      message('Hello DSL!')
      stream('sandbox')
      topic('dsl')
    }
  }
  publishers {
    zulipNotification {
      stream('sandbox')
      topic('dsl')
    }
  }
}

I think we can close this one.

timabbott commented 5 years ago

Cool. Closing, though should we add a section to the README documentation with that example on how to do job DSLs so it's easy to find?