private void completeDeployment( BundleResourceDeployment resourceDeployment, BundleDeploymentStatus status, String message) { getBundleServerService().setBundleDeploymentStatus(resourceDeployment.getId(), status); BundleResourceDeploymentHistory.Status auditStatus = BundleDeploymentStatus.SUCCESS.equals(status) ? BundleResourceDeploymentHistory.Status.SUCCESS : BundleResourceDeploymentHistory.Status.FAILURE; auditDeployment( resourceDeployment, AUDIT_DEPLOYMENT_ENDED, resourceDeployment.getBundleDeployment().getName(), null, auditStatus, message, null); }
public void auditDeployment( BundleResourceDeployment bundleResourceDeployment, String action, String info, BundleResourceDeploymentHistory.Category category, BundleResourceDeploymentHistory.Status status, String message, String attachment) { if (null == action || null == info) { throw new IllegalArgumentException("action or info is null"); } if (null == status) { status = BundleResourceDeploymentHistory.Status.SUCCESS; } BundleResourceDeploymentHistory history = new BundleResourceDeploymentHistory( "Bundle Plugin", action, info, category, status, message, attachment); log.debug("Reporting deployment step [" + history + "] to Server..."); getBundleServerService().addDeploymentHistory(bundleResourceDeployment.getId(), history); }