You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by dp...@apache.org on 2019/03/11 17:10:12 UTC

[ignite-teamcity-bot] branch ignite-11461-2 created (now c9070e1)

This is an automated email from the ASF dual-hosted git repository.

dpavlov pushed a change to branch ignite-11461-2
in repository https://gitbox.apache.org/repos/asf/ignite-teamcity-bot.git.


      at c9070e1  IGNITE-11491: Revisions were added to JAXB model for TC Bot

This branch includes the following new commits:

     new c9070e1  IGNITE-11491: Revisions were added to JAXB model for TC Bot

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[ignite-teamcity-bot] 01/01: IGNITE-11491: Revisions were added to JAXB model for TC Bot

Posted by dp...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

dpavlov pushed a commit to branch ignite-11461-2
in repository https://gitbox.apache.org/repos/asf/ignite-teamcity-bot.git

commit c9070e1ef312da8a443dd0a051573abff63e10c0
Author: Dmitriy Pavlov <dp...@apache.org>
AuthorDate: Mon Mar 11 20:09:49 2019 +0300

    IGNITE-11491: Revisions were added to JAXB model for TC Bot
---
 .../apache/ignite/ci/tcmodel/ParameterType.java    |  1 -
 .../org/apache/ignite/ci/tcmodel/result/Build.java | 10 ++++--
 .../org/apache/ignite/ci/tcmodel/vcs/Revision.java | 38 ++++++++++++++++++++++
 .../apache/ignite/ci/tcmodel/vcs/Revisions.java    | 16 +++++++++
 .../ignite/ci/tcmodel/vcs/VcsRootInstance.java     | 34 +++++++++++++++++++
 .../ignited/IgnitedTcInMemoryIntegrationTest.java  |  7 ++++
 6 files changed, 102 insertions(+), 4 deletions(-)

