|
|
@@ -0,0 +1,75 @@
|
|
|
+package cn.seecoder.web.model.vo.hook;
|
|
|
+
|
|
|
+import com.fasterxml.jackson.annotation.JsonProperty;
|
|
|
+import io.swagger.annotations.ApiModel;
|
|
|
+import lombok.Data;
|
|
|
+import lombok.NoArgsConstructor;
|
|
|
+import lombok.ToString;
|
|
|
+
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
+@Data
|
|
|
+@ToString
|
|
|
+@ApiModel("sonar hook 传回结果VO")
|
|
|
+public class SonarResultHookVO {
|
|
|
+ private String serverUrl;
|
|
|
+ private String taskId;
|
|
|
+ private String status;
|
|
|
+ private String analysedAt;
|
|
|
+ private String revision;
|
|
|
+ private String changedAt;
|
|
|
+ private Project project;
|
|
|
+ private Branch branch;
|
|
|
+ private QualityGate qualityGate;
|
|
|
+ private Properties properties;
|
|
|
+
|
|
|
+ @Data
|
|
|
+ @NoArgsConstructor
|
|
|
+ private static class Project{
|
|
|
+ private String key;
|
|
|
+ private String name;
|
|
|
+ private String url;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Data
|
|
|
+ @NoArgsConstructor
|
|
|
+ private static class Branch{
|
|
|
+ private String name;
|
|
|
+ private String type;
|
|
|
+ private Boolean isMain;
|
|
|
+ private String url;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Data
|
|
|
+ @NoArgsConstructor
|
|
|
+ private static class QualityGate{
|
|
|
+ private String name;
|
|
|
+ private String status;
|
|
|
+ private List<Condition> conditions;
|
|
|
+
|
|
|
+ @Data
|
|
|
+ @NoArgsConstructor
|
|
|
+ private static class Condition{
|
|
|
+ private String metric;
|
|
|
+ private String operator;
|
|
|
+ private String value;
|
|
|
+ private String status;
|
|
|
+ private String errorThreshold;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ private static class Properties{
|
|
|
+ @JsonProperty("sonar.analysis.detectedscm")
|
|
|
+ private String detectedscm;
|
|
|
+ @JsonProperty("sonar.analysis.detectedci")
|
|
|
+ private String detectedci;
|
|
|
+ @JsonProperty("sonar.analysis.projectId")
|
|
|
+ private String projectId;
|
|
|
+ @JsonProperty("sonar.analysis.imageTag")
|
|
|
+ private String imageTag;
|
|
|
+ @JsonProperty("sonar.analysis.imageName")
|
|
|
+ private String imageName;
|
|
|
+ @JsonProperty("sonar.analysis.commitHash")
|
|
|
+ private String commitHash;
|
|
|
+ }
|
|
|
+}
|