Skip to content

Commit

Permalink
Merge pull request #7 from takipi/feature/INTG-199
Browse files Browse the repository at this point in the history
[INTG-199] Bamboo - CI/CD UX Redesign
  • Loading branch information
daverted authored Apr 27, 2020
2 parents ba40d2b + 037aa5b commit 01c2747
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 13 deletions.
47 changes: 35 additions & 12 deletions src/main/java/com/overops/plugins/bamboo/TaskType.java
Original file line number Diff line number Diff line change
Expand Up @@ -114,18 +114,41 @@ private QualityReportParams getQualityReportParams(ConfigurationMap params) {
qrp.setNewEvents(Boolean.parseBoolean(params.get(Const.CHECK_NEW_ERRORS)));
qrp.setResurfacedErrors(Boolean.parseBoolean(params.get(Const.CHECK_RESURFACED_ERRORS)));

qrp.setMaxErrorVolume(NumberUtils.toInt(params.get(Const.MAX_ERROR_VOLUME), 0));
qrp.setMaxUniqueErrors(NumberUtils.toInt(params.get(Const.MAX_UNIQUE_ERRORS), 0));

qrp.setCriticalExceptionTypes(params.getOrDefault(Const.CRITICAL_EXCEPTION_TYPES, ""));

qrp.setActiveTimespan(params.get(Const.ACTIVE_TIMESPAN));
qrp.setBaselineTimespan(params.get(Const.BASELINE_TIMESPAN));
qrp.setMinVolumeThreshold(NumberUtils.toInt(params.get(Const.MIN_VOLUME_THRESHOLD), 0));
qrp.setMinErrorRateThreshold(NumberUtils.toDouble(params.get(Const.MIN_RATE_THRESHOLD), 0));
qrp.setRegressionDelta(NumberUtils.toDouble(params.get(Const.REGRESSION_DELTA), 0));
qrp.setCriticalRegressionDelta(NumberUtils.toDouble(params.get(Const.CRITICAL_REGRESSION_THRESHOLD), 0));
qrp.setApplySeasonality(Boolean.parseBoolean(params.get(Const.APPLY_SEASONALITY)));
if (Boolean.parseBoolean(params.get(Const.CHECK_VOLUME_ERRORS))) {
qrp.setMaxErrorVolume(Math.max(1, NumberUtils.toInt(params.get(Const.MAX_ERROR_VOLUME), 1)));
} else {
qrp.setMaxErrorVolume(0);
}

if (Boolean.parseBoolean(params.get(Const.CHECK_UNIQUE_ERRORS))) {
qrp.setMaxUniqueErrors(Math.max(1, NumberUtils.toInt(params.get(Const.MAX_UNIQUE_ERRORS), 1)));
} else {
qrp.setMaxUniqueErrors(0);
}

if (Boolean.parseBoolean(params.get(Const.CHECK_CRITICAL_ERRORS))) {
qrp.setCriticalExceptionTypes(params.getOrDefault(Const.CRITICAL_EXCEPTION_TYPES, ""));
} else {
qrp.setCriticalExceptionTypes("");
}

if (Boolean.parseBoolean(params.get(Const.CHECK_INCREASING_ERRORS))) {
qrp.setActiveTimespan(params.get(Const.ACTIVE_TIMESPAN));
qrp.setBaselineTimespan(params.get(Const.BASELINE_TIMESPAN));
qrp.setMinVolumeThreshold(NumberUtils.toInt(params.get(Const.MIN_VOLUME_THRESHOLD), 0));
qrp.setMinErrorRateThreshold(NumberUtils.toDouble(params.get(Const.MIN_RATE_THRESHOLD), 0));
qrp.setRegressionDelta(NumberUtils.toDouble(params.get(Const.REGRESSION_DELTA), 0));
qrp.setCriticalRegressionDelta(NumberUtils.toDouble(params.get(Const.CRITICAL_REGRESSION_THRESHOLD), 0));
qrp.setApplySeasonality(Boolean.parseBoolean(params.get(Const.APPLY_SEASONALITY)));
} else {
qrp.setActiveTimespan("0");
qrp.setBaselineTimespan("0");
qrp.setMinVolumeThreshold(0);
qrp.setMinErrorRateThreshold(0);
qrp.setRegressionDelta(0);
qrp.setCriticalRegressionDelta(0);
qrp.setApplySeasonality(false);
}

qrp.setDebug(Boolean.parseBoolean(params.get(Const.DEBUG)));
return qrp;
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/templates/editTaskConfig.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@

<h3>General settings</h3>
[@ww.textfield labelKey="com.overops.plugins.bamboo.task.config.envId" name="envId" required="false" description="The OverOps environment identifier (e.g S12345). If blank, the <a href=\"/plugins/servlet/overops/admin\">default value</a> is used."/]
[@ww.textfield labelKey="com.overops.plugins.bamboo.task.config.applicationName" name="applicationName" required="false" description="<em>(Optional)</em> Application Name as specified in OverOps. If blank, a Deplyment Name must be provided."/]
[@ww.textfield labelKey="com.overops.plugins.bamboo.task.config.applicationName" name="applicationName" required="false" description="<em>(Optional)</em> Application Name as specified in OverOps. If blank, a Deployment Name must be provided."/]
[@ww.textfield labelKey="com.overops.plugins.bamboo.task.config.deploymentName" name="deploymentName" required="false" description="<em>(Optional)</em> Deployment Name as specified in OverOps. If blank, an Application Name must be provided. See: <a href='https://confluence.atlassian.com/bamboo/bamboo-variables-289277087.html' target='_blank' rel='nofollow'>Bamboo variables</a>"/]
<hr class="divider"/>
[@ww.textfield labelKey="com.overops.plugins.bamboo.task.config.regexFilter" name="regexFilter" required="false" description="<em>(Optional)</em> Ignore specific event types when generating the OverOps Reliability report. Event types include: <em>Uncaught Exception, Caught Exception, Swallowed Exception, Logged Error, Logged Warning, Timer</em>. For example: <code class='inline'>\"type\":\"s*(Logged Error|Logged Warning|Timer)\"</code>" /]
Expand Down

0 comments on commit 01c2747

Please sign in to comment.