diff --git a/.circleci/config.yml b/.circleci/config.yml index 97f3e26..79c0208 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -11,8 +11,13 @@ install_deploysuite: &install_deploysuite git clone --branch v1.3 https://github.com/topcoder-platform/tc-deploy-scripts ../buildscript cp ./../buildscript/master_deploy.sh . cp ./../buildscript/buildenv.sh . - cp ./../buildscript/awsconfiguration.sh . - + cp ./../buildscript/awsconfiguration.sh . + +maven_configuration_v1: &maven_configuration_v1 + name: Configuring maven + command: | + sudo sed -i '//,/<\/mirror>/d' /opt/apache-maven/conf/settings.xml + build_steps: &build_steps # Initialization1. - checkout @@ -23,7 +28,8 @@ build_steps: &build_steps sudo apt update sudo apt install jq sudo apt install awscli - - setup_remote_docker + - setup_remote_docker + - run: *maven_configuration_v1 - restore_cache: key: ap-review-microservice-{{ checksum "~/project/service/pom.xml" }} - run: mvn -f ~/project/service/pom.xml dependency:go-offline @@ -88,7 +94,7 @@ workflows: branches: only: - dev - - dev-msinteg + - feature/jira-plat-130 - dev-ecs - "build-prod": context : org-global @@ -96,4 +102,4 @@ workflows: branches: only: - master - - master-ecs \ No newline at end of file + - master-ecs diff --git a/service/src/main/java/com/appirio/service/review/manager/ScoreManager.java b/service/src/main/java/com/appirio/service/review/manager/ScoreManager.java index 713b222..d06d33e 100644 --- a/service/src/main/java/com/appirio/service/review/manager/ScoreManager.java +++ b/service/src/main/java/com/appirio/service/review/manager/ScoreManager.java @@ -72,7 +72,11 @@ public ScoreManager() throws SupplyException { ReviewItemDAO.class); this.scoreDAO = DAOFactory.getInstance().createDAO(ScoreDAO.class); this.projectResultDAO = DAOFactory.getInstance().createDAO(ProjectResultDAO.class); - this.eventProducer = EventProducer.getInstance(); + /** + //jira-plat-130, hard cut the legacy publishing + this.eventProducer = EventProducer.getInstance(); + */ + this.eventProducer = null; } /** @@ -356,7 +360,13 @@ public void updateScores(List reviewItems, AuthUser auth) throws Exc private void publishKafkaEvent(JsonNode json, String topic) { // fire an event on to the kafka bus try { - eventProducer.publish(topic, json); + if (eventProducer != null) { + eventProducer.publish(topic, json); + } else { + // jira-plat-130, hard cut the leagacy kafka + + logger.info("jira-plat-130, hard cut the legacy publishing for topic: " + topic); + } } catch (EmptyEventException e) { logger.info("Failed to publish message " + e.getMessage()); } catch (EncodingEventException e) {