diff --git a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/tcmodel/ParameterType.java b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/tcmodel/ParameterType.java
index 3e49969..bdfd766 100644
--- a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/tcmodel/ParameterType.java
+++ b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/tcmodel/ParameterType.java
@@ -44,7 +44,6 @@ import javax.xml.bind.annotation.XmlType;
 @XmlAccessorType(XmlAccessType.FIELD)
 @XmlType(name = "parameterType")
 public class ParameterType {
-
     @XmlAttribute(name = "rawValue")
     protected String rawValue;
 
diff --git a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/tcmodel/result/Build.java b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/tcmodel/result/Build.java
index 59f9eae..3165200 100644
--- a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/tcmodel/result/Build.java
+++ b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/tcmodel/result/Build.java
@@ -29,12 +29,10 @@ import javax.xml.bind.annotation.XmlElement;
 import javax.xml.bind.annotation.XmlElementWrapper;
 import javax.xml.bind.annotation.XmlRootElement;
 import javax.xml.bind.annotation.XmlTransient;
-import org.apache.ignite.ci.analysis.IVersionedEntity;
-import org.apache.ignite.ci.tcmodel.changes.ChangesList;
 import org.apache.ignite.ci.tcmodel.changes.ChangesListRef;
 import org.apache.ignite.ci.tcmodel.conf.BuildType;
 import org.apache.ignite.ci.tcmodel.hist.BuildRef;
-
+import org.apache.ignite.ci.tcmodel.vcs.Revisions;
 import org.jetbrains.annotations.NotNull;
 
 import static org.apache.ignite.ci.util.ExceptionUtil.propagateException;
@@ -71,6 +69,8 @@ public class Build extends BuildRef {
     /** Information about build triggering. */
     @XmlElement(name = "triggered") private Triggered triggered;
 
+    @XmlElement(name = "revisions") private Revisions revisions;
+
     @NotNull public static Build createFakeStub() {
         return new Build();
     }
@@ -170,4 +170,8 @@ public class Build extends BuildRef {
     public void snapshotDependencies(List<BuildRef> dependencies) {
         snapshotDependencies = dependencies;
     }
+
+    public Revisions getRevisions() {
+        return revisions;
+    }
 }
diff --git a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/tcmodel/vcs/Revision.java b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/tcmodel/vcs/Revision.java
new file mode 100644
index 0000000..193d2e1
--- /dev/null
+++ b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/tcmodel/vcs/Revision.java
@@ -0,0 +1,38 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.
+ */
+
+package org.apache.ignite.ci.tcmodel.vcs;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+
+/**
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+public class Revision {
+    @XmlAttribute(name = "version")
+    private String version;
+
+    @XmlAttribute(name = "vcs-root-id")
+    private String vcsBranchName;
+
+    @XmlElement(name = "vcs-root-instance")
+    private VcsRootInstance vcsRootInstance;
+}
diff --git a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/tcmodel/vcs/Revisions.java b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/tcmodel/vcs/Revisions.java
new file mode 100644
index 0000000..6a91379
--- /dev/null
+++ b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/tcmodel/vcs/Revisions.java
@@ -0,0 +1,16 @@
+package org.apache.ignite.ci.tcmodel.vcs;
+
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+
+@XmlAccessorType(XmlAccessType.FIELD)
+public class Revisions {
+    @XmlAttribute(name = "count")
+    private Integer count;
+
+    @XmlElement(name = "revision")
+    List<Revision> revisions;
+}
diff --git a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/tcmodel/vcs/VcsRootInstance.java b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/tcmodel/vcs/VcsRootInstance.java
new file mode 100644
index 0000000..188b6b1
--- /dev/null
+++ b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/tcmodel/vcs/VcsRootInstance.java
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.
+ */
+
+package org.apache.ignite.ci.tcmodel.vcs;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+
+/**
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+public class VcsRootInstance {
+    @XmlAttribute(name = "id")
+    private Integer id;
+
+    @XmlAttribute(name = "vcs-root-id")
+    private String vcsRootId;
+}
diff --git a/ignite-tc-helper-web/src/test/java/org/apache/ignite/ci/teamcity/ignited/IgnitedTcInMemoryIntegrationTest.java b/ignite-tc-helper-web/src/test/java/org/apache/ignite/ci/teamcity/ignited/IgnitedTcInMemoryIntegrationTest.java
index 1f5087e..e9b2d0b 100644
--- a/ignite-tc-helper-web/src/test/java/org/apache/ignite/ci/teamcity/ignited/IgnitedTcInMemoryIntegrationTest.java
+++ b/ignite-tc-helper-web/src/test/java/org/apache/ignite/ci/teamcity/ignited/IgnitedTcInMemoryIntegrationTest.java
@@ -63,6 +63,7 @@ import org.apache.ignite.ci.tcmodel.result.problems.ProblemOccurrence;
 import org.apache.ignite.ci.tcmodel.result.problems.ProblemOccurrences;
 import org.apache.ignite.ci.tcmodel.result.stat.Statistics;
 import org.apache.ignite.ci.tcmodel.result.tests.TestOccurrencesFull;
+import org.apache.ignite.ci.tcmodel.vcs.Revisions;
 import org.apache.ignite.ci.teamcity.ignited.buildref.BuildRefDao;
 import org.apache.ignite.ci.teamcity.ignited.buildtype.BuildTypeRefCompacted;
 import org.apache.ignite.ci.teamcity.ignited.fatbuild.FatBuildCompacted;
@@ -513,6 +514,12 @@ public class IgnitedTcInMemoryIntegrationTest {
         int[] ch = buildCompacted.changes();
 
         assertEquals(6, ch.length);
+
+        final Revisions refRevisions = refBuild.getRevisions();
+        final Revisions actRevisions = actBuild.getRevisions();
+        assertNotNull(refRevisions);
+        assertNotNull(actRevisions);
+
     }
 
     private void saveTmpFile(Object obj, String name) throws IOException, JAXBException {