diff --git a/gradle.properties b/gradle.properties index 547cf96..96626b0 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,5 +1,5 @@ name=plugin-import-robot -version=24.2-SNAPSHOT +version=24.3-SNAPSHOT description=Reinforce your ReportPortal instance with RobotFramework Import functionality and easily upload your log files right to ReportPortal. pluginId=RobotFramework lombokVersion=1.18.30 diff --git a/jars/plugin-import-robot-24.3-SNAPSHOT-all.jar b/jars/plugin-import-robot-24.3-SNAPSHOT-all.jar new file mode 100644 index 0000000..ed4fda9 Binary files /dev/null and b/jars/plugin-import-robot-24.3-SNAPSHOT-all.jar differ diff --git a/plugin/build.gradle b/plugin/build.gradle index a5a34d5..d618089 100644 --- a/plugin/build.gradle +++ b/plugin/build.gradle @@ -2,7 +2,6 @@ plugins { id "io.spring.dependency-management" version "1.0.9.RELEASE" id 'java' id 'jacoco' - id 'com.github.johnrengelman.shadow' version '5.2.0' id "com.moowork.node" version "1.3.1" } @@ -23,6 +22,8 @@ npm_run_build { } apply from: 'project-properties.gradle' +apply from: scriptsUrl + '/release-fat.gradle' +apply from: scriptsUrl + '/signing.gradle' repositories { mavenLocal() @@ -38,10 +39,10 @@ dependencies { implementation 'com.epam.reportportal:plugin-api' annotationProcessor 'com.epam.reportportal:plugin-api' } else { - implementation 'com.github.reportportal:commons-dao:28d0461' - implementation 'com.github.reportportal:commons:a30c7bb' - implementation 'com.github.reportportal:plugin-api:a9a8b73' - annotationProcessor 'com.github.reportportal:plugin-api:a9a8b73' + implementation 'com.github.reportportal:commons-dao:develop-SNAPSHOT' + implementation 'com.github.reportportal:commons:develop-SNAPSHOT' + implementation 'com.github.reportportal:plugin-api:develop-SNAPSHOT' + annotationProcessor 'com.github.reportportal:plugin-api:develop-SNAPSHOT' } implementation 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.12.7' implementation 'org.hibernate:hibernate-core:5.4.18.Final' diff --git a/plugin/src/main/java/com/epam/reportportal/extension/robot/service/RobotXmlParser.java b/plugin/src/main/java/com/epam/reportportal/extension/robot/service/RobotXmlParser.java index 3aaa0d5..38193df 100644 --- a/plugin/src/main/java/com/epam/reportportal/extension/robot/service/RobotXmlParser.java +++ b/plugin/src/main/java/com/epam/reportportal/extension/robot/service/RobotXmlParser.java @@ -243,6 +243,7 @@ private void handleMsgElement(Element element) { LogLevel level = RobotMapper.mapLogLevel(element.getAttribute(ATTR_LEVEL.val())); SaveLogRQ saveLogRQ = new SaveLogRQ(); + saveLogRQ.setLaunchUuid(launchUuid); saveLogRQ.setLevel(level.name()); saveLogRQ.setLogTime(logTime); saveLogRQ.setMessage(msg.trim()); @@ -288,6 +289,7 @@ private void finishTestItem() { if (itemInfo != null) { final FinishTestItemRQ rq = new FinishTestItemRQ(); markAsNotIssue(rq, itemInfo.getStatus()); + rq.setLaunchUuid(launchUuid); rq.setStatus(itemInfo.getStatus().name()); rq.setEndTime(itemInfo.getEndTime()); eventPublisher.publishEvent(new FinishItemRqEvent(this, projectName, itemInfo.getUuid(), rq)); diff --git a/plugin/src/main/java/com/epam/reportportal/extension/robot/service/ZipImportStrategy.java b/plugin/src/main/java/com/epam/reportportal/extension/robot/service/ZipImportStrategy.java index 45e47eb..e0da5ac 100644 --- a/plugin/src/main/java/com/epam/reportportal/extension/robot/service/ZipImportStrategy.java +++ b/plugin/src/main/java/com/epam/reportportal/extension/robot/service/ZipImportStrategy.java @@ -29,6 +29,8 @@ import java.util.function.Predicate; import java.util.zip.ZipEntry; import java.util.zip.ZipFile; + +import lombok.extern.slf4j.Slf4j; import org.apache.commons.io.FilenameUtils; import org.springframework.context.ApplicationEventPublisher; import org.springframework.web.multipart.MultipartFile; @@ -36,6 +38,7 @@ /** * @author Ivan Budayeu */ +@Slf4j public class ZipImportStrategy extends AbstractImportStrategy { private static final Predicate isFile = zipEntry -> !zipEntry.isDirectory(); @@ -64,14 +67,15 @@ public String importLaunch(MultipartFile file, String projectName, LaunchImportR updateStartTime(launchUuid, robotXmlParser.getLowestTime()); return launchUuid; } catch (Exception e) { - e.printStackTrace(); + log.error(cleanMessage(e)); + log.info("Exception during launch import for launch '{}'", launchUuid); updateBrokenLaunch(launchUuid); throw new ReportPortalException(ErrorType.IMPORT_FILE_ERROR, cleanMessage(e)); } finally { try { Files.deleteIfExists(zip.getAbsoluteFile().toPath()); } catch (IOException e) { - e.printStackTrace(); + log.error(cleanMessage(e)); } } }