Skip to content

Commit cc3e96f

Browse files
authored
update Create CDEvent in Readme (#78)
Signed-off-by: Jalander Ramagiri <jalander.ramagiri@est.tech>
1 parent 545d69f commit cc3e96f

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,21 +25,21 @@ public class CDEventsExample {
2525
/*when creating new object of any CDEvent type, the event will be initialized with
2626
context.id, context.type, context.version, context.timestamp
2727
and subject.type */
28-
PipelineRunFinishedCDEvent pipelineRunFinishedCDEvent = new PipelineRunFinishedCDEvent();
28+
PipelinerunFinishedCDEvent pipelinerunFinishedCDEvent = new PipelinerunFinishedCDEvent();
2929

3030
/* set the required context fields to the pipelineRunFinishedCDEvent */
31-
pipelineRunFinishedCDEvent.setSource(URI.create("http://dev.cdevents"));
31+
pipelinerunFinishedCDEvent.setSource(URI.create("http://dev.cdevents"));
3232

3333
/* set the required subject fields to the pipelineRunFinishedCDEvent */
34-
pipelineRunFinishedCDEvent.setSubjectId("/dev/pipeline/run/1");
35-
pipelineRunFinishedCDEvent.setSubjectSource(URI.create("http://dev.pipeline.run/source"));
36-
pipelineRunFinishedCDEvent.setSubjectUrl(URI.create("http://dev.pipeline.run/url"));
37-
pipelineRunFinishedCDEvent.setSubjectOutcome(CDEventConstants.Outcome.SUCCESS);
38-
pipelineRunFinishedCDEvent.setSubjectPipelineName("testPipeline");
39-
pipelineRunFinishedCDEvent.setSubjectErrors("pipelineErrors");
34+
pipelinerunFinishedCDEvent.setSubjectId("/dev/pipeline/run/1");
35+
pipelinerunFinishedCDEvent.setSubjectSource(URI.create("http://dev.pipeline.run/source"));
36+
pipelinerunFinishedCDEvent.setSubjectUrl("http://dev.pipeline.run/url");
37+
pipelinerunFinishedCDEvent.setSubjectOutcome(CDEventConstants.Outcome.SUCCESS.getOutcome());
38+
pipelinerunFinishedCDEvent.setSubjectPipelineName("testPipeline");
39+
pipelinerunFinishedCDEvent.setSubjectErrors("pipelineErrors");
4040

4141
/* Create a CloudEvent from a pipelineRunFinishedCDEvent */
42-
CloudEvent ceEvent = CDEvents.cdEventAsCloudEvent(pipelineRunFinishedCDEvent);
42+
CloudEvent ceEvent = CDEvents.cdEventAsCloudEvent(pipelinerunFinishedCDEvent);
4343

4444
/* This CDEvent can be sent as CloudEvent using HTTP Protocol Binding,
4545
Refer : https://cloudevents.github.io/sdk-java/http-basic.html

0 commit comments

Comments
 (0)