Skip to content

Commit

Permalink
[INTG-199] Bamboo - CI/CD UX Redesign
Browse files Browse the repository at this point in the history
  • Loading branch information
angelorod committed Apr 24, 2020
1 parent 66fb194 commit aee94c8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
3 changes: 1 addition & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
<maven.compiler.target>1.8</maven.compiler.target>
<!-- api-client local dev build with https://github.com/takipi/api-client/pull/147 -->
<takipi.version>2.33.0</takipi.version>
<report.version>2.32.0</report.version>
</properties>

<dependencies>
Expand Down Expand Up @@ -104,7 +103,7 @@
<dependency>
<groupId>com.takipi</groupId>
<artifactId>report-service</artifactId>
<version>${report.version}</version>
<version>${takipi.version}</version>
</dependency>


Expand Down
8 changes: 7 additions & 1 deletion src/main/java/com/overops/plugins/bamboo/TaskType.java
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
package com.overops.plugins.bamboo;

import java.io.PrintWriter;
import java.io.PrintStream;
import java.io.StringWriter;
import java.util.HashMap;
import java.util.Map;


import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.math.NumberUtils;
import com.atlassian.bamboo.build.logger.BuildLogger;
Expand All @@ -23,6 +25,7 @@
import com.fasterxml.jackson.databind.ObjectMapper;

import com.overops.plugins.bamboo.configuration.Const;
import com.overops.plugins.bamboo.service.impl.BambooPrintWriter;
import com.overops.report.service.QualityReportParams;
import com.overops.report.service.ReportService;
import com.overops.report.service.ReportService.Requestor;
Expand Down Expand Up @@ -70,7 +73,10 @@ public TaskResult execute(@NotNull TaskContext context) throws TaskException {
try {
logger.addBuildLogEntry("[" + Utils.getArtifactId() + " v" + Utils.getVersion() + "]");

QualityReport reportModel = overOpsService.runQualityReport(endPoint, apiKey, query, Requestor.BAMBOO, logger, Boolean.parseBoolean(context.getConfigurationMap().get(Const.DEBUG)));
boolean isDebug = Boolean.parseBoolean(context.getConfigurationMap().get(Const.DEBUG));
PrintStream printStream = isDebug ? new BambooPrintWriter(System.out, logger) : null;

QualityReport reportModel = overOpsService.runQualityReport(endPoint, apiKey, query, Requestor.BAMBOO, printStream, isDebug);

context.getBuildContext().getBuildResult().getCustomBuildData().put("overOpsReport", objectMapper.writeValueAsString(reportModel.getHtmlParts()));
context.getBuildContext().getBuildResult().getCustomBuildData().put("isOverOpsStep", "true");
Expand Down

0 comments on commit aee94c8

Please sign in to comment.