From 3090eb4154da416d267dda045b1708e94a054969 Mon Sep 17 00:00:00 2001 From: Shruti Chaturvedi Date: Wed, 28 Jul 2021 22:36:50 +0530 Subject: [PATCH 01/36] Add Table of Contents to Readme --- README.md | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 4ffd4e3..8ef6d19 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,19 @@ CloudEvents-Plugin ====================================== ------- +Table of Contents +===================================== + + * [Introduction](#introduction) + * [Getting Started](#getting-started) + * [Events Documentation for Jenkins as Source](#events-documentation-for-jenkins-as-source) + * [Queue Events](#queue-events) + * [Build Events](#build-events) + * [Job Events](#job-events) + * [Node Events](#node-events) + * [Issues](#issues) + * [Contributing](#contributing) + Introduction ====================================== @@ -16,7 +29,7 @@ write adapters. ------- -Getting started +Getting Started ============== There are 2 usages of this plugin: From 1298c1b490db9c92551f07e987c0d7d47e9055ee Mon Sep 17 00:00:00 2001 From: Shruti Chaturvedi Date: Fri, 30 Jul 2021 00:47:10 +0530 Subject: [PATCH 02/36] [maven-release-plugin] prepare release 1.0.0 --- pom.xml | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/pom.xml b/pom.xml index 9031b9f..4dc4932 100644 --- a/pom.xml +++ b/pom.xml @@ -1,18 +1,17 @@ - + 4.0.0 org.jenkins-ci.plugins plugin 4.16 - + io.jenkins.plugins cloudevents - ${revision}${changelist} + 1.0.0 hpi @@ -171,6 +170,12 @@ 1.35 test + + org.jetbrains + annotations + RELEASE + compile + @@ -209,7 +214,7 @@ scm:git:git://github.com/${gitHubRepo}.git scm:git:git@github.com:${gitHubRepo}.git https://github.com/${gitHubRepo} - ${scmTag} + 1.0.0 From d6aef9f3ced511a0e6a34167b59abc58931ea0bc Mon Sep 17 00:00:00 2001 From: Shruti Chaturvedi Date: Fri, 30 Jul 2021 00:48:56 +0530 Subject: [PATCH 03/36] Fix spotbugs --- pom.xml.releaseBackup | 228 ++++++++++++++++++ release.properties | 20 ++ .../io/jenkins/plugins/cloudevents/Stage.java | 19 +- ...ItemListener.java => CE_ItemListener.java} | 4 +- .../{JobListener.java => CE_JobListener.java} | 4 +- ...NodeListener.java => CE_NodeListener.java} | 4 +- ...eueListener.java => CE_QueueListener.java} | 2 +- .../plugins/cloudevents/model/JobModel.java | 11 +- .../plugins/cloudevents/model/NodeModel.java | 7 +- .../plugins/cloudevents/model/QueueModel.java | 14 +- .../plugins/cloudevents/sinks/HTTPSink.java | 66 ++++- .../plugins/cloudevents/StageTest.java | 16 +- 12 files changed, 368 insertions(+), 27 deletions(-) create mode 100644 pom.xml.releaseBackup create mode 100644 release.properties rename src/main/java/io/jenkins/plugins/cloudevents/listeners/{ItemListener.java => CE_ItemListener.java} (78%) rename src/main/java/io/jenkins/plugins/cloudevents/listeners/{JobListener.java => CE_JobListener.java} (91%) rename src/main/java/io/jenkins/plugins/cloudevents/listeners/{NodeListener.java => CE_NodeListener.java} (89%) rename src/main/java/io/jenkins/plugins/cloudevents/listeners/{QueueListener.java => CE_QueueListener.java} (84%) diff --git a/pom.xml.releaseBackup b/pom.xml.releaseBackup new file mode 100644 index 0000000..9031b9f --- /dev/null +++ b/pom.xml.releaseBackup @@ -0,0 +1,228 @@ + + + 4.0.0 + + + org.jenkins-ci.plugins + plugin + 4.16 + + + + io.jenkins.plugins + cloudevents + ${revision}${changelist} + hpi + + + 1.0.0 + -SNAPSHOT + 2.277.4 + 8 + jenkinsci/${project.artifactId}-plugin + + + CloudEvents Plugin + https://github.com/jenkinsci/${project.artifactId}-plugin + Emit and Consume CloudEvents in Jenkins. + + + + + io.jenkins.tools.bom + bom-2.277.x + 26 + import + pom + + + + org.jenkins-ci.plugins + jackson2-api + 2.11.3 + + + + + + + + MIT License + https://opensource.org/licenses/MIT + + + + + + ShrutiC-git + Shruti Chaturvedi + shrutichaturvedi16.sc@gmail.com + + + + + + + com.mashape.unirest + unirest-java + 1.4.9 + + + + + io.cloudevents + cloudevents-core + 2.0.0 + + + + io.cloudevents + cloudevents-http-basic + 2.0.0 + + + + io.cloudevents + cloudevents-api + 2.1.0 + + + + io.jenkins + configuration-as-code + 1.35 + true + + + + + + org.json + json + 20190722 + + + + org.junit.jupiter + junit-jupiter-engine + 5.2.0 + test + + + + + org.mockito + mockito-core + 3.7.7 + test + + + + org.mockito + mockito-inline + 2.13.0 + test + + + + + org.powermock + powermock-module-junit4 + 2.0.9 + test + + + + + + + io.jenkins.plugins + plugin-util-api + 2.0.0 + + + + + javax.servlet + javax.servlet-api + 4.0.1 + provided + + + + com.fasterxml.jackson.core + jackson-annotations + 2.12.0 + + + com.fasterxml.jackson.core + jackson-databind + 2.12.0 + + + io.jenkins.configuration-as-code + test-harness + 1.35 + test + + + + + + + + org.jacoco + jacoco-maven-plugin + 0.8.6 + + + default-prepare-agent + + prepare-agent + + + + report + prepare-package + + report + + + + + + + org.apache.maven.plugins + maven-surefire-plugin + 2.20 + + + + + + scm:git:git://github.com/${gitHubRepo}.git + scm:git:git@github.com:${gitHubRepo}.git + https://github.com/${gitHubRepo} + ${scmTag} + + + + + repo.jenkins-ci.org + https://repo.jenkins-ci.org/public/ + + + + + + repo.jenkins-ci.org + https://repo.jenkins-ci.org/public/ + + + diff --git a/release.properties b/release.properties new file mode 100644 index 0000000..06d7a2f --- /dev/null +++ b/release.properties @@ -0,0 +1,20 @@ +#release configuration +#Fri Jul 30 00:47:09 IST 2021 +scm.commentPrefix=[maven-release-plugin] +project.dev.io.jenkins.plugins\:cloudevents=1.0.1-SNAPSHOT +project.rel.io.jenkins.plugins\:cloudevents=1.0.0 +project.scm.io.jenkins.plugins\:cloudevents.developerConnection=scm\:git\:git@github.com\:${gitHubRepo}.git +project.scm.io.jenkins.plugins\:cloudevents.tag=${scmTag} +pushChanges=true +scm.tag=1.0.0 +remoteTagging=true +project.scm.io.jenkins.plugins\:cloudevents.connection=scm\:git\:git\://github.com/${gitHubRepo}.git +exec.additionalArguments=-P consume-incrementals,might-produce-incrementals +project.scm.io.jenkins.plugins\:cloudevents.url=https\://github.com/${gitHubRepo} +projectVersionPolicyId=default +scm.url=scm\:git\:git@github.com\:jenkinsci/cloudevents-plugin.git +scm.tagNameFormat=@{project.artifactId}-@{project.version} +preparationGoals=clean install +exec.snapshotReleasePluginAllowed=false +completedPhase=run-preparation-goals +completionGoals=incrementals\:reincrementalify diff --git a/src/main/java/io/jenkins/plugins/cloudevents/Stage.java b/src/main/java/io/jenkins/plugins/cloudevents/Stage.java index 4fe7976..78977e3 100644 --- a/src/main/java/io/jenkins/plugins/cloudevents/Stage.java +++ b/src/main/java/io/jenkins/plugins/cloudevents/Stage.java @@ -74,6 +74,9 @@ public void handleEvent(Object o, String clazz) throws NullPointerException { NodeModel nodeModel = buildNodeModel((Computer) o); sendObject = nodeModel; break; + + default: + break; } if (CloudEventsGlobalConfig.get().getSinkType().equals("http")) { @@ -217,6 +220,9 @@ public QueueModel buildQueueModel(Queue.Item item) { queueModel.setEntryTime(new Date(item.getInQueueSince())); queueModel.setExitTime(new Date()); break; + + default: + break; } @@ -228,8 +234,16 @@ public QueueModel buildQueueModel(Queue.Item item) { public NodeModel buildNodeModel(Computer computer) throws IOException, InterruptedException { NodeModel nodeModel = new NodeModel(); + nodeModel.setNumExecutors(computer.getNumExecutors()); - nodeModel.setNodeName(computer.getNode().getNodeName()); + + Node node = computer.getNode(); + if (node != null) { + String nodeName = node.getNodeName(); + nodeModel.setNodeName(nodeName); + } + + nodeModel.setCachedHostName(computer.getHostName()); nodeModel.setConnectTime(computer.getConnectTime()); @@ -241,6 +255,9 @@ public NodeModel buildNodeModel(Computer computer) throws IOException, Interrupt case OFFLINE: nodeModel.setStatus("offline"); break; + + default: + break; } if (computer.isOffline()) { diff --git a/src/main/java/io/jenkins/plugins/cloudevents/listeners/ItemListener.java b/src/main/java/io/jenkins/plugins/cloudevents/listeners/CE_ItemListener.java similarity index 78% rename from src/main/java/io/jenkins/plugins/cloudevents/listeners/ItemListener.java rename to src/main/java/io/jenkins/plugins/cloudevents/listeners/CE_ItemListener.java index 0322257..d8b2266 100644 --- a/src/main/java/io/jenkins/plugins/cloudevents/listeners/ItemListener.java +++ b/src/main/java/io/jenkins/plugins/cloudevents/listeners/CE_ItemListener.java @@ -5,9 +5,9 @@ import io.jenkins.plugins.cloudevents.Stage; @Extension -public class ItemListener extends hudson.model.listeners.ItemListener { +public class CE_ItemListener extends hudson.model.listeners.ItemListener { - public ItemListener() { + public CE_ItemListener() { } @Override diff --git a/src/main/java/io/jenkins/plugins/cloudevents/listeners/JobListener.java b/src/main/java/io/jenkins/plugins/cloudevents/listeners/CE_JobListener.java similarity index 91% rename from src/main/java/io/jenkins/plugins/cloudevents/listeners/JobListener.java rename to src/main/java/io/jenkins/plugins/cloudevents/listeners/CE_JobListener.java index eab81d3..df5adf7 100644 --- a/src/main/java/io/jenkins/plugins/cloudevents/listeners/JobListener.java +++ b/src/main/java/io/jenkins/plugins/cloudevents/listeners/CE_JobListener.java @@ -14,9 +14,9 @@ * Class which implements RunListener and responds to events relating to run of a job. */ @Extension -public class JobListener extends RunListener { +public class CE_JobListener extends RunListener { - public JobListener() { + public CE_JobListener() { super(Run.class); } diff --git a/src/main/java/io/jenkins/plugins/cloudevents/listeners/NodeListener.java b/src/main/java/io/jenkins/plugins/cloudevents/listeners/CE_NodeListener.java similarity index 89% rename from src/main/java/io/jenkins/plugins/cloudevents/listeners/NodeListener.java rename to src/main/java/io/jenkins/plugins/cloudevents/listeners/CE_NodeListener.java index 3f0f770..af5efd5 100644 --- a/src/main/java/io/jenkins/plugins/cloudevents/listeners/NodeListener.java +++ b/src/main/java/io/jenkins/plugins/cloudevents/listeners/CE_NodeListener.java @@ -11,9 +11,9 @@ import java.io.IOException; @Extension -public class NodeListener extends ComputerListener { +public class CE_NodeListener extends ComputerListener { - public NodeListener() { + public CE_NodeListener() { super(); } diff --git a/src/main/java/io/jenkins/plugins/cloudevents/listeners/QueueListener.java b/src/main/java/io/jenkins/plugins/cloudevents/listeners/CE_QueueListener.java similarity index 84% rename from src/main/java/io/jenkins/plugins/cloudevents/listeners/QueueListener.java rename to src/main/java/io/jenkins/plugins/cloudevents/listeners/CE_QueueListener.java index c6c8652..e42d505 100644 --- a/src/main/java/io/jenkins/plugins/cloudevents/listeners/QueueListener.java +++ b/src/main/java/io/jenkins/plugins/cloudevents/listeners/CE_QueueListener.java @@ -5,7 +5,7 @@ import io.jenkins.plugins.cloudevents.Stage; @Extension -public class QueueListener extends hudson.model.queue.QueueListener { +public class CE_QueueListener extends hudson.model.queue.QueueListener { @Override public void onEnterWaiting(Queue.WaitingItem wi) { Stage.ENTERED_WAITING.handleEvent(wi, "queue"); diff --git a/src/main/java/io/jenkins/plugins/cloudevents/model/JobModel.java b/src/main/java/io/jenkins/plugins/cloudevents/model/JobModel.java index 80be843..03fb46f 100644 --- a/src/main/java/io/jenkins/plugins/cloudevents/model/JobModel.java +++ b/src/main/java/io/jenkins/plugins/cloudevents/model/JobModel.java @@ -37,7 +37,6 @@ public class JobModel implements Model { @JsonIgnore private String stage; - public String getName() { return name; } @@ -87,19 +86,21 @@ public void setUserName(String userName) { } public Date getCreatedDate() { - return createdDate; + Date date = this.createdDate; + return date; } public void setCreatedDate(Date createdDate) { - this.createdDate = createdDate; + this.createdDate = (Date) createdDate.clone(); } public Date getUpdatedDate() { - return updatedDate; + Date date = this.updatedDate; + return date; } public void setUpdatedDate(Date updatedDate) { - this.updatedDate = updatedDate; + this.updatedDate = (Date) updatedDate.clone(); } public String getStatus() { diff --git a/src/main/java/io/jenkins/plugins/cloudevents/model/NodeModel.java b/src/main/java/io/jenkins/plugins/cloudevents/model/NodeModel.java index b08a29f..74a60fd 100644 --- a/src/main/java/io/jenkins/plugins/cloudevents/model/NodeModel.java +++ b/src/main/java/io/jenkins/plugins/cloudevents/model/NodeModel.java @@ -45,7 +45,12 @@ public String getNodeName() { } public void setNodeName(String nodeName) { - this.nodeName = nodeName; + try{ + this.nodeName = nodeName; + } catch (Exception exception) { + exception.printStackTrace(); + } + } public String getCachedHostName() { diff --git a/src/main/java/io/jenkins/plugins/cloudevents/model/QueueModel.java b/src/main/java/io/jenkins/plugins/cloudevents/model/QueueModel.java index 5e090b0..748a4c0 100644 --- a/src/main/java/io/jenkins/plugins/cloudevents/model/QueueModel.java +++ b/src/main/java/io/jenkins/plugins/cloudevents/model/QueueModel.java @@ -52,19 +52,25 @@ public void setCiUrl(String ciUrl) { } public Date getEntryTime() { - return entryTime; + return (Date) entryTime.clone(); } public void setEntryTime(Date entryTime) { - this.entryTime = entryTime; + this.entryTime = (Date) entryTime.clone(); } public Date getExitTime() { - return exitTime; + return (Date) exitTime.clone(); } + public void setExitTime(Date exitTime) { - this.exitTime = exitTime; + try { + this.exitTime = (Date) exitTime.clone(); + } catch (Exception exception) { + exception.printStackTrace(); + } + } public String getStartedBy() { diff --git a/src/main/java/io/jenkins/plugins/cloudevents/sinks/HTTPSink.java b/src/main/java/io/jenkins/plugins/cloudevents/sinks/HTTPSink.java index c198c62..d7bcd48 100644 --- a/src/main/java/io/jenkins/plugins/cloudevents/sinks/HTTPSink.java +++ b/src/main/java/io/jenkins/plugins/cloudevents/sinks/HTTPSink.java @@ -1,6 +1,8 @@ package io.jenkins.plugins.cloudevents.sinks; import io.cloudevents.CloudEvent; +import io.cloudevents.CloudEventData; +import io.cloudevents.SpecVersion; import io.cloudevents.core.message.MessageWriter; import io.cloudevents.core.v1.CloudEventBuilder; import io.jenkins.plugins.cloudevents.CloudEventsSink; @@ -14,6 +16,8 @@ import java.net.URI; import java.net.URL; import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import java.util.Set; import java.util.UUID; import java.util.logging.Level; import java.util.logging.Logger; @@ -52,7 +56,67 @@ public CloudEvent buildCloudEvent(Object data) throws NoSuchMethodException, Inv @Override public void sendCloudEvent(String sinkURL, Object data) throws IOException, NullPointerException { - CloudEvent cloudEventToPost = null; + CloudEvent cloudEventToPost = new CloudEvent() { + @Override + public CloudEventData getData() { + return null; + } + + @Override + public SpecVersion getSpecVersion() { + return null; + } + + @Override + public String getId() { + return null; + } + + @Override + public String getType() { + return null; + } + + @Override + public URI getSource() { + return null; + } + + @Override + public String getDataContentType() { + return null; + } + + @Override + public URI getDataSchema() { + return null; + } + + @Override + public String getSubject() { + return null; + } + + @Override + public OffsetDateTime getTime() { + return null; + } + + @Override + public Object getAttribute(String s) throws IllegalArgumentException { + return null; + } + + @Override + public Object getExtension(String s) { + return null; + } + + @Override + public Set getExtensionNames() { + return null; + } + }; try { cloudEventToPost = buildCloudEvent(data); diff --git a/src/test/java/io/jenkins/plugins/cloudevents/StageTest.java b/src/test/java/io/jenkins/plugins/cloudevents/StageTest.java index 86d02ea..0b0d485 100644 --- a/src/test/java/io/jenkins/plugins/cloudevents/StageTest.java +++ b/src/test/java/io/jenkins/plugins/cloudevents/StageTest.java @@ -2,10 +2,10 @@ import hudson.model.*; import hudson.slaves.OfflineCause; -import io.jenkins.plugins.cloudevents.listeners.ItemListener; -import io.jenkins.plugins.cloudevents.listeners.JobListener; -import io.jenkins.plugins.cloudevents.listeners.NodeListener; -import io.jenkins.plugins.cloudevents.listeners.QueueListener; +import io.jenkins.plugins.cloudevents.listeners.CE_ItemListener; +import io.jenkins.plugins.cloudevents.listeners.CE_JobListener; +import io.jenkins.plugins.cloudevents.listeners.CE_NodeListener; +import io.jenkins.plugins.cloudevents.listeners.CE_QueueListener; import io.jenkins.plugins.cloudevents.model.JobModel; import io.jenkins.plugins.cloudevents.model.NodeModel; import io.jenkins.plugins.cloudevents.model.QueueModel; @@ -164,7 +164,7 @@ public void testHandleBuildEvent() { TaskListener taskListener = mock(TaskListener.class); Job job = mock(Job.class); JobModel jobModel = mock(JobModel.class); - JobListener jobListener = mock(JobListener.class); + CE_JobListener jobListener = mock(CE_JobListener.class); Stage started = mock(Stage.STARTED.getClass()); Stage completed = mock(Stage.COMPLETED.getClass()); Stage finalized = mock(Stage.FINALIZED.getClass()); @@ -229,7 +229,7 @@ public void testHandleItemEvent() { Item item = mock(Item.class); - ItemListener itemListener = mock(ItemListener.class); + CE_ItemListener itemListener = mock(CE_ItemListener.class); // On Created Mockito.doAnswer(invocationOnMock -> { @@ -268,7 +268,7 @@ public void testHandleNodeEvent() { Computer computer = mock(Computer.class); TaskListener taskListener = mock(TaskListener.class); OfflineCause offlineCause = mock(OfflineCause.class); - NodeListener nodeListener = mock(NodeListener.class); + CE_NodeListener nodeListener = mock(CE_NodeListener.class); // Computer Online Mockito.doAnswer(invocationOnMock -> { @@ -308,7 +308,7 @@ public void testHandleQueueEvent() { QueueModel queueModel = mock(QueueModel.class); Queue.WaitingItem queueWaitingItem = mock(Queue.WaitingItem.class); Queue.LeftItem queueLeftItem = mock(Queue.LeftItem.class); - QueueListener queueListener = mock(QueueListener.class); + CE_QueueListener queueListener = mock(CE_QueueListener.class); // Queue Entered Waiting Mockito.doAnswer(invocationOnMock -> { From f8fa2b222c3d1a593af98e8690b216dc25edda96 Mon Sep 17 00:00:00 2001 From: Shruti Chaturvedi Date: Sat, 31 Jul 2021 10:31:22 +0530 Subject: [PATCH 04/36] Edit pom.xml --- pom.xml | 2 +- pom.xml.releaseBackup | 228 ------------------------------------------ release.properties | 23 ++--- 3 files changed, 9 insertions(+), 244 deletions(-) delete mode 100644 pom.xml.releaseBackup diff --git a/pom.xml b/pom.xml index 4dc4932..ea9e1ca 100644 --- a/pom.xml +++ b/pom.xml @@ -11,7 +11,7 @@ io.jenkins.plugins cloudevents - 1.0.0 + ${revision}${changelist} hpi diff --git a/pom.xml.releaseBackup b/pom.xml.releaseBackup deleted file mode 100644 index 9031b9f..0000000 --- a/pom.xml.releaseBackup +++ /dev/null @@ -1,228 +0,0 @@ - - - 4.0.0 - - - org.jenkins-ci.plugins - plugin - 4.16 - - - - io.jenkins.plugins - cloudevents - ${revision}${changelist} - hpi - - - 1.0.0 - -SNAPSHOT - 2.277.4 - 8 - jenkinsci/${project.artifactId}-plugin - - - CloudEvents Plugin - https://github.com/jenkinsci/${project.artifactId}-plugin - Emit and Consume CloudEvents in Jenkins. - - - - - io.jenkins.tools.bom - bom-2.277.x - 26 - import - pom - - - - org.jenkins-ci.plugins - jackson2-api - 2.11.3 - - - - - - - - MIT License - https://opensource.org/licenses/MIT - - - - - - ShrutiC-git - Shruti Chaturvedi - shrutichaturvedi16.sc@gmail.com - - - - - - - com.mashape.unirest - unirest-java - 1.4.9 - - - - - io.cloudevents - cloudevents-core - 2.0.0 - - - - io.cloudevents - cloudevents-http-basic - 2.0.0 - - - - io.cloudevents - cloudevents-api - 2.1.0 - - - - io.jenkins - configuration-as-code - 1.35 - true - - - - - - org.json - json - 20190722 - - - - org.junit.jupiter - junit-jupiter-engine - 5.2.0 - test - - - - - org.mockito - mockito-core - 3.7.7 - test - - - - org.mockito - mockito-inline - 2.13.0 - test - - - - - org.powermock - powermock-module-junit4 - 2.0.9 - test - - - - - - - io.jenkins.plugins - plugin-util-api - 2.0.0 - - - - - javax.servlet - javax.servlet-api - 4.0.1 - provided - - - - com.fasterxml.jackson.core - jackson-annotations - 2.12.0 - - - com.fasterxml.jackson.core - jackson-databind - 2.12.0 - - - io.jenkins.configuration-as-code - test-harness - 1.35 - test - - - - - - - - org.jacoco - jacoco-maven-plugin - 0.8.6 - - - default-prepare-agent - - prepare-agent - - - - report - prepare-package - - report - - - - - - - org.apache.maven.plugins - maven-surefire-plugin - 2.20 - - - - - - scm:git:git://github.com/${gitHubRepo}.git - scm:git:git@github.com:${gitHubRepo}.git - https://github.com/${gitHubRepo} - ${scmTag} - - - - - repo.jenkins-ci.org - https://repo.jenkins-ci.org/public/ - - - - - - repo.jenkins-ci.org - https://repo.jenkins-ci.org/public/ - - - diff --git a/release.properties b/release.properties index 06d7a2f..56da310 100644 --- a/release.properties +++ b/release.properties @@ -1,20 +1,13 @@ #release configuration -#Fri Jul 30 00:47:09 IST 2021 -scm.commentPrefix=[maven-release-plugin] -project.dev.io.jenkins.plugins\:cloudevents=1.0.1-SNAPSHOT -project.rel.io.jenkins.plugins\:cloudevents=1.0.0 -project.scm.io.jenkins.plugins\:cloudevents.developerConnection=scm\:git\:git@github.com\:${gitHubRepo}.git -project.scm.io.jenkins.plugins\:cloudevents.tag=${scmTag} +#Sat Jul 31 10:30:49 IST 2021 +scm.tagNameFormat=@{project.artifactId}-@{project.version} pushChanges=true -scm.tag=1.0.0 -remoteTagging=true -project.scm.io.jenkins.plugins\:cloudevents.connection=scm\:git\:git\://github.com/${gitHubRepo}.git -exec.additionalArguments=-P consume-incrementals,might-produce-incrementals -project.scm.io.jenkins.plugins\:cloudevents.url=https\://github.com/${gitHubRepo} -projectVersionPolicyId=default scm.url=scm\:git\:git@github.com\:jenkinsci/cloudevents-plugin.git -scm.tagNameFormat=@{project.artifactId}-@{project.version} preparationGoals=clean install -exec.snapshotReleasePluginAllowed=false -completedPhase=run-preparation-goals +remoteTagging=true +projectVersionPolicyId=default +scm.commentPrefix=[maven-release-plugin] completionGoals=incrementals\:reincrementalify +exec.snapshotReleasePluginAllowed=false +exec.additionalArguments=-P consume-incrementals,might-produce-incrementals +completedPhase=check-poms From 479a5f7475cf29be89dba9815fab3de9f0f39eaa Mon Sep 17 00:00:00 2001 From: Shruti Chaturvedi Date: Sat, 31 Jul 2021 10:33:53 +0530 Subject: [PATCH 05/36] [maven-release-plugin] prepare release 1.0.0 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index ea9e1ca..4dc4932 100644 --- a/pom.xml +++ b/pom.xml @@ -11,7 +11,7 @@ io.jenkins.plugins cloudevents - ${revision}${changelist} + 1.0.0 hpi From b1160ef9b5691c74dd135f6b53533f02a6f50787 Mon Sep 17 00:00:00 2001 From: Shruti Chaturvedi Date: Sat, 31 Jul 2021 10:56:58 +0530 Subject: [PATCH 06/36] Edit pom.xml --- pom.xml | 2 +- release.properties | 13 ------------- 2 files changed, 1 insertion(+), 14 deletions(-) delete mode 100644 release.properties diff --git a/pom.xml b/pom.xml index 4dc4932..ea9e1ca 100644 --- a/pom.xml +++ b/pom.xml @@ -11,7 +11,7 @@ io.jenkins.plugins cloudevents - 1.0.0 + ${revision}${changelist} hpi diff --git a/release.properties b/release.properties deleted file mode 100644 index 56da310..0000000 --- a/release.properties +++ /dev/null @@ -1,13 +0,0 @@ -#release configuration -#Sat Jul 31 10:30:49 IST 2021 -scm.tagNameFormat=@{project.artifactId}-@{project.version} -pushChanges=true -scm.url=scm\:git\:git@github.com\:jenkinsci/cloudevents-plugin.git -preparationGoals=clean install -remoteTagging=true -projectVersionPolicyId=default -scm.commentPrefix=[maven-release-plugin] -completionGoals=incrementals\:reincrementalify -exec.snapshotReleasePluginAllowed=false -exec.additionalArguments=-P consume-incrementals,might-produce-incrementals -completedPhase=check-poms From 96c4d48d2ea1af78f8767f926172c928c4b9ba02 Mon Sep 17 00:00:00 2001 From: Shruti Chaturvedi Date: Sat, 31 Jul 2021 10:59:53 +0530 Subject: [PATCH 07/36] [maven-release-plugin] prepare release cloudevents-1.0.0 --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index ea9e1ca..9a76248 100644 --- a/pom.xml +++ b/pom.xml @@ -11,7 +11,7 @@ io.jenkins.plugins cloudevents - ${revision}${changelist} + 1.0.0 hpi @@ -214,7 +214,7 @@ scm:git:git://github.com/${gitHubRepo}.git scm:git:git@github.com:${gitHubRepo}.git https://github.com/${gitHubRepo} - 1.0.0 + cloudevents-1.0.0 From 90a942c543369c69960d2d3385c86cc8e85b2112 Mon Sep 17 00:00:00 2001 From: Shruti Chaturvedi Date: Sat, 31 Jul 2021 11:36:12 +0530 Subject: [PATCH 08/36] Edit pom.xml --- pom.xml | 9 +++++---- release.properties | 13 +++++++++++++ 2 files changed, 18 insertions(+), 4 deletions(-) create mode 100644 release.properties diff --git a/pom.xml b/pom.xml index 9a76248..a84e401 100644 --- a/pom.xml +++ b/pom.xml @@ -1,17 +1,18 @@ - + 4.0.0 org.jenkins-ci.plugins plugin 4.16 - + io.jenkins.plugins cloudevents - 1.0.0 + ${revision}${changelist} hpi @@ -110,7 +111,7 @@ - + org.mockito mockito-core 3.7.7 diff --git a/release.properties b/release.properties new file mode 100644 index 0000000..faf9641 --- /dev/null +++ b/release.properties @@ -0,0 +1,13 @@ +#release configuration +#Sat Jul 31 11:36:00 IST 2021 +scm.tagNameFormat=@{project.artifactId}-@{project.version} +pushChanges=true +scm.url=scm\:git\:git@github.com\:jenkinsci/cloudevents-plugin.git +preparationGoals=clean install +remoteTagging=true +projectVersionPolicyId=default +scm.commentPrefix=[maven-release-plugin] +completionGoals=incrementals\:reincrementalify +exec.snapshotReleasePluginAllowed=false +exec.additionalArguments=-P consume-incrementals,might-produce-incrementals +completedPhase=check-poms From ec13a41a697bade76e8917da5f9bff98df60560d Mon Sep 17 00:00:00 2001 From: Shruti Chaturvedi Date: Sat, 31 Jul 2021 11:38:30 +0530 Subject: [PATCH 09/36] [maven-release-plugin] prepare release cloudevents-1.0.0 --- pom.xml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/pom.xml b/pom.xml index a84e401..63c904c 100644 --- a/pom.xml +++ b/pom.xml @@ -1,18 +1,17 @@ - + 4.0.0 org.jenkins-ci.plugins plugin 4.16 - + io.jenkins.plugins cloudevents - ${revision}${changelist} + 1.0.0 hpi From 10a78c13756e9cfa2d48bc97de5ae5e4a2d65a8a Mon Sep 17 00:00:00 2001 From: Shruti Chaturvedi Date: Sat, 31 Jul 2021 11:39:37 +0530 Subject: [PATCH 10/36] [maven-release-plugin] prepare for next development iteration --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 63c904c..524cb05 100644 --- a/pom.xml +++ b/pom.xml @@ -11,11 +11,11 @@ io.jenkins.plugins cloudevents - 1.0.0 + ${revision}${changelist} hpi - 1.0.0 + 1.0.1 -SNAPSHOT 2.277.4 8 From ebcdf7027f1fcf53f0fcf748c4d2c6499bcb2023 Mon Sep 17 00:00:00 2001 From: Shruti Chaturvedi Date: Tue, 10 Aug 2021 19:25:19 +0530 Subject: [PATCH 11/36] Edit README.md --- README.md | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 8ef6d19..23686b5 100644 --- a/README.md +++ b/README.md @@ -409,16 +409,12 @@ Node Events Issues ========== -TODO Decide where you're going to host your issues, the default is Jenkins JIRA, but you can also enable GitHub issues, -If you use GitHub issues there's no need for this section; else add the following line: - -Report issues and enhancements in the [Jenkins issue tracker](https://issues.jenkins-ci.org/). +If you are facing any issues with the plugin, please feel free to open a new issue inside the [Issues](https://github.com/jenkinsci/cloudevents-plugin/issues) tab under +this repository. We love feedback, and if you would like to share any feedback you have with us, you can submit your feedback using the same procedure. ------------- Contributing ========== -TODO review the default [CONTRIBUTING](https://github.com/jenkinsci/.github/blob/master/CONTRIBUTING.md) file and make sure it is appropriate for your plugin, if not then add your own one adapted from the base file - -Refer to our [contribution guidelines](https://github.com/jenkinsci/.github/blob/master/CONTRIBUTING.md) +If we would like to contribute to this plugin, refer to our [contribution guidelines](https://github.com/jenkinsci/.github/blob/master/CONTRIBUTING.md) From 19bde94d9ef2b6ca26af97582ddbf4f83447e101 Mon Sep 17 00:00:00 2001 From: Shruti Chaturvedi Date: Wed, 11 Aug 2021 19:28:33 +0530 Subject: [PATCH 12/36] [maven-release-plugin] prepare release cloudevents-1.0.0 --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 524cb05..63c904c 100644 --- a/pom.xml +++ b/pom.xml @@ -11,11 +11,11 @@ io.jenkins.plugins cloudevents - ${revision}${changelist} + 1.0.0 hpi - 1.0.1 + 1.0.0 -SNAPSHOT 2.277.4 8 From 6e1deb393289af29592ffb8392a29074df41ac32 Mon Sep 17 00:00:00 2001 From: Shruti Chaturvedi Date: Wed, 11 Aug 2021 19:35:45 +0530 Subject: [PATCH 13/36] edit pom.xml --- pom.xml | 2 +- release.properties | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 63c904c..8218068 100644 --- a/pom.xml +++ b/pom.xml @@ -11,7 +11,7 @@ io.jenkins.plugins cloudevents - 1.0.0 + ${revision}${changelist} hpi diff --git a/release.properties b/release.properties index faf9641..40152c7 100644 --- a/release.properties +++ b/release.properties @@ -1,5 +1,5 @@ #release configuration -#Sat Jul 31 11:36:00 IST 2021 +#Wed Aug 11 19:34:54 IST 2021 scm.tagNameFormat=@{project.artifactId}-@{project.version} pushChanges=true scm.url=scm\:git\:git@github.com\:jenkinsci/cloudevents-plugin.git From 828e5e058a9caf8fddc0a81feb8325682b37bbb5 Mon Sep 17 00:00:00 2001 From: Shruti Chaturvedi Date: Wed, 11 Aug 2021 19:38:12 +0530 Subject: [PATCH 14/36] [maven-release-plugin] prepare release cloudevents-1.0.0 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 8218068..63c904c 100644 --- a/pom.xml +++ b/pom.xml @@ -11,7 +11,7 @@ io.jenkins.plugins cloudevents - ${revision}${changelist} + 1.0.0 hpi From 9dab02c637ecc73eb2fbf697cc2d36e09b5aa574 Mon Sep 17 00:00:00 2001 From: Shruti Chaturvedi Date: Wed, 11 Aug 2021 19:41:27 +0530 Subject: [PATCH 15/36] edit pom.xml --- pom.xml | 2 +- release.properties | 13 ------------- 2 files changed, 1 insertion(+), 14 deletions(-) delete mode 100644 release.properties diff --git a/pom.xml b/pom.xml index 63c904c..8218068 100644 --- a/pom.xml +++ b/pom.xml @@ -11,7 +11,7 @@ io.jenkins.plugins cloudevents - 1.0.0 + ${revision}${changelist} hpi diff --git a/release.properties b/release.properties deleted file mode 100644 index 40152c7..0000000 --- a/release.properties +++ /dev/null @@ -1,13 +0,0 @@ -#release configuration -#Wed Aug 11 19:34:54 IST 2021 -scm.tagNameFormat=@{project.artifactId}-@{project.version} -pushChanges=true -scm.url=scm\:git\:git@github.com\:jenkinsci/cloudevents-plugin.git -preparationGoals=clean install -remoteTagging=true -projectVersionPolicyId=default -scm.commentPrefix=[maven-release-plugin] -completionGoals=incrementals\:reincrementalify -exec.snapshotReleasePluginAllowed=false -exec.additionalArguments=-P consume-incrementals,might-produce-incrementals -completedPhase=check-poms From 1ee064d43cdb7db86ea4596e89d8b819823cc120 Mon Sep 17 00:00:00 2001 From: Shruti Chaturvedi Date: Wed, 11 Aug 2021 19:44:50 +0530 Subject: [PATCH 16/36] [maven-release-plugin] prepare release cloudevents-1.0.0 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 8218068..63c904c 100644 --- a/pom.xml +++ b/pom.xml @@ -11,7 +11,7 @@ io.jenkins.plugins cloudevents - ${revision}${changelist} + 1.0.0 hpi From 37e264d218eadde61c9ac367c6ddfc6c3ab59673 Mon Sep 17 00:00:00 2001 From: Shruti Chaturvedi Date: Wed, 11 Aug 2021 19:46:28 +0530 Subject: [PATCH 17/36] edit pom.xml --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 63c904c..8218068 100644 --- a/pom.xml +++ b/pom.xml @@ -11,7 +11,7 @@ io.jenkins.plugins cloudevents - 1.0.0 + ${revision}${changelist} hpi From f4469873ca891bfd4afa1e3d96860dfbab10d3e5 Mon Sep 17 00:00:00 2001 From: Shruti Chaturvedi Date: Wed, 11 Aug 2021 19:49:47 +0530 Subject: [PATCH 18/36] [maven-release-plugin] prepare release cloudevents-1.0.0 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 8218068..63c904c 100644 --- a/pom.xml +++ b/pom.xml @@ -11,7 +11,7 @@ io.jenkins.plugins cloudevents - ${revision}${changelist} + 1.0.0 hpi From c58ab861101ee13c2aea3f7744e96819221d2f1c Mon Sep 17 00:00:00 2001 From: Shruti Chaturvedi Date: Wed, 11 Aug 2021 20:01:46 +0530 Subject: [PATCH 19/36] edit pom.xml --- pom.xml | 2 +- pom.xml.releaseBackup | 233 ++++++++++++++++++++++++++++++++ release.properties | 13 ++ release.properties~Edit pom.xml | 13 ++ 4 files changed, 260 insertions(+), 1 deletion(-) create mode 100644 pom.xml.releaseBackup create mode 100644 release.properties create mode 100644 release.properties~Edit pom.xml diff --git a/pom.xml b/pom.xml index 63c904c..8218068 100644 --- a/pom.xml +++ b/pom.xml @@ -11,7 +11,7 @@ io.jenkins.plugins cloudevents - 1.0.0 + ${revision}${changelist} hpi diff --git a/pom.xml.releaseBackup b/pom.xml.releaseBackup new file mode 100644 index 0000000..8218068 --- /dev/null +++ b/pom.xml.releaseBackup @@ -0,0 +1,233 @@ + + + 4.0.0 + + + org.jenkins-ci.plugins + plugin + 4.16 + + + + io.jenkins.plugins + cloudevents + ${revision}${changelist} + hpi + + + 1.0.0 + -SNAPSHOT + 2.277.4 + 8 + jenkinsci/${project.artifactId}-plugin + + + CloudEvents Plugin + https://github.com/jenkinsci/${project.artifactId}-plugin + Emit and Consume CloudEvents in Jenkins. + + + + + io.jenkins.tools.bom + bom-2.277.x + 26 + import + pom + + + + org.jenkins-ci.plugins + jackson2-api + 2.11.3 + + + + + + + + MIT License + https://opensource.org/licenses/MIT + + + + + + ShrutiC-git + Shruti Chaturvedi + shrutichaturvedi16.sc@gmail.com + + + + + + + com.mashape.unirest + unirest-java + 1.4.9 + + + + + io.cloudevents + cloudevents-core + 2.0.0 + + + + io.cloudevents + cloudevents-http-basic + 2.0.0 + + + + io.cloudevents + cloudevents-api + 2.1.0 + + + + io.jenkins + configuration-as-code + 1.35 + true + + + + + + org.json + json + 20190722 + + + + org.junit.jupiter + junit-jupiter-engine + 5.2.0 + test + + + + + org.mockito + mockito-core + 3.7.7 + test + + + + org.mockito + mockito-inline + 2.13.0 + test + + + + + org.powermock + powermock-module-junit4 + 2.0.9 + test + + + + + + + io.jenkins.plugins + plugin-util-api + 2.0.0 + + + + + javax.servlet + javax.servlet-api + 4.0.1 + provided + + + + com.fasterxml.jackson.core + jackson-annotations + 2.12.0 + + + com.fasterxml.jackson.core + jackson-databind + 2.12.0 + + + io.jenkins.configuration-as-code + test-harness + 1.35 + test + + + org.jetbrains + annotations + RELEASE + compile + + + + + + + + org.jacoco + jacoco-maven-plugin + 0.8.6 + + + default-prepare-agent + + prepare-agent + + + + report + prepare-package + + report + + + + + + + org.apache.maven.plugins + maven-surefire-plugin + 2.20 + + + + + + scm:git:git://github.com/${gitHubRepo}.git + scm:git:git@github.com:${gitHubRepo}.git + https://github.com/${gitHubRepo} + cloudevents-1.0.0 + + + + + repo.jenkins-ci.org + https://repo.jenkins-ci.org/public/ + + + + + + repo.jenkins-ci.org + https://repo.jenkins-ci.org/public/ + + + diff --git a/release.properties b/release.properties new file mode 100644 index 0000000..7ae617d --- /dev/null +++ b/release.properties @@ -0,0 +1,13 @@ +#release configuration +#Wed Aug 11 20:00:59 IST 2021 +scm.tagNameFormat=@{project.artifactId}-@{project.version} +pushChanges=true +scm.url=scm\:git\:git@github.com\:jenkinsci/cloudevents-plugin.git +preparationGoals=clean install +remoteTagging=true +projectVersionPolicyId=default +scm.commentPrefix=[maven-release-plugin] +completionGoals=incrementals\:reincrementalify +exec.snapshotReleasePluginAllowed=false +exec.additionalArguments=-P consume-incrementals,might-produce-incrementals +completedPhase=check-poms diff --git a/release.properties~Edit pom.xml b/release.properties~Edit pom.xml new file mode 100644 index 0000000..56da310 --- /dev/null +++ b/release.properties~Edit pom.xml @@ -0,0 +1,13 @@ +#release configuration +#Sat Jul 31 10:30:49 IST 2021 +scm.tagNameFormat=@{project.artifactId}-@{project.version} +pushChanges=true +scm.url=scm\:git\:git@github.com\:jenkinsci/cloudevents-plugin.git +preparationGoals=clean install +remoteTagging=true +projectVersionPolicyId=default +scm.commentPrefix=[maven-release-plugin] +completionGoals=incrementals\:reincrementalify +exec.snapshotReleasePluginAllowed=false +exec.additionalArguments=-P consume-incrementals,might-produce-incrementals +completedPhase=check-poms From 80420cb923a5cda926b6a5e56c18a08131794d79 Mon Sep 17 00:00:00 2001 From: Shruti Chaturvedi Date: Wed, 11 Aug 2021 20:08:12 +0530 Subject: [PATCH 20/36] [maven-release-plugin] prepare release cloudevents-1.0.0 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 8218068..63c904c 100644 --- a/pom.xml +++ b/pom.xml @@ -11,7 +11,7 @@ io.jenkins.plugins cloudevents - ${revision}${changelist} + 1.0.0 hpi From c2e41eb92fb0186f5f7d73f9531a72625c31c200 Mon Sep 17 00:00:00 2001 From: Shruti Chaturvedi Date: Wed, 11 Aug 2021 20:10:03 +0530 Subject: [PATCH 21/36] edit pom.xml --- pom.xml | 2 +- pom.xml.releaseBackup | 233 -------------------------------- release.properties | 13 -- release.properties~Edit pom.xml | 13 -- 4 files changed, 1 insertion(+), 260 deletions(-) delete mode 100644 pom.xml.releaseBackup delete mode 100644 release.properties delete mode 100644 release.properties~Edit pom.xml diff --git a/pom.xml b/pom.xml index 63c904c..8218068 100644 --- a/pom.xml +++ b/pom.xml @@ -11,7 +11,7 @@ io.jenkins.plugins cloudevents - 1.0.0 + ${revision}${changelist} hpi diff --git a/pom.xml.releaseBackup b/pom.xml.releaseBackup deleted file mode 100644 index 8218068..0000000 --- a/pom.xml.releaseBackup +++ /dev/null @@ -1,233 +0,0 @@ - - - 4.0.0 - - - org.jenkins-ci.plugins - plugin - 4.16 - - - - io.jenkins.plugins - cloudevents - ${revision}${changelist} - hpi - - - 1.0.0 - -SNAPSHOT - 2.277.4 - 8 - jenkinsci/${project.artifactId}-plugin - - - CloudEvents Plugin - https://github.com/jenkinsci/${project.artifactId}-plugin - Emit and Consume CloudEvents in Jenkins. - - - - - io.jenkins.tools.bom - bom-2.277.x - 26 - import - pom - - - - org.jenkins-ci.plugins - jackson2-api - 2.11.3 - - - - - - - - MIT License - https://opensource.org/licenses/MIT - - - - - - ShrutiC-git - Shruti Chaturvedi - shrutichaturvedi16.sc@gmail.com - - - - - - - com.mashape.unirest - unirest-java - 1.4.9 - - - - - io.cloudevents - cloudevents-core - 2.0.0 - - - - io.cloudevents - cloudevents-http-basic - 2.0.0 - - - - io.cloudevents - cloudevents-api - 2.1.0 - - - - io.jenkins - configuration-as-code - 1.35 - true - - - - - - org.json - json - 20190722 - - - - org.junit.jupiter - junit-jupiter-engine - 5.2.0 - test - - - - - org.mockito - mockito-core - 3.7.7 - test - - - - org.mockito - mockito-inline - 2.13.0 - test - - - - - org.powermock - powermock-module-junit4 - 2.0.9 - test - - - - - - - io.jenkins.plugins - plugin-util-api - 2.0.0 - - - - - javax.servlet - javax.servlet-api - 4.0.1 - provided - - - - com.fasterxml.jackson.core - jackson-annotations - 2.12.0 - - - com.fasterxml.jackson.core - jackson-databind - 2.12.0 - - - io.jenkins.configuration-as-code - test-harness - 1.35 - test - - - org.jetbrains - annotations - RELEASE - compile - - - - - - - - org.jacoco - jacoco-maven-plugin - 0.8.6 - - - default-prepare-agent - - prepare-agent - - - - report - prepare-package - - report - - - - - - - org.apache.maven.plugins - maven-surefire-plugin - 2.20 - - - - - - scm:git:git://github.com/${gitHubRepo}.git - scm:git:git@github.com:${gitHubRepo}.git - https://github.com/${gitHubRepo} - cloudevents-1.0.0 - - - - - repo.jenkins-ci.org - https://repo.jenkins-ci.org/public/ - - - - - - repo.jenkins-ci.org - https://repo.jenkins-ci.org/public/ - - - diff --git a/release.properties b/release.properties deleted file mode 100644 index 7ae617d..0000000 --- a/release.properties +++ /dev/null @@ -1,13 +0,0 @@ -#release configuration -#Wed Aug 11 20:00:59 IST 2021 -scm.tagNameFormat=@{project.artifactId}-@{project.version} -pushChanges=true -scm.url=scm\:git\:git@github.com\:jenkinsci/cloudevents-plugin.git -preparationGoals=clean install -remoteTagging=true -projectVersionPolicyId=default -scm.commentPrefix=[maven-release-plugin] -completionGoals=incrementals\:reincrementalify -exec.snapshotReleasePluginAllowed=false -exec.additionalArguments=-P consume-incrementals,might-produce-incrementals -completedPhase=check-poms diff --git a/release.properties~Edit pom.xml b/release.properties~Edit pom.xml deleted file mode 100644 index 56da310..0000000 --- a/release.properties~Edit pom.xml +++ /dev/null @@ -1,13 +0,0 @@ -#release configuration -#Sat Jul 31 10:30:49 IST 2021 -scm.tagNameFormat=@{project.artifactId}-@{project.version} -pushChanges=true -scm.url=scm\:git\:git@github.com\:jenkinsci/cloudevents-plugin.git -preparationGoals=clean install -remoteTagging=true -projectVersionPolicyId=default -scm.commentPrefix=[maven-release-plugin] -completionGoals=incrementals\:reincrementalify -exec.snapshotReleasePluginAllowed=false -exec.additionalArguments=-P consume-incrementals,might-produce-incrementals -completedPhase=check-poms From a53b09e2a97c80cc1dd417de0b2fde04f20da01c Mon Sep 17 00:00:00 2001 From: Shruti Chaturvedi Date: Wed, 11 Aug 2021 20:12:02 +0530 Subject: [PATCH 22/36] [maven-release-plugin] prepare release cloudevents-1.0.0 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 8218068..63c904c 100644 --- a/pom.xml +++ b/pom.xml @@ -11,7 +11,7 @@ io.jenkins.plugins cloudevents - ${revision}${changelist} + 1.0.0 hpi From e2192d7f61755c3c952af2252f8d698ff0405a10 Mon Sep 17 00:00:00 2001 From: Shruti Chaturvedi Date: Wed, 11 Aug 2021 20:15:05 +0530 Subject: [PATCH 23/36] edit pom.xml --- pom.xml | 2 +- release.properties | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 release.properties diff --git a/pom.xml b/pom.xml index 63c904c..8218068 100644 --- a/pom.xml +++ b/pom.xml @@ -11,7 +11,7 @@ io.jenkins.plugins cloudevents - 1.0.0 + ${revision}${changelist} hpi diff --git a/release.properties b/release.properties new file mode 100644 index 0000000..ad3f96d --- /dev/null +++ b/release.properties @@ -0,0 +1,13 @@ +#release configuration +#Wed Aug 11 20:14:55 IST 2021 +scm.tagNameFormat=@{project.artifactId}-@{project.version} +pushChanges=true +scm.url=scm\:git\:git@github.com\:jenkinsci/cloudevents-plugin.git +preparationGoals=clean install +remoteTagging=true +projectVersionPolicyId=default +scm.commentPrefix=[maven-release-plugin] +completionGoals=incrementals\:reincrementalify +exec.snapshotReleasePluginAllowed=false +exec.additionalArguments=-P consume-incrementals,might-produce-incrementals +completedPhase=check-poms From b0e7a38c6d010bc46dfca154c9ce02b6c2b6ac0a Mon Sep 17 00:00:00 2001 From: Shruti Chaturvedi Date: Wed, 11 Aug 2021 20:25:18 +0530 Subject: [PATCH 24/36] edit pom.xml --- pom.xml.releaseBackup | 233 ++++++++++++++++++++++++++++++++++++++++++ release.properties | 23 +++-- 2 files changed, 248 insertions(+), 8 deletions(-) create mode 100644 pom.xml.releaseBackup diff --git a/pom.xml.releaseBackup b/pom.xml.releaseBackup new file mode 100644 index 0000000..8218068 --- /dev/null +++ b/pom.xml.releaseBackup @@ -0,0 +1,233 @@ + + + 4.0.0 + + + org.jenkins-ci.plugins + plugin + 4.16 + + + + io.jenkins.plugins + cloudevents + ${revision}${changelist} + hpi + + + 1.0.0 + -SNAPSHOT + 2.277.4 + 8 + jenkinsci/${project.artifactId}-plugin + + + CloudEvents Plugin + https://github.com/jenkinsci/${project.artifactId}-plugin + Emit and Consume CloudEvents in Jenkins. + + + + + io.jenkins.tools.bom + bom-2.277.x + 26 + import + pom + + + + org.jenkins-ci.plugins + jackson2-api + 2.11.3 + + + + + + + + MIT License + https://opensource.org/licenses/MIT + + + + + + ShrutiC-git + Shruti Chaturvedi + shrutichaturvedi16.sc@gmail.com + + + + + + + com.mashape.unirest + unirest-java + 1.4.9 + + + + + io.cloudevents + cloudevents-core + 2.0.0 + + + + io.cloudevents + cloudevents-http-basic + 2.0.0 + + + + io.cloudevents + cloudevents-api + 2.1.0 + + + + io.jenkins + configuration-as-code + 1.35 + true + + + + + + org.json + json + 20190722 + + + + org.junit.jupiter + junit-jupiter-engine + 5.2.0 + test + + + + + org.mockito + mockito-core + 3.7.7 + test + + + + org.mockito + mockito-inline + 2.13.0 + test + + + + + org.powermock + powermock-module-junit4 + 2.0.9 + test + + + + + + + io.jenkins.plugins + plugin-util-api + 2.0.0 + + + + + javax.servlet + javax.servlet-api + 4.0.1 + provided + + + + com.fasterxml.jackson.core + jackson-annotations + 2.12.0 + + + com.fasterxml.jackson.core + jackson-databind + 2.12.0 + + + io.jenkins.configuration-as-code + test-harness + 1.35 + test + + + org.jetbrains + annotations + RELEASE + compile + + + + + + + + org.jacoco + jacoco-maven-plugin + 0.8.6 + + + default-prepare-agent + + prepare-agent + + + + report + prepare-package + + report + + + + + + + org.apache.maven.plugins + maven-surefire-plugin + 2.20 + + + + + + scm:git:git://github.com/${gitHubRepo}.git + scm:git:git@github.com:${gitHubRepo}.git + https://github.com/${gitHubRepo} + cloudevents-1.0.0 + + + + + repo.jenkins-ci.org + https://repo.jenkins-ci.org/public/ + + + + + + repo.jenkins-ci.org + https://repo.jenkins-ci.org/public/ + + + diff --git a/release.properties b/release.properties index ad3f96d..485c189 100644 --- a/release.properties +++ b/release.properties @@ -1,13 +1,20 @@ #release configuration -#Wed Aug 11 20:14:55 IST 2021 -scm.tagNameFormat=@{project.artifactId}-@{project.version} +#Wed Aug 11 20:15:35 IST 2021 +scm.commentPrefix=[maven-release-plugin] +project.dev.io.jenkins.plugins\:cloudevents=1.0.1-SNAPSHOT +project.rel.io.jenkins.plugins\:cloudevents=1.0.0 +project.scm.io.jenkins.plugins\:cloudevents.developerConnection=scm\:git\:git@github.com\:${gitHubRepo}.git +project.scm.io.jenkins.plugins\:cloudevents.tag=cloudevents-1.0.0 pushChanges=true -scm.url=scm\:git\:git@github.com\:jenkinsci/cloudevents-plugin.git -preparationGoals=clean install +scm.tag=cloudevents-1.0.0 remoteTagging=true +project.scm.io.jenkins.plugins\:cloudevents.connection=scm\:git\:git\://github.com/${gitHubRepo}.git +exec.additionalArguments=-P consume-incrementals,might-produce-incrementals +project.scm.io.jenkins.plugins\:cloudevents.url=https\://github.com/${gitHubRepo} projectVersionPolicyId=default -scm.commentPrefix=[maven-release-plugin] -completionGoals=incrementals\:reincrementalify +scm.url=scm\:git\:git@github.com\:jenkinsci/cloudevents-plugin.git +scm.tagNameFormat=@{project.artifactId}-@{project.version} +preparationGoals=clean install exec.snapshotReleasePluginAllowed=false -exec.additionalArguments=-P consume-incrementals,might-produce-incrementals -completedPhase=check-poms +completedPhase=generate-release-poms +completionGoals=incrementals\:reincrementalify From 5e1cf672836a9ff892db85d04e24bb5dd13bc4df Mon Sep 17 00:00:00 2001 From: Shruti Chaturvedi Date: Wed, 11 Aug 2021 20:27:33 +0530 Subject: [PATCH 25/36] [maven-release-plugin] prepare release cloudevents-1.0.0 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 8218068..63c904c 100644 --- a/pom.xml +++ b/pom.xml @@ -11,7 +11,7 @@ io.jenkins.plugins cloudevents - ${revision}${changelist} + 1.0.0 hpi From c67e30694c8959b9f943f7a37bb59b3c01bd9b7b Mon Sep 17 00:00:00 2001 From: Shruti Chaturvedi Date: Wed, 11 Aug 2021 20:27:46 +0530 Subject: [PATCH 26/36] [maven-release-plugin] prepare for next development iteration --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 63c904c..524cb05 100644 --- a/pom.xml +++ b/pom.xml @@ -11,11 +11,11 @@ io.jenkins.plugins cloudevents - 1.0.0 + ${revision}${changelist} hpi - 1.0.0 + 1.0.1 -SNAPSHOT 2.277.4 8 From 22f2fb98c07c85040fe28347ecd5cc25c37bc0ef Mon Sep 17 00:00:00 2001 From: Shruti Chaturvedi Date: Wed, 11 Aug 2021 20:46:48 +0530 Subject: [PATCH 27/36] edit pom.xml --- pom.xml | 2 +- pom.xml.releaseBackup | 2 +- release.properties | 23 ++++++++--------------- 3 files changed, 10 insertions(+), 17 deletions(-) diff --git a/pom.xml b/pom.xml index 524cb05..8218068 100644 --- a/pom.xml +++ b/pom.xml @@ -15,7 +15,7 @@ hpi - 1.0.1 + 1.0.0 -SNAPSHOT 2.277.4 8 diff --git a/pom.xml.releaseBackup b/pom.xml.releaseBackup index 8218068..524cb05 100644 --- a/pom.xml.releaseBackup +++ b/pom.xml.releaseBackup @@ -15,7 +15,7 @@ hpi - 1.0.0 + 1.0.1 -SNAPSHOT 2.277.4 8 diff --git a/release.properties b/release.properties index 485c189..9854ede 100644 --- a/release.properties +++ b/release.properties @@ -1,20 +1,13 @@ #release configuration -#Wed Aug 11 20:15:35 IST 2021 -scm.commentPrefix=[maven-release-plugin] -project.dev.io.jenkins.plugins\:cloudevents=1.0.1-SNAPSHOT -project.rel.io.jenkins.plugins\:cloudevents=1.0.0 -project.scm.io.jenkins.plugins\:cloudevents.developerConnection=scm\:git\:git@github.com\:${gitHubRepo}.git -project.scm.io.jenkins.plugins\:cloudevents.tag=cloudevents-1.0.0 +#Wed Aug 11 20:45:54 IST 2021 +scm.tagNameFormat=@{project.artifactId}-@{project.version} pushChanges=true -scm.tag=cloudevents-1.0.0 -remoteTagging=true -project.scm.io.jenkins.plugins\:cloudevents.connection=scm\:git\:git\://github.com/${gitHubRepo}.git -exec.additionalArguments=-P consume-incrementals,might-produce-incrementals -project.scm.io.jenkins.plugins\:cloudevents.url=https\://github.com/${gitHubRepo} -projectVersionPolicyId=default scm.url=scm\:git\:git@github.com\:jenkinsci/cloudevents-plugin.git -scm.tagNameFormat=@{project.artifactId}-@{project.version} preparationGoals=clean install -exec.snapshotReleasePluginAllowed=false -completedPhase=generate-release-poms +remoteTagging=true +projectVersionPolicyId=default +scm.commentPrefix=[maven-release-plugin] completionGoals=incrementals\:reincrementalify +exec.snapshotReleasePluginAllowed=false +exec.additionalArguments=-P consume-incrementals,might-produce-incrementals +completedPhase=create-backup-poms From 37680c7ed573ab5aceea6b3dcbde86d8086972f5 Mon Sep 17 00:00:00 2001 From: Shruti Chaturvedi Date: Wed, 11 Aug 2021 20:49:49 +0530 Subject: [PATCH 28/36] [maven-release-plugin] prepare release cloudevents-1.0.0 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 8218068..63c904c 100644 --- a/pom.xml +++ b/pom.xml @@ -11,7 +11,7 @@ io.jenkins.plugins cloudevents - ${revision}${changelist} + 1.0.0 hpi From 5e1849a7ade57111aad5154a9db1f5655c22f776 Mon Sep 17 00:00:00 2001 From: Shruti Chaturvedi Date: Wed, 11 Aug 2021 20:51:48 +0530 Subject: [PATCH 29/36] edit pom.xml --- pom.xml | 2 +- pom.xml.releaseBackup | 233 ------------------------------------------ release.properties | 13 --- 3 files changed, 1 insertion(+), 247 deletions(-) delete mode 100644 pom.xml.releaseBackup delete mode 100644 release.properties diff --git a/pom.xml b/pom.xml index 63c904c..8218068 100644 --- a/pom.xml +++ b/pom.xml @@ -11,7 +11,7 @@ io.jenkins.plugins cloudevents - 1.0.0 + ${revision}${changelist} hpi diff --git a/pom.xml.releaseBackup b/pom.xml.releaseBackup deleted file mode 100644 index 524cb05..0000000 --- a/pom.xml.releaseBackup +++ /dev/null @@ -1,233 +0,0 @@ - - - 4.0.0 - - - org.jenkins-ci.plugins - plugin - 4.16 - - - - io.jenkins.plugins - cloudevents - ${revision}${changelist} - hpi - - - 1.0.1 - -SNAPSHOT - 2.277.4 - 8 - jenkinsci/${project.artifactId}-plugin - - - CloudEvents Plugin - https://github.com/jenkinsci/${project.artifactId}-plugin - Emit and Consume CloudEvents in Jenkins. - - - - - io.jenkins.tools.bom - bom-2.277.x - 26 - import - pom - - - - org.jenkins-ci.plugins - jackson2-api - 2.11.3 - - - - - - - - MIT License - https://opensource.org/licenses/MIT - - - - - - ShrutiC-git - Shruti Chaturvedi - shrutichaturvedi16.sc@gmail.com - - - - - - - com.mashape.unirest - unirest-java - 1.4.9 - - - - - io.cloudevents - cloudevents-core - 2.0.0 - - - - io.cloudevents - cloudevents-http-basic - 2.0.0 - - - - io.cloudevents - cloudevents-api - 2.1.0 - - - - io.jenkins - configuration-as-code - 1.35 - true - - - - - - org.json - json - 20190722 - - - - org.junit.jupiter - junit-jupiter-engine - 5.2.0 - test - - - - - org.mockito - mockito-core - 3.7.7 - test - - - - org.mockito - mockito-inline - 2.13.0 - test - - - - - org.powermock - powermock-module-junit4 - 2.0.9 - test - - - - - - - io.jenkins.plugins - plugin-util-api - 2.0.0 - - - - - javax.servlet - javax.servlet-api - 4.0.1 - provided - - - - com.fasterxml.jackson.core - jackson-annotations - 2.12.0 - - - com.fasterxml.jackson.core - jackson-databind - 2.12.0 - - - io.jenkins.configuration-as-code - test-harness - 1.35 - test - - - org.jetbrains - annotations - RELEASE - compile - - - - - - - - org.jacoco - jacoco-maven-plugin - 0.8.6 - - - default-prepare-agent - - prepare-agent - - - - report - prepare-package - - report - - - - - - - org.apache.maven.plugins - maven-surefire-plugin - 2.20 - - - - - - scm:git:git://github.com/${gitHubRepo}.git - scm:git:git@github.com:${gitHubRepo}.git - https://github.com/${gitHubRepo} - cloudevents-1.0.0 - - - - - repo.jenkins-ci.org - https://repo.jenkins-ci.org/public/ - - - - - - repo.jenkins-ci.org - https://repo.jenkins-ci.org/public/ - - - diff --git a/release.properties b/release.properties deleted file mode 100644 index 9854ede..0000000 --- a/release.properties +++ /dev/null @@ -1,13 +0,0 @@ -#release configuration -#Wed Aug 11 20:45:54 IST 2021 -scm.tagNameFormat=@{project.artifactId}-@{project.version} -pushChanges=true -scm.url=scm\:git\:git@github.com\:jenkinsci/cloudevents-plugin.git -preparationGoals=clean install -remoteTagging=true -projectVersionPolicyId=default -scm.commentPrefix=[maven-release-plugin] -completionGoals=incrementals\:reincrementalify -exec.snapshotReleasePluginAllowed=false -exec.additionalArguments=-P consume-incrementals,might-produce-incrementals -completedPhase=create-backup-poms From 542c5c31979fed0519e2cf71d0a1110466e28bd6 Mon Sep 17 00:00:00 2001 From: Shruti Chaturvedi Date: Wed, 11 Aug 2021 20:54:18 +0530 Subject: [PATCH 30/36] [maven-release-plugin] prepare release cloudevents-1.0.0 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 8218068..63c904c 100644 --- a/pom.xml +++ b/pom.xml @@ -11,7 +11,7 @@ io.jenkins.plugins cloudevents - ${revision}${changelist} + 1.0.0 hpi From 4dfa326b5459054b716a764851438f96bb89adf3 Mon Sep 17 00:00:00 2001 From: Shruti Chaturvedi Date: Wed, 11 Aug 2021 20:57:32 +0530 Subject: [PATCH 31/36] edit pom.xml --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 63c904c..8218068 100644 --- a/pom.xml +++ b/pom.xml @@ -11,7 +11,7 @@ io.jenkins.plugins cloudevents - 1.0.0 + ${revision}${changelist} hpi From fcd3b960ecb142826906bc74d3a5d1cdc3de64e1 Mon Sep 17 00:00:00 2001 From: Shruti Chaturvedi Date: Wed, 11 Aug 2021 21:00:21 +0530 Subject: [PATCH 32/36] [maven-release-plugin] prepare release cloudevents-1.0.0 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 8218068..63c904c 100644 --- a/pom.xml +++ b/pom.xml @@ -11,7 +11,7 @@ io.jenkins.plugins cloudevents - ${revision}${changelist} + 1.0.0 hpi From b635b51344e87090f44d7dc43a8da1d43b8c1e83 Mon Sep 17 00:00:00 2001 From: Shruti Chaturvedi Date: Wed, 11 Aug 2021 21:00:35 +0530 Subject: [PATCH 33/36] [maven-release-plugin] prepare for next development iteration --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 63c904c..524cb05 100644 --- a/pom.xml +++ b/pom.xml @@ -11,11 +11,11 @@ io.jenkins.plugins cloudevents - 1.0.0 + ${revision}${changelist} hpi - 1.0.0 + 1.0.1 -SNAPSHOT 2.277.4 8 From fdea223ce1e307bf5c9b355cefad8b19e2ddac54 Mon Sep 17 00:00:00 2001 From: Shruti Chaturvedi Date: Mon, 16 Aug 2021 19:04:30 +0530 Subject: [PATCH 34/36] edit pom.xml --- pom.xml | 3 +- pom.xml.releaseBackup | 233 ++++++++++++++++++++++++++++++++++++++++++ release.properties | 20 ++++ 3 files changed, 254 insertions(+), 2 deletions(-) create mode 100644 pom.xml.releaseBackup create mode 100644 release.properties diff --git a/pom.xml b/pom.xml index 524cb05..b913c82 100644 --- a/pom.xml +++ b/pom.xml @@ -15,7 +15,7 @@ hpi - 1.0.1 + 1.0.0 -SNAPSHOT 2.277.4 8 @@ -214,7 +214,6 @@ scm:git:git://github.com/${gitHubRepo}.git scm:git:git@github.com:${gitHubRepo}.git https://github.com/${gitHubRepo} - cloudevents-1.0.0 diff --git a/pom.xml.releaseBackup b/pom.xml.releaseBackup new file mode 100644 index 0000000..8218068 --- /dev/null +++ b/pom.xml.releaseBackup @@ -0,0 +1,233 @@ + + + 4.0.0 + + + org.jenkins-ci.plugins + plugin + 4.16 + + + + io.jenkins.plugins + cloudevents + ${revision}${changelist} + hpi + + + 1.0.0 + -SNAPSHOT + 2.277.4 + 8 + jenkinsci/${project.artifactId}-plugin + + + CloudEvents Plugin + https://github.com/jenkinsci/${project.artifactId}-plugin + Emit and Consume CloudEvents in Jenkins. + + + + + io.jenkins.tools.bom + bom-2.277.x + 26 + import + pom + + + + org.jenkins-ci.plugins + jackson2-api + 2.11.3 + + + + + + + + MIT License + https://opensource.org/licenses/MIT + + + + + + ShrutiC-git + Shruti Chaturvedi + shrutichaturvedi16.sc@gmail.com + + + + + + + com.mashape.unirest + unirest-java + 1.4.9 + + + + + io.cloudevents + cloudevents-core + 2.0.0 + + + + io.cloudevents + cloudevents-http-basic + 2.0.0 + + + + io.cloudevents + cloudevents-api + 2.1.0 + + + + io.jenkins + configuration-as-code + 1.35 + true + + + + + + org.json + json + 20190722 + + + + org.junit.jupiter + junit-jupiter-engine + 5.2.0 + test + + + + + org.mockito + mockito-core + 3.7.7 + test + + + + org.mockito + mockito-inline + 2.13.0 + test + + + + + org.powermock + powermock-module-junit4 + 2.0.9 + test + + + + + + + io.jenkins.plugins + plugin-util-api + 2.0.0 + + + + + javax.servlet + javax.servlet-api + 4.0.1 + provided + + + + com.fasterxml.jackson.core + jackson-annotations + 2.12.0 + + + com.fasterxml.jackson.core + jackson-databind + 2.12.0 + + + io.jenkins.configuration-as-code + test-harness + 1.35 + test + + + org.jetbrains + annotations + RELEASE + compile + + + + + + + + org.jacoco + jacoco-maven-plugin + 0.8.6 + + + default-prepare-agent + + prepare-agent + + + + report + prepare-package + + report + + + + + + + org.apache.maven.plugins + maven-surefire-plugin + 2.20 + + + + + + scm:git:git://github.com/${gitHubRepo}.git + scm:git:git@github.com:${gitHubRepo}.git + https://github.com/${gitHubRepo} + cloudevents-1.0.0 + + + + + repo.jenkins-ci.org + https://repo.jenkins-ci.org/public/ + + + + + + repo.jenkins-ci.org + https://repo.jenkins-ci.org/public/ + + + diff --git a/release.properties b/release.properties new file mode 100644 index 0000000..1937ed9 --- /dev/null +++ b/release.properties @@ -0,0 +1,20 @@ +#release configuration +#Wed Aug 11 21:00:38 IST 2021 +scm.commentPrefix=[maven-release-plugin] +project.dev.io.jenkins.plugins\:cloudevents=1.0.1-SNAPSHOT +project.rel.io.jenkins.plugins\:cloudevents=1.0.0 +project.scm.io.jenkins.plugins\:cloudevents.developerConnection=scm\:git\:git@github.com\:${gitHubRepo}.git +project.scm.io.jenkins.plugins\:cloudevents.tag=cloudevents-1.0.0 +pushChanges=true +scm.tag=cloudevents-1.0.0 +remoteTagging=true +project.scm.io.jenkins.plugins\:cloudevents.connection=scm\:git\:git\://github.com/${gitHubRepo}.git +exec.additionalArguments=-P consume-incrementals,might-produce-incrementals +project.scm.io.jenkins.plugins\:cloudevents.url=https\://github.com/${gitHubRepo} +projectVersionPolicyId=default +scm.url=scm\:git\:git@github.com\:jenkinsci/cloudevents-plugin.git +scm.tagNameFormat=@{project.artifactId}-@{project.version} +preparationGoals=clean install +exec.snapshotReleasePluginAllowed=false +completedPhase=end-release +completionGoals=incrementals\:reincrementalify From 04b9a7ed7a5c401aa3bb8f4dbecdf169829b3099 Mon Sep 17 00:00:00 2001 From: Shruti Chaturvedi Date: Mon, 16 Aug 2021 19:46:22 +0530 Subject: [PATCH 35/36] [maven-release-plugin] prepare release cloudevents-1.0.0 --- pom.xml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index b913c82..9772e59 100644 --- a/pom.xml +++ b/pom.xml @@ -11,7 +11,7 @@ io.jenkins.plugins cloudevents - ${revision}${changelist} + 1.0.0 hpi @@ -214,7 +214,8 @@ scm:git:git://github.com/${gitHubRepo}.git scm:git:git@github.com:${gitHubRepo}.git https://github.com/${gitHubRepo} - + cloudevents-1.0.0 + From 49e956e144086356446aa481acf5d9ee0f7a7b5f Mon Sep 17 00:00:00 2001 From: Shruti Chaturvedi Date: Fri, 20 Aug 2021 20:28:49 +0530 Subject: [PATCH 36/36] Add poc files --- PoC/cloudplayer/deploy.yaml | 31 + PoC/knative/broker-data-plane.yaml | Bin 0 -> 15008 bytes PoC/knative/broker.yaml | 5 + PoC/knative/channel-consolidated.yaml | 985 +++++++++++++++++++++++++ PoC/knative/event-display-service.yaml | 15 + PoC/knative/event-source.yaml | 15 + PoC/knative/kafka-broker-config.yaml | 12 + PoC/knative/kafka-broker.yaml | 15 + PoC/knative/kafka-topic.yaml | 10 + PoC/knative/kafka-trigger.yaml | 15 + PoC/knative/logging.json | Bin 0 -> 12032 bytes PoC/knative/trigger.yaml | 12 + PoC/tekton/0000_namespace.yaml | 4 + PoC/tekton/0001_serviceAccount.yaml | 120 +++ PoC/tekton/0003_triggers.yaml | 53 ++ PoC/tekton/README.md | 99 +++ PoC/tekton/ingress.yaml | 16 + PoC/tekton/rbac.yaml | 156 ++++ pom.xml | 1 - pom.xml.releaseBackup | 233 ------ release.properties | 20 - 21 files changed, 1563 insertions(+), 254 deletions(-) create mode 100644 PoC/cloudplayer/deploy.yaml create mode 100644 PoC/knative/broker-data-plane.yaml create mode 100644 PoC/knative/broker.yaml create mode 100644 PoC/knative/channel-consolidated.yaml create mode 100644 PoC/knative/event-display-service.yaml create mode 100644 PoC/knative/event-source.yaml create mode 100644 PoC/knative/kafka-broker-config.yaml create mode 100644 PoC/knative/kafka-broker.yaml create mode 100644 PoC/knative/kafka-topic.yaml create mode 100644 PoC/knative/kafka-trigger.yaml create mode 100644 PoC/knative/logging.json create mode 100644 PoC/knative/trigger.yaml create mode 100644 PoC/tekton/0000_namespace.yaml create mode 100644 PoC/tekton/0001_serviceAccount.yaml create mode 100644 PoC/tekton/0003_triggers.yaml create mode 100644 PoC/tekton/README.md create mode 100644 PoC/tekton/ingress.yaml create mode 100644 PoC/tekton/rbac.yaml delete mode 100644 pom.xml.releaseBackup delete mode 100644 release.properties diff --git a/PoC/cloudplayer/deploy.yaml b/PoC/cloudplayer/deploy.yaml new file mode 100644 index 0000000..8ae4be1 --- /dev/null +++ b/PoC/cloudplayer/deploy.yaml @@ -0,0 +1,31 @@ +apiVersion: serving.knative.dev/v1 +kind: Service +metadata: + name: cloudevents-player +spec: + template: + metadata: + annotations: + autoscaling.knative.dev/minScale: "1" + spec: + containers: + - image: quay.io/ruben/cloudevents-player:latest + env: + - name: PLAYER_MODE + value: KNATIVE + - name: PLAYER_BROKER + value: default +--- +apiVersion: eventing.knative.dev/v1 +kind: Trigger +metadata: + name: cloudevents-player + annotations: + knative-eventing-injection: enabled +spec: + broker: events-broker + subscriber: + ref: + apiVersion: serving.knative.dev/v1 + kind: Service + name: cloudevents-player diff --git a/PoC/knative/broker-data-plane.yaml b/PoC/knative/broker-data-plane.yaml new file mode 100644 index 0000000000000000000000000000000000000000..082ad0e0ab73439805f21894146518ae27ae5723 GIT binary patch literal 15008 zcmd6uYi}FJ6^7??f&Pa;`dTrP9m%o*ehAzYDA2S4tQtiSz>r8uR;*h|N{*W5ueW`l zIXs$~-C6FE5{yEiZae2X=km@R^1uH%4!7YVybq^g7UufxCR~R%;j3^T_QLPO@4_@3 zhlO5m;$L6s$t12h)7tZ}6F%wLS^T~ePQ>Fzzr$;1xo#fr!d3jwNRoJd8~<8}{!|i? z_3uaC@Q3~(j3k-o@VbzUOMU-W{A(;8Gszz5zqfi#!bkmolxZ@Gvaci;Yep?DSY(!t z!aMzrgllp9V~0fifM$H%M_uls#BL4Yjuw~tc^56Y7sa(?%^RA&eO&XMc-xvGdYozP zBHBKZo#;Q3{~z=}yf$9$o@YNjNM5?_J0%Eb^6uv$r-HsEGv(rXDueN8+)-H zUC955^cw3gv^*`mmnd(P=Vw|++>N65?DuixH>Z9QZA#{ayw3yO?bv?L!OK9B)0o^CeJ&!KhMAY z@IuzVPzD~h^7%p<-AGP~d-misR-j91Z80*{Ufjvb+#=#;TI`9-zKtBwy|1#cBe^%) z9FUJxvYE)-Z&|RdI#8=dRte}$*V+S*JF;#Ttv%I~2XP$ILsH}tV-|aPKYJ@K-p|aF zRPc8(iYAKghw!bmr_P}b5_7A~##23oit2qAGmMH{*75_{zpuJnR#E8xDH>`ixmAx{ zujZx4@!nkiusT}iDAkZWJkd|A7^%M=OMlBObYs2wxmGQm>(5%l@9sH6467&%InbfN z2~b-9zn70D(MMzlySj=CHSaveAd-jMlJCuS;h&PD+upq%4M8P%jZC{L_8prh+BZ{;GXIwQGToS)QUXM4AbR%L5zXR9iOKjc&zA89WeE-(thL`58@E( zt*2APL3nt*w*O6&0E{!SIQUFkkW%`H|Y(!7ph zy|%XL{S4q;0L{QS>?YB`_f*Hq$nDb&p2T}Xes~WL|EwpAWwfl~nIxMgXHlQIYGkv9 zS#{)OVV%F*hpTwHH|(qlPNcp)5AQO@K#^e4W_K@rx=PoQU+&Si?e)%)>ST$QO$YDs zplQy5R2EPSJ4ddzrKIjK70peIOlp`_W03rXB8!;F@gtq~Jo*979~Hx0oUM0&`sn9W zD|8x8pE{^TwxJVHH#&M1qEeu1(y>dQbh;X@lcB->Tab^^U?DG}Gbe4cb=XaapJtAt zRenAmXXtsT7A9}1U8lp~?O__&PB{+yQui?LqK>7seDCr*81rknb}WBA<^H8lzV!?0 zyrIinw-Ut@gWN*VE4W#C8Ik-qI+wky;4*fT=%rSd_alz1<}qV#wdSG7E+~j%JAseI zdrvZ6>2)Yc2l4k(OR@qC#NOJ?8eQu^s}Hq0Ut40IFMWdV!Y|-L&S#cUbYky(&0C}w z@$A^dUC@F$EE}xXmk7yErJV3V=A49VUD7G{ldoql@^e}4->w_6_DRHEQQxg+ zd17s6eL|Xc&j9M{GgaFZ}`w8w-fuQBK_yq9Ys`=GWSe<$Lc56{H)@gh+MhR zzVi%?x^7#1XRv-GTk+DlVxOK??iT(q%;2Y1$BA~=#7#tQk)hFk6rOA?Y>F7zYtCXasfoh;A&=CYrT!>t4QE_LB?PJm7Mn;>{- zKpWVdZXmmAPrXjC=XE}G6N~M!WZdbm%SWw;cKXlCgA?hND#6fR--R~Hdw4siOyk_< zt+MYrBEj?Uy*zRowQc4^njGOd?!j_Q#snze8SaERx!_&9<;+7IHXC~mbBYakJ;1rKj`JBZT=6< z&|R^0`Q2d+f0;DLTy(fPx*5_5><;>Q=3hU__c`Y3*6eAxi%wLt82RPxidFLbwtFwI zYLht^blxG_eVBeh+!jKEA!ho!zd}v z$I%~c?m11r9O~4Nxm8oYI$d3!VdzcfR7g#Cfy3uh(3KT(6I5$l$T06dh7qVw9#39V z9XaOnDCo(gguOTeGmY!-C(xFNDEWa}Q=2~-&1Q2aX!AU9`|^Bf&YPfl>YNE4E^EE{ zQk~LqM>$twEtyiwe#^xF*Lf0}n@vOTc$yj3<~~gt>rHw0 zNb{cNTEjN^JgdGU-CJ5b)N2@Mk9$1!+)zlWrZ(G$`|5d)%P%7~&2e~Mt8exBjdM$S zt)APkzKM#l!QNBTJ+E;&%~KZ{-<;EQt?fD+cCF7VB=&X9WxDA5PlQmql+-(GCpYs? zIfrp-5Junp#dS;-t6e#2bC)4>K4I`XjJ|ox5T5WFGG}S?%4-_F9X?-KkC$7$dakk_ z&vO2e&r_blC!eDvKJ|*5>d?G}nkU+m`rIUOO;z=2^O7b&!Ylw(N9*x0`3>+KdA#RuYM;W*er>>X`;>%KrbQ zPJQVf&|;NSA9q#j%r4L#n)b|sCypgn%_{PB_%z4xsb^}?YOgVkNQyw%(azs3705%Y4#bc1y~WQOx0c%@WvA z-hakz#A)QkZNI-G+U-MfZrXE{*SHNz3XTXkr9%@R$o*n7?Yx#RmUvD(|-wi)%rB7sX z|2F3|{<)vcy^L1L$1XF+np3?8kiLJZb@`-dN0haB4IKTGOa9px;>|f6>CDL4g>^aS z_p;vQLzmO=thC)$ypc{sQvTT}m&wmjl=5q~Px;d`Jslc9wytk_giX&OZ8$D}E{Vg? z_;X1cTJO5#v2)Fe)s7F3ks&kBJT6v8jdT4HQ_@wj)Lj=gvE_LxNmJjvj?7{%HoeBD zaLP|Rm7nIITM-3+SIw|oFIPKeWX&ek)vG`BLu-N8oV=HK<#K+ho4~oRmpC;&gii%A zFQ*fglW?<<8P5y7N9?s;^peymct5GVE5K%4eCp^-FQ)Ol|LnECcJ%W^Kj}R@*^5u7 V`aaQ`S6V;O|4+pCKvfmJ{s*A%{qFz( literal 0 HcmV?d00001 diff --git a/PoC/knative/broker.yaml b/PoC/knative/broker.yaml new file mode 100644 index 0000000..2cbd47d --- /dev/null +++ b/PoC/knative/broker.yaml @@ -0,0 +1,5 @@ +apiVersion: eventing.knative.dev/v1 +kind: Broker +metadata: + name: default + namespace: knative-eventing \ No newline at end of file diff --git a/PoC/knative/channel-consolidated.yaml b/PoC/knative/channel-consolidated.yaml new file mode 100644 index 0000000..c61d027 --- /dev/null +++ b/PoC/knative/channel-consolidated.yaml @@ -0,0 +1,985 @@ +# Copyright 2020 The Knative Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: kafka-addressable-resolver + labels: + contrib.eventing.knative.dev/release: "v0.19.3" + duck.knative.dev/addressable: "true" +# Do not use this role directly. These rules will be added to the "addressable-resolver" role. +rules: + - apiGroups: + - messaging.knative.dev + resources: + - kafkachannels + - kafkachannels/status + verbs: + - get + - list + - watch + +--- +# Copyright 2020 The Knative Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: kafka-channelable-manipulator + labels: + contrib.eventing.knative.dev/release: "v0.19.3" + duck.knative.dev/channelable: "true" +# Do not use this role directly. These rules will be added to the "channelable-manipulator" role. +rules: + - apiGroups: + - messaging.knative.dev + resources: + - kafkachannels + - kafkachannels/status + verbs: + - create + - get + - list + - watch + - update + - patch + +--- +# Copyright 2020 The Knative Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: kafka-ch-controller + labels: + contrib.eventing.knative.dev/release: "v0.19.3" +rules: + - apiGroups: + - messaging.knative.dev + resources: + - kafkachannels + - kafkachannels/status + verbs: + - get + - list + - watch + - update + - patch + - apiGroups: + - messaging.knative.dev + resources: + - kafkachannels/finalizers + verbs: + - update + - apiGroups: + - "" # Core API group. + resources: + - services + - configmaps + - secrets + verbs: + - get + - list + - watch + - create + - apiGroups: + - "" # Core API group. + resources: + - services + verbs: &everything + - get + - list + - watch + - create + - patch + - update + - apiGroups: + - "" # Core API Group. + resources: + - configmaps + resourceNames: + - kafka-ch-dispatcher + verbs: + - update + - apiGroups: + - "" # Core API Group. + resources: + - events + verbs: + - create + - patch + - update + - apiGroups: + - "" + resources: + - configmaps + verbs: + - get + - list + - watch + - apiGroups: + - "" # Core API group. + resources: + - endpoints + verbs: + - get + - list + - watch + - apiGroups: + - apps + resources: + - deployments + - deployments/status + verbs: *everything + - apiGroups: + - "" # Core API group. + resources: + - serviceaccounts + verbs: *everything + - apiGroups: + - rbac.authorization.k8s.io + resources: + - rolebindings + verbs: *everything + - apiGroups: + - "coordination.k8s.io" + resources: + - leases + verbs: *everything + +--- +# Copyright 2020 The Knative Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: v1 +kind: ServiceAccount +metadata: + name: kafka-ch-controller + namespace: knative-eventing + labels: + contrib.eventing.knative.dev/release: "v0.19.3" + +--- +# Copyright 2020 The Knative Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: kafka-ch-dispatcher + labels: + contrib.eventing.knative.dev/release: "v0.19.3" +rules: + - apiGroups: + - messaging.knative.dev + resources: + - kafkachannels + verbs: + - get + - list + - watch + - patch + - apiGroups: + - messaging.knative.dev + resources: + - kafkachannels/status + verbs: + - get + - update + - patch + - apiGroups: + - "" # Core API group. + resources: + - events + verbs: + - create + - patch + - update + - apiGroups: + - messaging.knative.dev + resources: + - kafkachannels + verbs: + - get + - list + - watch + - patch + - apiGroups: + - "" + resources: + - configmaps + - secrets + verbs: + - get + - list + - watch + - apiGroups: + - "" # Core API Group. + resources: + - events + verbs: + - create + - patch + - apiGroups: + - coordination.k8s.io + resources: + - leases + verbs: + - get + - list + - watch + - create + - patch + - update + +--- +# Copyright 2020 The Knative Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: v1 +kind: ServiceAccount +metadata: + name: kafka-ch-dispatcher + namespace: knative-eventing + labels: + contrib.eventing.knative.dev/release: "v0.19.3" + +--- +# Copyright 2020 The Knative Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: kafka-webhook + labels: + contrib.eventing.knative.dev/release: "v0.19.3" +rules: + # For watching logging configuration and getting certs. + - apiGroups: + - "" + resources: + - "configmaps" + verbs: + - "get" + - "list" + - "watch" + # For manipulating certs into secrets. + - apiGroups: + - "" + resources: + - "secrets" + verbs: + - "get" + - "create" + - "list" + - "watch" + - "update" + # For getting our Deployment so we can decorate with ownerref. + - apiGroups: + - "apps" + resources: + - "deployments" + verbs: + - "get" + - apiGroups: + - "apps" + resources: + - "deployments/finalizers" + verbs: + - update + # For actually registering our webhook. + - apiGroups: + - "admissionregistration.k8s.io" + resources: + - "mutatingwebhookconfigurations" + - "validatingwebhookconfigurations" + verbs: &everything + - "get" + - "list" + - "create" + - "update" + - "delete" + - "patch" + - "watch" + # Our own resources and statuses we care about. + - apiGroups: + - "messaging.knative.dev" + resources: + - "kafkachannels" + - "kafkachannels/status" + verbs: + - "get" + - "list" + - "watch" + # For leader election + - apiGroups: + - "coordination.k8s.io" + resources: + - "leases" + verbs: *everything + # Necessary for conversion webhook. These are copied from the serving + # TODO: Do we really need all these permissions? + - apiGroups: + - "apiextensions.k8s.io" + resources: + - "customresourcedefinitions" + verbs: + - "get" + - "list" + - "create" + - "update" + - "delete" + - "patch" + - "watch" + +--- +# Copyright 2020 The Knative Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +apiVersion: v1 +kind: ServiceAccount +metadata: + name: kafka-webhook + namespace: knative-eventing + labels: + contrib.eventing.knative.dev/release: "v0.19.3" + +--- +# Copyright 2019 The Knative Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: kafka-ch-controller + labels: + contrib.eventing.knative.dev/release: "v0.19.3" +subjects: + - kind: ServiceAccount + name: kafka-ch-controller + namespace: knative-eventing +roleRef: + kind: ClusterRole + name: kafka-ch-controller + apiGroup: rbac.authorization.k8s.io +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: kafka-ch-dispatcher + labels: + contrib.eventing.knative.dev/release: "v0.19.3" +subjects: + - kind: ServiceAccount + name: kafka-ch-dispatcher + namespace: knative-eventing +roleRef: + kind: ClusterRole + name: kafka-ch-dispatcher + apiGroup: rbac.authorization.k8s.io +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: kafka-webhook + labels: + contrib.eventing.knative.dev/release: "v0.19.3" +subjects: + - kind: ServiceAccount + name: kafka-webhook + namespace: knative-eventing +roleRef: + kind: ClusterRole + name: kafka-webhook + apiGroup: rbac.authorization.k8s.io + +--- +# Copyright 2020 The Knative Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + name: kafkachannels.messaging.knative.dev + labels: + contrib.eventing.knative.dev/release: "v0.19.3" + knative.dev/crd-install: "true" + messaging.knative.dev/subscribable: "true" + duck.knative.dev/addressable: "true" +spec: + group: messaging.knative.dev + preserveUnknownFields: false + validation: + openAPIV3Schema: + type: object + # this is a work around so we don't need to flush out the + # schema for each version at this time + # + # see issue: https://github.com/knative/serving/issues/912 + x-kubernetes-preserve-unknown-fields: true + names: + kind: KafkaChannel + plural: kafkachannels + singular: kafkachannel + categories: + - all + - knative + - messaging + - channel + shortNames: + - kc + scope: Namespaced + subresources: + status: {} + additionalPrinterColumns: + - name: Ready + type: string + JSONPath: ".status.conditions[?(@.type==\"Ready\")].status" + - name: Reason + type: string + JSONPath: ".status.conditions[?(@.type==\"Ready\")].reason" + - name: URL + type: string + JSONPath: .status.address.url + - name: Age + type: date + JSONPath: .metadata.creationTimestamp + versions: + - name: v1alpha1 + served: true + storage: true + - name: v1beta1 + served: true + storage: false + conversion: + strategy: Webhook + conversionReviewVersions: ["v1beta1", "v1alpha1"] + webhookClientConfig: + service: + name: kafka-webhook + namespace: knative-eventing + +--- +# Copyright 2020 The Knative Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: v1 +kind: ConfigMap +metadata: + name: config-kafka + namespace: knative-eventing +data: + # Broker URL. Replace this with the URLs for your kafka cluster, + # which is in the format of my-cluster-kafka-bootstrap.my-kafka-namespace:9092. + bootstrapServers: my-cluster-kafka-bootstrap.kafka:9092 + #authSecretName: name-of-your-secret-for-kafka-auth + #authSecretNamespace: namespace-of-your-secret-for-kafka-auth + +--- +# Copyright 2020 The Knative Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: v1 +kind: ConfigMap +metadata: + name: config-leader-election-kafka + namespace: knative-eventing +data: + # An inactive but valid configuration follows; see example. + resourceLock: "leases" + leaseDuration: "15s" + renewDeadline: "10s" + retryPeriod: "2s" + _example: | + ################################ + # # + # EXAMPLE CONFIGURATION # + # # + ################################ + + # This block is not actually functional configuration, + # but serves to illustrate the available configuration + # options and document them in a way that is accessible + # to users that `kubectl edit` this config map. + # + # These sample configuration options may be copied out of + # this example block and unindented to be in the data block + # to actually change the configuration. + + # resourceLock controls which API resource is used as the basis for the + # leader election lock. Valid values are: + # + # - leases -> use the coordination API + # - configmaps -> use configmaps + # - endpoints -> use endpoints + resourceLock: "leases" + + # leaseDuration is how long non-leaders will wait to try to acquire the + # lock; 15 seconds is the value used by core kubernetes controllers. + leaseDuration: "15s" + # renewDeadline is how long a leader will try to renew the lease before + # giving up; 10 seconds is the value used by core kubernetes controllers. + renewDeadline: "10s" + # retryPeriod is how long the leader election client waits between tries of + # actions; 2 seconds is the value used by core kuberntes controllers. + retryPeriod: "2s" + # enabledComponents is a comma-delimited list of component names for which + # leader election is enabled. Valid values are: + # + # - kafkachannel-dispatcher + # - kafkachannel-controller + enabledComponents: "kafkachannel-dispatcher,kafkachannel-controller" + +--- +# Copyright 2020 The Knative Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: v1 +kind: Service +metadata: + name: kafka-webhook + namespace: knative-eventing + labels: + contrib.eventing.knative.dev/release: "v0.19.3" + role: kafka-webhook +spec: + ports: + - name: https-webhook + port: 443 + targetPort: 8443 + selector: + role: kafka-webhook + +--- +# Copyright 2020 The Knative Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: apps/v1 +kind: Deployment +metadata: + name: kafka-ch-controller + namespace: knative-eventing + labels: + contrib.eventing.knative.dev/release: "v0.19.3" +spec: + replicas: 1 + selector: + matchLabels: &labels + messaging.knative.dev/channel: kafka-channel + messaging.knative.dev/role: controller + template: + metadata: + labels: *labels + spec: + serviceAccountName: kafka-ch-controller + containers: + - name: controller + image: gcr.io/knative-releases/knative.dev/eventing-kafka/cmd/channel/consolidated/controller@sha256:641cd3e6424a0230d83255441d6189ff57d63766b233968cc1b655127365273b + env: + - name: CONFIG_LOGGING_NAME + value: config-logging + - name: METRICS_DOMAIN + value: knative.dev/eventing + - name: SYSTEM_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace + - name: POD_NAME + valueFrom: + fieldRef: + fieldPath: metadata.name + - name: CONFIG_LEADERELECTION_NAME + value: config-leader-election-kafka + - name: DISPATCHER_IMAGE + value: gcr.io/knative-releases/knative.dev/eventing-kafka/cmd/channel/consolidated/dispatcher@sha256:6e0790ac1947b695eb96269f09ffbd1cdcc5bb74f57454cdb6884eedc9fbbece + ports: + - containerPort: 9090 + name: metrics + volumeMounts: + - name: config-logging + mountPath: /etc/config-logging + volumes: + - name: config-logging + configMap: + name: config-logging + +--- +# Copyright 2020 The Knative Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: apps/v1 +kind: Deployment +metadata: + name: kafka-ch-dispatcher + namespace: knative-eventing + labels: + contrib.eventing.knative.dev/release: "v0.19.3" +spec: + # this deployment is going to be scaled up by the + # controller when the very first KafkaChannel is created + replicas: 0 + selector: + matchLabels: + messaging.knative.dev/channel: kafka-channel + messaging.knative.dev/role: dispatcher + template: + metadata: + labels: + messaging.knative.dev/channel: kafka-channel + messaging.knative.dev/role: dispatcher + contrib.eventing.knative.dev/release: "v0.19.3" + spec: + containers: + - name: dispatcher + image: gcr.io/knative-releases/knative.dev/eventing-kafka/cmd/channel/consolidated/dispatcher@sha256:6e0790ac1947b695eb96269f09ffbd1cdcc5bb74f57454cdb6884eedc9fbbece + env: + - name: SYSTEM_NAMESPACE + value: '' + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.namespace + - name: POD_NAME + valueFrom: + fieldRef: + fieldPath: metadata.name + - name: METRICS_DOMAIN + value: "knative.dev/eventing" + - name: CONFIG_LOGGING_NAME + value: "config-logging" + - name: CONFIG_LEADERELECTION_NAME + value: "config-leader-election-kafka" + - name: CONTAINER_NAME + value: dispatcher + ports: + - containerPort: 9090 + name: metrics + protocol: TCP + volumeMounts: + - name: config-kafka + mountPath: /etc/config-kafka + serviceAccountName: kafka-ch-dispatcher + volumes: + - name: config-kafka + configMap: + name: config-kafka +--- +apiVersion: v1 +kind: Service +metadata: + labels: + messaging.knative.dev/channel: kafka-channel + messaging.knative.dev/role: dispatcher + name: kafka-ch-dispatcher + namespace: knative-eventing +spec: + ports: + - name: http-dispatcher + port: 80 + protocol: TCP + targetPort: 8080 + selector: + messaging.knative.dev/channel: kafka-channel + messaging.knative.dev/role: dispatcher + +--- +# Copyright 2020 The Knative Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: admissionregistration.k8s.io/v1beta1 +kind: MutatingWebhookConfiguration +metadata: + name: defaulting.webhook.kafka.messaging.knative.dev + labels: + contrib.eventing.knative.dev/release: "v0.19.3" +webhooks: + - admissionReviewVersions: + - v1beta1 + clientConfig: + service: + name: kafka-webhook + namespace: knative-eventing + failurePolicy: Fail + name: defaulting.webhook.kafka.messaging.knative.dev +--- +apiVersion: admissionregistration.k8s.io/v1beta1 +kind: ValidatingWebhookConfiguration +metadata: + name: validation.webhook.kafka.messaging.knative.dev + labels: + contrib.eventing.knative.dev/release: "v0.19.3" +webhooks: + - admissionReviewVersions: + - v1beta1 + clientConfig: + service: + name: kafka-webhook + namespace: knative-eventing + failurePolicy: Fail + name: validation.webhook.kafka.messaging.knative.dev +--- +apiVersion: v1 +kind: Secret +metadata: + name: messaging-webhook-certs + namespace: knative-eventing + labels: + contrib.eventing.knative.dev/release: "v0.19.3" +# The data is populated at install time. + +--- +# Copyright 2020 The Knative Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: apps/v1 +kind: Deployment +metadata: + name: kafka-webhook + namespace: knative-eventing + labels: + contrib.eventing.knative.dev/release: "v0.19.3" +spec: + replicas: 1 + selector: + matchLabels: &labels + app: kafka-webhook + role: kafka-webhook + template: + metadata: + annotations: + sidecar.istio.io/inject: "false" + labels: *labels + spec: + serviceAccountName: kafka-webhook + containers: + - name: kafka-webhook + terminationMessagePolicy: FallbackToLogsOnError + image: gcr.io/knative-releases/knative.dev/eventing-kafka/cmd/webhook@sha256:2ab48e4157481bd00ba564452f39f9e58246cac5481b47d8b12cadd1e1f643f3 + env: + - name: SYSTEM_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace + - name: CONFIG_LOGGING_NAME + value: config-logging + - name: METRICS_DOMAIN + value: knative.dev/eventing + - name: WEBHOOK_NAME + value: kafka-webhook + - name: WEBHOOK_PORT + value: "8443" + ports: + - name: https-webhook + containerPort: 8443 + - name: metrics + containerPort: 9090 + - name: profiling + containerPort: 8008 + # TODO set proper resource limits. + + readinessProbe: &probe + periodSeconds: 1 + httpGet: + scheme: HTTPS + port: 8443 + httpHeaders: + - name: k-kubelet-probe + value: "webhook" + livenessProbe: + !!merge <<: *probe + initialDelaySeconds: 20 + # Our webhook should gracefully terminate by lame ducking first, set this to a sufficiently + # high value that we respect whatever value it has configured for the lame duck grace period. + terminationGracePeriodSeconds: 300 + +--- diff --git a/PoC/knative/event-display-service.yaml b/PoC/knative/event-display-service.yaml new file mode 100644 index 0000000..34f4cc8 --- /dev/null +++ b/PoC/knative/event-display-service.yaml @@ -0,0 +1,15 @@ +apiVersion: serving.knative.dev/v1 +kind: Service +metadata: + name: event-display + namespace: default +spec: + template: + metadata: + annotations: + autoscaling.knative.dev/minScale: "2" + spec: + containers: + - # This corresponds to + # https://github.com/knative/eventing/tree/main/cmd/event_display/main.go + image: gcr.io/knative-releases/knative.dev/eventing/cmd/event_display \ No newline at end of file diff --git a/PoC/knative/event-source.yaml b/PoC/knative/event-source.yaml new file mode 100644 index 0000000..298d4fb --- /dev/null +++ b/PoC/knative/event-source.yaml @@ -0,0 +1,15 @@ +apiVersion: sources.knative.dev/v1beta1 +kind: KafkaSource +metadata: + name: kafka-source +spec: + consumerGroup: knative-group + bootstrapServers: + - my-cluster-kafka-bootstrap.kafka:9092 # note the kafka namespace + topics: + - my-topic + sink: + ref: + apiVersion: serving.knative.dev/v1 + kind: Service + name: event-display \ No newline at end of file diff --git a/PoC/knative/kafka-broker-config.yaml b/PoC/knative/kafka-broker-config.yaml new file mode 100644 index 0000000..95da378 --- /dev/null +++ b/PoC/knative/kafka-broker-config.yaml @@ -0,0 +1,12 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: kafka-broker-config + namespace: knative-eventing +data: + # Number of topic partitions + default.topic.partitions: "10" + # Replication factor of topic messages. + default.topic.replication.factor: "1" + # A comma separated list of bootstrap servers. (It can be in or out the k8s cluster) + bootstrap.servers: "my-cluster-kafka-bootstrap.kafka:9092" \ No newline at end of file diff --git a/PoC/knative/kafka-broker.yaml b/PoC/knative/kafka-broker.yaml new file mode 100644 index 0000000..77d81dc --- /dev/null +++ b/PoC/knative/kafka-broker.yaml @@ -0,0 +1,15 @@ +apiVersion: eventing.knative.dev/v1 +kind: Broker +metadata: + annotations: + # case-sensitive + eventing.knative.dev/broker.class: Kafka + name: kafka-broker + namespace: knative-eventing +spec: + # Configuration specific to this broker. + config: + apiVersion: v1 + kind: ConfigMap + name: kafka-broker-config + namespace: knative-eventing \ No newline at end of file diff --git a/PoC/knative/kafka-topic.yaml b/PoC/knative/kafka-topic.yaml new file mode 100644 index 0000000..753769e --- /dev/null +++ b/PoC/knative/kafka-topic.yaml @@ -0,0 +1,10 @@ +apiVersion: kafka.strimzi.io/v1beta1 +kind: KafkaTopic +metadata: + name: my-topic + namespace: kafka + labels: + strimzi.io/cluster: my-cluster +spec: + partitions: 10 + replicas: 1 \ No newline at end of file diff --git a/PoC/knative/kafka-trigger.yaml b/PoC/knative/kafka-trigger.yaml new file mode 100644 index 0000000..7406c4d --- /dev/null +++ b/PoC/knative/kafka-trigger.yaml @@ -0,0 +1,15 @@ +apiVersion: eventing.knative.dev/v1 +kind: Trigger +metadata: + name: my-service-trigger + namespace: knative-eventing + annotations: + kafka.eventing.knative.dev/delivery.order: ordered +spec: + broker: kafka-broker + subscriber: + ref: + apiVersion: serving.knative.dev/v1 + kind: Service + name: event-display + namespace: default \ No newline at end of file diff --git a/PoC/knative/logging.json b/PoC/knative/logging.json new file mode 100644 index 0000000000000000000000000000000000000000..e503c408301894532ffeeb719c8dfcbf1a24e30a GIT binary patch literal 12032 zcmeHNOK%%D5azi+|AWA@CEIeGhk>9d8l>$d2m&>SCOO#B`T@(5pjFhShW~on@8f8^ zOD^|i$!_Zig2dI5oEgrW9RB_F+I(-mGo97PnqxCF7v{Z5%-p1Snwp8R<_P`PEX_WC zcY+z07&S4Y+fi=-;|lXrKsq)?71`Ihw;IhTzNIVQ6dYm7fS;%0@9t0O1ISflo_O(53JnCguG~v>i~EL!2R6e+IP4PD{cIG`6=~rFQC2J#%(R5zv!uSX4qP1*Gl2Qe1V?OXNjidsecctm1#sZRGCSL z%~q$-NZXOq;ileFXO^`Bk@C5lM=gV^?=5_Q@a`H`9Jd}FTh|J$>ap+FgOl2rSE-}% zu4|OFwYBUzYBtaP^*qVlx!Oh+ZDk<5m#DBnJXgQe&NfvR0&Ql_;qe$3GwpA;h9;w% zuGGS3WIlL)>&-%2O3a^*;%0Vgkp(Gy2!jsC8+x*b%m|l~=Hi{NBj7o!8E8#%>=iJHwmXn7Pg>RRgzn zqnv2kifwM~Cgj(@Z8xvrms5B4#50mPqSV%QLK#*4-^QFO?qq$!r^gj@eulkF5o2b- zS@v5*A353PS?AWCGA*co+S*e+k2vBn*b~n^d4|gx$X_n{q}yH3s!G;O3o=dE?t1Dt zc0U$#m)%6WQ{ZN!o92;qr*>M0T)5aac6+Qjs#oDz-+%QquUPqdf@&M9Y*mtq^Y~Lq zZNWOPl|NIgt2mZbbS${c+99)uIkNC1$RuQMZn1(s>W0rz8`?wFu#eTm`ELQ|0%xQ; z@6bF&J@y#$o}v24D&$kZ8Dc~iEg|vg1Qj6S=DR*d9pL#8*!D0p!MtI>y-?RIR=_h` zjw`P}(f*45US@o7(uqmvlP9+rW>&50PuN+xWqmz%Vkp?l{72K1T&?WapLkK8er>p1 zYvXbbX{A+DkNi_FYkq|NjuBBpElcq(g{}1$FX0~LmuV#gsiZZXaGGu85Z47$csxii@0(CLy^ zgF3KL;dQm{@jegtPVMv|rgORrBc!sO8fymC5>fr8j|)A`L+M-@^}0f-4*2`bZ&weM z50pE#Zt6Umo)#zg#~nw^E9P}{2jlkfrDpk67)H2X5lL95;SDcB>$qp02F&q1b$*o* zowG+SCZ1y41x5;0!xar8xsLe*?@v(Oo#Jx|2(0uh-55sm?6y%a7}>)-|87&+EgY#k zbGS|=iS-{Lmtck=H@fn^zZ+fI51>PCQZW}= zn3sr=dWVd$io9N81ml&^UPmie+<|;}r>}$DgK*^zVN;8bc@@9T5Jrc*?ycupm_>ZX zTAM>r|EjrPeJu0WqO?!^g2cG>%zS`F%R2P20MhN%BRl##ZG^ z;v=Tc64%X?e3`t1B(9*jwDC5OA1+qK=*`!x|8IK4yOO$NZ0aYfb8lady70Etm&~K_ zjF|qZxHrl%4h@HbV_d5@#YcV>-LfU9t%&(R2^us$> X7B?Cgi>_AkV$`ApeLa`+1o{034IOEM literal 0 HcmV?d00001 diff --git a/PoC/knative/trigger.yaml b/PoC/knative/trigger.yaml new file mode 100644 index 0000000..286caf0 --- /dev/null +++ b/PoC/knative/trigger.yaml @@ -0,0 +1,12 @@ +apiVersion: eventing.knative.dev/v1 +kind: Trigger +metadata: + name: cdevents-trigger + namespace: knative-eventing +spec: + broker: default + filter: + attributes: + type: org.jenkinsci.queue.entered_waiting + subscriber: + uri: http://ad159ada4a01042bf8ea1f3b773f165b-e5708344b9709abf.elb.us-west-1.amazonaws.com/ diff --git a/PoC/tekton/0000_namespace.yaml b/PoC/tekton/0000_namespace.yaml new file mode 100644 index 0000000..a870952 --- /dev/null +++ b/PoC/tekton/0000_namespace.yaml @@ -0,0 +1,4 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: cdevents diff --git a/PoC/tekton/0001_serviceAccount.yaml b/PoC/tekton/0001_serviceAccount.yaml new file mode 100644 index 0000000..01dea3f --- /dev/null +++ b/PoC/tekton/0001_serviceAccount.yaml @@ -0,0 +1,120 @@ +kind: Role +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: triggers-minimal + namespace: cdevents +rules: +- apiGroups: [""] + resources: ["configmaps", "secrets"] + verbs: ["get", "list", "watch"] +- apiGroups: ["triggers.tekton.dev"] + resources: ["eventlisteners", "triggerbindings", "triggertemplates", "triggers"] + verbs: ["get", "list", "watch"] +- apiGroups: ["tekton.dev"] + resources: ["pipelineruns", "pipelineresources", "taskruns"] + verbs: ["create"] +- apiGroups: [""] + resources: ["serviceaccounts"] + verbs: ["impersonate"] +--- +apiVersion: v1 +kind: ServiceAccount +metadata: + name: cdevent-listener + namespace: cdevents +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + name: cdevent-listener-triggers-minimal + namespace: cdevents +subjects: +- kind: ServiceAccount + name: cdevent-listener +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: triggers-minimal +--- +kind: Role +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: config-map-admin + namespace: cdevents +rules: +- apiGroups: [""] + resources: ["configmaps"] + verbs: ["*"] +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + name: default-config-map-admin + namespace: cdevents +subjects: +- kind: ServiceAccount + name: default +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: config-map-admin +--- +kind: ClusterRole +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: cdevent-listener-triggers +rules: +- apiGroups: ["triggers.tekton.dev"] + resources: ["eventlisteners", "triggerbindings", "triggertemplates", "triggers", "clustertriggerbindings", "clusterinterceptors"] + verbs: ["get", "list", "watch"] +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: cdevent-listener-triggers-cdevents +subjects: +- kind: ServiceAccount + name: cdevent-listener + namespace: cdevents +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: cdevent-listener-triggers +--- +apiVersion: v1 +kind: ServiceAccount +metadata: + name: runner + namespace: cdevents +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: deployer +rules: + - apiGroups: [""] + resources: [services] + verbs: ["*"] + - apiGroups: [""] + resources: [pods] + verbs: ["get", "list", "watch"] + - apiGroups: [apps] + resources: [deployments] + verbs: ["*"] + - apiGroups: [networking.k8s.io] + resources: [ingresses] + verbs: ["*"] +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + name: runner-deployer-production + namespace: cdevents +subjects: + - kind: ServiceAccount + name: runner + namespace: cdevents +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: deployer \ No newline at end of file diff --git a/PoC/tekton/0003_triggers.yaml b/PoC/tekton/0003_triggers.yaml new file mode 100644 index 0000000..72bd0a8 --- /dev/null +++ b/PoC/tekton/0003_triggers.yaml @@ -0,0 +1,53 @@ +apiVersion: triggers.tekton.dev/v1alpha1 +kind: TriggerTemplate +metadata: + name: cdevent-jenkins-tekton-trigger-template + namespace: cdevents +spec: + resourcetemplates: + - apiVersion: tekton.dev/v1beta1 + kind: TaskRun + metadata: + generateName: jenkins-to-tekton-task-run- + spec: + serviceAccountName: runner + taskRef: + name: jenkins-to-tekton-echo-task +--- +apiVersion: tekton.dev/v1beta1 +kind: Task +metadata: + name: jenkins-to-tekton-echo-task + namespace: cdevents +spec: + steps: + - image: ubuntu + command: + - echo + args: + - "Hello, Shruti!" +--- +apiVersion: triggers.tekton.dev/v1alpha1 +kind: TriggerBinding +metadata: + name: getting-started-taskrunbinding + namespace: cdevents +spec: + params: + - name: jobname + value: $(header.ce-type) +--- +apiVersion: triggers.tekton.dev/v1alpha1 +kind: EventListener +metadata: + name: cdevent-listener + namespace: cdevents +spec: + serviceAccountName: cdevent-listener + triggers: + - bindings: + - ref: getting-started-taskrunbinding + template: + ref: cdevent-jenkins-tekton-trigger-template + namespaceSelector: + matchNames: ['cdevents'] \ No newline at end of file diff --git a/PoC/tekton/README.md b/PoC/tekton/README.md new file mode 100644 index 0000000..85cdc04 --- /dev/null +++ b/PoC/tekton/README.md @@ -0,0 +1,99 @@ +# Tekton Resources + +This folder contains all the Tekton resources required for the PoC. + +## Prerequisites + +### Install Tekton + +Set up a kind cluster with Tekton using [tekton_in_kind.sh](../tekton_in_kind.sh). +Alternatively: + +1. Install Tekton Pipeline: +```bash +kubectl apply -f https://storage.googleapis.com/tekton-releases/pipeline/previous/v0.25.0/release.yaml +``` + +2. Install Tekton Triggers: +```bash +kubectl apply -f https://storage.googleapis.com/tekton-releases/triggers/previous/v0.14.2/release.yaml +kubectl apply -f https://storage.googleapis.com/tekton-releases/triggers/previous/v0.14.2/interceptors.yaml +``` + +3. Install Tekton Dashboard (optional): +```bash +kubectl apply -f https://github.com/tektoncd/dashboard/releases/download/v0.17.0/tekton-dashboard-release.yaml +``` + +### Configure Tekton Pipeline + +The Tekton pipeline uses some alpha features (Tekton Bundles) which needs to +be enabled in the config. The `feature-flags` config map in the `tekton-pipelines` namespace +should look like: + +```yaml +apiVersion: v1 +data: + enable-api-fields: alpha # <------- + disable-affinity-assistant: "false" + disable-creds-init: "false" + disable-home-env-overwrite: "true" + disable-working-directory-overwrite: "true" + enable-custom-tasks: "false" + enable-tekton-oci-bundles: "false" + require-git-ssh-secret-known-hosts: "false" + running-in-environment-with-injected-sidecars: "true" +kind: ConfigMap +(...) +``` + +### Install Tekton CloudEvents Controller + +Nightly builds are not available yet, so this has to be installed from source. +Requires: + +- go 1.16+ +- `GO111MODULE=on` +- [`ko`](https://github.com/google/ko) + +Clone the [tekton experimental repo](https://github.com/tektoncd/experimental). + +Setup `KO_DOCKER_REPO` to point to your container registry (or `kind.local` when using kind). +Note than when using a private container registry, the tekton cloudevents controller service account +will need to have access via `imagePullSecrets`. + +Move to the cloned folder: +``` +cd cloudevents +ko apply -f config/ +``` + +### Configure Tekton CloudEvents Controller + +The `config-defaults` config map in the `tekton-cloudevents` namespace should look like: + +```yaml +apiVersion: v1 +kind: ConfigMap +data: + default-cloud-events-sink: http:// +(...) +``` + +## Install Tekton Resources + +Install all the yaml files: + +```bash +kubectl create -f poc/tekton +``` + +## Run the build pipeline + +Prerequisites: +- `tkn` (github.com/tektoncd/cli) +- Push access to a container registry. The `dockerconfig` secret in the example below is called `regcred` + +```bash +tkn pipeline start build-artifact -w name=sources,volumeClaimTemplateFile=poc/tekton/workspace-template.yaml -w name=dockerconfig,secret=regcred +``` diff --git a/PoC/tekton/ingress.yaml b/PoC/tekton/ingress.yaml new file mode 100644 index 0000000..ec8b2ac --- /dev/null +++ b/PoC/tekton/ingress.yaml @@ -0,0 +1,16 @@ +apiVersion: extensions/v1beta1 +kind: Ingress +metadata: + name: ingress-resource + namespace: cdevents + annotations: + kubernetes.io/ingress.class: nginx + nginx.ingress.kubernetes.io/ssl-redirect: "false" +spec: + rules: + - http: + paths: + - path: / + backend: + serviceName: el-cdevent-listener + servicePort: 8000 diff --git a/PoC/tekton/rbac.yaml b/PoC/tekton/rbac.yaml new file mode 100644 index 0000000..d1ded59 --- /dev/null +++ b/PoC/tekton/rbac.yaml @@ -0,0 +1,156 @@ +kind: Role +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: triggers-minimal +rules: +- apiGroups: [""] + resources: ["configmaps", "secrets"] + verbs: ["get", "list", "watch"] +- apiGroups: ["triggers.tekton.dev"] + resources: ["eventlisteners", "triggerbindings", "triggertemplates", "triggers"] + verbs: ["get", "list", "watch"] +- apiGroups: ["tekton.dev"] + resources: ["pipelineruns", "pipelineresources", "taskruns"] + verbs: ["create"] +- apiGroups: [""] + resources: ["serviceaccounts"] + verbs: ["impersonate"] +--- +kind: ClusterRole +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: triggers-minimal-ci +rules: +# EventListeners need to be able to fetch any clustertriggerbindings +- apiGroups: ["triggers.tekton.dev"] + resources: ["clustertriggerbindings"] + verbs: ["get", "list", "watch"] +--- +apiVersion: v1 +kind: ServiceAccount +metadata: + name: build-bot +--- +apiVersion: v1 +kind: ServiceAccount +metadata: + name: tekton-ci-workspace-listener +secrets: +- name: ci-webhook +--- +apiVersion: v1 +kind: ServiceAccount +metadata: + name: tekton-ci-jobs +secrets: +- name: ci-webhook +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + name: tekton-ci-workspace-listener-triggers-minimal +subjects: +- kind: ServiceAccount + name: tekton-ci-workspace-listener +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: triggers-minimal +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + name: tekton-ci-jobs-triggers-minimal +subjects: +- kind: ServiceAccount + name: tekton-ci-jobs +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: triggers-minimal +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: tekton-ci-workspace-listener-triggers-minimal-ci +subjects: +- kind: ServiceAccount + name: tekton-ci-workspace-listener + namespace: default +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: triggers-minimal +--- +kind: Role +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: config-map-admin +rules: +- apiGroups: [""] + resources: ["configmaps"] + verbs: ["*"] +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + name: default-config-map-admin +subjects: +- kind: ServiceAccount + name: default +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: config-map-admin +--- +kind: ClusterRole +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: tekton-ci-jobs-triggers +rules: +- apiGroups: ["triggers.tekton.dev"] + resources: ["eventlisteners", "triggerbindings", "triggertemplates", "triggers", "clustertriggerbindings"] + verbs: ["get", "list", "watch"] +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: tekton-ci-jobs-triggers-tekton-ci-workspace-listener +subjects: +- kind: ServiceAccount + name: tekton-ci-workspace-listener + namespace: default +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: tekton-ci-jobs-triggers +--- +kind: Role +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: deployer2default +rules: +- apiGroups: [""] + resources: ["pods", "services"] + verbs: ["*"] +- apiGroups: ["apps"] + resources: ["deployments", "replicasets", "deployments/scale"] + verbs: ["*"] +- apiGroups: [""] + resources: ["configmaps", "secrets"] + verbs: ["get", "list", "watch"] +- apiGroups: ["networking.k8s.io"] + resources: ["ingresses"] + verbs: ["*"] +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + name: default-deployer2default +subjects: +- kind: ServiceAccount + name: default +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: deployer2default \ No newline at end of file diff --git a/pom.xml b/pom.xml index 9772e59..12f9f04 100644 --- a/pom.xml +++ b/pom.xml @@ -214,7 +214,6 @@ scm:git:git://github.com/${gitHubRepo}.git scm:git:git@github.com:${gitHubRepo}.git https://github.com/${gitHubRepo} - cloudevents-1.0.0 diff --git a/pom.xml.releaseBackup b/pom.xml.releaseBackup deleted file mode 100644 index 8218068..0000000 --- a/pom.xml.releaseBackup +++ /dev/null @@ -1,233 +0,0 @@ - - - 4.0.0 - - - org.jenkins-ci.plugins - plugin - 4.16 - - - - io.jenkins.plugins - cloudevents - ${revision}${changelist} - hpi - - - 1.0.0 - -SNAPSHOT - 2.277.4 - 8 - jenkinsci/${project.artifactId}-plugin - - - CloudEvents Plugin - https://github.com/jenkinsci/${project.artifactId}-plugin - Emit and Consume CloudEvents in Jenkins. - - - - - io.jenkins.tools.bom - bom-2.277.x - 26 - import - pom - - - - org.jenkins-ci.plugins - jackson2-api - 2.11.3 - - - - - - - - MIT License - https://opensource.org/licenses/MIT - - - - - - ShrutiC-git - Shruti Chaturvedi - shrutichaturvedi16.sc@gmail.com - - - - - - - com.mashape.unirest - unirest-java - 1.4.9 - - - - - io.cloudevents - cloudevents-core - 2.0.0 - - - - io.cloudevents - cloudevents-http-basic - 2.0.0 - - - - io.cloudevents - cloudevents-api - 2.1.0 - - - - io.jenkins - configuration-as-code - 1.35 - true - - - - - - org.json - json - 20190722 - - - - org.junit.jupiter - junit-jupiter-engine - 5.2.0 - test - - - - - org.mockito - mockito-core - 3.7.7 - test - - - - org.mockito - mockito-inline - 2.13.0 - test - - - - - org.powermock - powermock-module-junit4 - 2.0.9 - test - - - - - - - io.jenkins.plugins - plugin-util-api - 2.0.0 - - - - - javax.servlet - javax.servlet-api - 4.0.1 - provided - - - - com.fasterxml.jackson.core - jackson-annotations - 2.12.0 - - - com.fasterxml.jackson.core - jackson-databind - 2.12.0 - - - io.jenkins.configuration-as-code - test-harness - 1.35 - test - - - org.jetbrains - annotations - RELEASE - compile - - - - - - - - org.jacoco - jacoco-maven-plugin - 0.8.6 - - - default-prepare-agent - - prepare-agent - - - - report - prepare-package - - report - - - - - - - org.apache.maven.plugins - maven-surefire-plugin - 2.20 - - - - - - scm:git:git://github.com/${gitHubRepo}.git - scm:git:git@github.com:${gitHubRepo}.git - https://github.com/${gitHubRepo} - cloudevents-1.0.0 - - - - - repo.jenkins-ci.org - https://repo.jenkins-ci.org/public/ - - - - - - repo.jenkins-ci.org - https://repo.jenkins-ci.org/public/ - - - diff --git a/release.properties b/release.properties deleted file mode 100644 index 1937ed9..0000000 --- a/release.properties +++ /dev/null @@ -1,20 +0,0 @@ -#release configuration -#Wed Aug 11 21:00:38 IST 2021 -scm.commentPrefix=[maven-release-plugin] -project.dev.io.jenkins.plugins\:cloudevents=1.0.1-SNAPSHOT -project.rel.io.jenkins.plugins\:cloudevents=1.0.0 -project.scm.io.jenkins.plugins\:cloudevents.developerConnection=scm\:git\:git@github.com\:${gitHubRepo}.git -project.scm.io.jenkins.plugins\:cloudevents.tag=cloudevents-1.0.0 -pushChanges=true -scm.tag=cloudevents-1.0.0 -remoteTagging=true -project.scm.io.jenkins.plugins\:cloudevents.connection=scm\:git\:git\://github.com/${gitHubRepo}.git -exec.additionalArguments=-P consume-incrementals,might-produce-incrementals -project.scm.io.jenkins.plugins\:cloudevents.url=https\://github.com/${gitHubRepo} -projectVersionPolicyId=default -scm.url=scm\:git\:git@github.com\:jenkinsci/cloudevents-plugin.git -scm.tagNameFormat=@{project.artifactId}-@{project.version} -preparationGoals=clean install -exec.snapshotReleasePluginAllowed=false -completedPhase=end-release -completionGoals=incrementals\:reincrementalify