jenkinsci / cloudevents-plugin

Cloudevents Plugin for Jenkins
https://plugins.jenkins.io/cloudevents/
MIT License
18 stars 15 forks source link

Initial setup of the CloudEvents Plugin #2

Closed ShrutiC-git closed 3 years ago

ShrutiC-git commented 3 years ago

Here's what has been done inside this PR:

  1. Add Global-Configuration to this Plugin.
    • Users can enter and save configuration globally; config included sink URL and the corresponding event it will receive.
  2. Implement RunListener to listen for runs of a job
    • This implementation will listen to status change of a run for a particular job and notify the sinks accordingly.
  3. Construct payload to be sent to the sink and convert this Java object to JSON-string.
  4. Wrap the payload inside CloudEvent's binary format and implement Message-Writers to write the CloudEvent to HTTP request.
  5. Send request over to the configured Sink with CloudEvent-required headers.