Switch to docker hub (#29)

* Switch to docker hub

* Fix Jenkinsfile

* Fix version of kafka dep

* Bump testcontainers version, add provded scope in lombock dep

* Add kafka-streams dep, bump postgres testcontainers version

* Set logs levels for tests

* Tune logs again

* Rollback testcontainers version

* Increase kafka startup timeout
This commit is contained in:
Pavel Popov 2020-07-10 17:37:11 +03:00 committed by GitHub
parent aeb9306d2a
commit 8022324b0f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 54 additions and 69 deletions

4
Jenkinsfile vendored
View File

@ -11,8 +11,6 @@ build('fraudbusters-management', 'java-maven') {
def serviceName = env.REPO_NAME
def mvnArgs = '-DjvmArgs="-Xmx256m"'
def useJava11 = true
def registry = 'dr2.rbkmoney.com'
def registryCredsId = 'jenkins_harbor'
javaServicePipeline(serviceName, useJava11, mvnArgs, registry, registryCredsId)
javaServicePipeline(serviceName, useJava11, mvnArgs)
}

@ -1 +1 @@
Subproject commit 4e6aae0f31885d3c56d09c72de7ef8d432149dbf
Subproject commit 5cb25f049c719a608276a99fc4fbe852187019ca

92
pom.xml
View File

@ -6,7 +6,7 @@
<parent>
<groupId>com.rbkmoney</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.1.1.RELEASE</version>
<version>2.3.0.RELEASE-2</version>
</parent>
<artifactId>fraudbusters-management</artifactId>
@ -24,7 +24,7 @@
<exposed.ports>${server.port}</exposed.ports>
<dockerfile.base.service.tag>bc95d0d6dc13c693acd2b274531a7d604b877bf3</dockerfile.base.service.tag>
<dockerfile.registry>dr2.rbkmoney.com</dockerfile.registry>
<shared.resources.version>0.3.6</shared.resources.version>
<shared.resources.version>0.3.7</shared.resources.version>
<flyway.version>5.2.3</flyway.version>
<db.name>fraudbusters</db.name>
<db.port>5432</db.port>
@ -33,13 +33,12 @@
<db.password>postgres</db.password>
<db.schema>af</db.schema>
<sonar.jacoco.reportPath>${project.basedir}/target/jacoco.exec</sonar.jacoco.reportPath>
<wb.list.proto.version>1.29-4fe14c3</wb.list.proto.version>
<kafka.streams.version>2.1.0</kafka.streams.version>
<kafka.clients.version>2.1.0</kafka.clients.version>
<fraudbusters.proto.version>1.44-6db2558</fraudbusters.proto.version>
<kafka.common.lib.version>0.0.1-SNAPSHOT</kafka.common.lib.version>
<wb.list.proto.version>1.33-554d59c</wb.list.proto.version>
<fraudbusters.proto.version>1.47-357fb85</fraudbusters.proto.version>
<kafka.common.lib.version>0.1.4</kafka.common.lib.version>
<fraudo.version>0.0.17</fraudo.version>
<db.common.lib.version>0.0.2-SNAPSHOT</db.common.lib.version>
<geck.version>0.6.11</geck.version>
<db.common.lib.version>0.0.3</db.common.lib.version>
</properties>
<dependencies>
@ -47,12 +46,12 @@
<dependency>
<groupId>com.rbkmoney</groupId>
<artifactId>spring-boot-starter-metrics-statsd</artifactId>
<version>1.1.0</version>
<version>1.1.2</version>
</dependency>
<dependency>
<groupId>com.rbkmoney.woody</groupId>
<artifactId>woody-thrift</artifactId>
<version>1.1.15</version>
<version>1.1.21</version>
</dependency>
<dependency>
<groupId>com.rbkmoney</groupId>
@ -62,12 +61,12 @@
<dependency>
<groupId>com.rbkmoney.geck</groupId>
<artifactId>filter</artifactId>
<version>0.6.9</version>
<version>${geck.version}</version>
</dependency>
<dependency>
<groupId>com.rbkmoney.geck</groupId>
<artifactId>serializer</artifactId>
<version>0.6.9</version>
<version>${geck.version}</version>
</dependency>
<dependency>
<groupId>com.rbkmoney</groupId>
@ -122,6 +121,24 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jdbc</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.kafka</groupId>
<artifactId>spring-kafka</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId>
</dependency>
<!--kafka-->
<dependency>
<groupId>org.springframework.kafka</groupId>
<artifactId>spring-kafka</artifactId>
</dependency>
<dependency>
<groupId>org.apache.kafka</groupId>
<artifactId>kafka-streams</artifactId>
</dependency>
<!--third party-->
<dependency>
@ -132,7 +149,8 @@
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.4</version>
<version>${lombok.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.flywaydb</groupId>
@ -176,57 +194,24 @@
<version>2.9.2</version>
</dependency>
<!--kafka-->
<dependency>
<groupId>org.apache.kafka</groupId>
<artifactId>kafka-streams</artifactId>
<version>${kafka.streams.version}</version>
</dependency>
<dependency>
<groupId>org.apache.kafka</groupId>
<artifactId>kafka-clients</artifactId>
<version>${kafka.clients.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.kafka</groupId>
<artifactId>spring-kafka</artifactId>
<version>2.2.2.RELEASE</version>
<exclusions>
<exclusion>
<groupId>org.apache.kafka</groupId>
<artifactId>kafka-streams</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.kafka</groupId>
<artifactId>kafka-clients</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>kafka</artifactId>
<version>1.10.2</version>
<scope>test</scope>
</dependency>
<!--test-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>postgresql</artifactId>
<version>1.8.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.github.benas</groupId>
<artifactId>random-beans</artifactId>
<version>3.6.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>postgresql</artifactId>
<version>1.10.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>kafka</artifactId>
@ -236,7 +221,6 @@
<dependency>
<groupId>org.apache.kafka</groupId>
<artifactId>kafka-streams-test-utils</artifactId>
<version>2.1.0</version>
<scope>test</scope>
</dependency>
</dependencies>
@ -362,7 +346,7 @@
<plugin>
<groupId>com.rbkmoney.maven.plugins</groupId>
<artifactId>pg-embedded-plugin</artifactId>
<version>1.4</version>
<version>1.5</version>
<configuration>
<port>${db.port}</port>
<dbName>${db.name}</dbName>

View File

@ -4,7 +4,7 @@ import com.rbkmoney.damsel.fraudbusters.Command;
import com.rbkmoney.damsel.wb_list.Event;
import com.rbkmoney.fraudbusters.management.serializer.CommandFraudDeserializer;
import com.rbkmoney.fraudbusters.management.serializer.EventDeserializer;
import com.rbkmoney.serializer.ThriftSerializer;
import com.rbkmoney.kafka.common.serialization.ThriftSerializer;
import org.apache.kafka.clients.CommonClientConfigs;
import org.apache.kafka.clients.consumer.ConsumerConfig;
import org.apache.kafka.clients.producer.ProducerConfig;

View File

@ -2,11 +2,11 @@ package com.rbkmoney.fraudbusters.management.serializer;
import com.rbkmoney.damsel.wb_list.ChangeCommand;
import com.rbkmoney.deserializer.AbstractDeserializerAdapter;
import com.rbkmoney.kafka.common.serialization.AbstractThriftDeserializer;
import lombok.extern.slf4j.Slf4j;
@Slf4j
public class CommandChangeDeserializer extends AbstractDeserializerAdapter<ChangeCommand> {
public class CommandChangeDeserializer extends AbstractThriftDeserializer<ChangeCommand> {
@Override
public ChangeCommand deserialize(String topic, byte[] data) {

View File

@ -2,11 +2,11 @@ package com.rbkmoney.fraudbusters.management.serializer;
import com.rbkmoney.damsel.fraudbusters.Command;
import com.rbkmoney.deserializer.AbstractDeserializerAdapter;
import com.rbkmoney.kafka.common.serialization.AbstractThriftDeserializer;
import lombok.extern.slf4j.Slf4j;
@Slf4j
public class CommandFraudDeserializer extends AbstractDeserializerAdapter<Command> {
public class CommandFraudDeserializer extends AbstractThriftDeserializer<Command> {
@Override
public Command deserialize(String topic, byte[] data) {

View File

@ -2,11 +2,11 @@ package com.rbkmoney.fraudbusters.management.serializer;
import com.rbkmoney.damsel.wb_list.Event;
import com.rbkmoney.deserializer.AbstractDeserializerAdapter;
import com.rbkmoney.kafka.common.serialization.AbstractThriftDeserializer;
import lombok.extern.slf4j.Slf4j;
@Slf4j
public class EventDeserializer extends AbstractDeserializerAdapter<Event> {
public class EventDeserializer extends AbstractThriftDeserializer<Event> {
@Override
public Event deserialize(String topic, byte[] data) {

View File

@ -2,7 +2,7 @@ package com.rbkmoney.fraudbusters.management;
import com.rbkmoney.fraudbusters.management.config.KafkaConfig;
import com.rbkmoney.fraudbusters.management.serializer.EventDeserializer;
import com.rbkmoney.serializer.ThriftSerializer;
import com.rbkmoney.kafka.common.serialization.ThriftSerializer;
import lombok.extern.slf4j.Slf4j;
import org.apache.kafka.clients.consumer.Consumer;
import org.apache.kafka.clients.consumer.ConsumerConfig;
@ -36,7 +36,9 @@ public abstract class AbstractKafkaIntegrationTest {
public static final String KAFKA_DOCKER_VERSION = "5.0.1";
@ClassRule
public static KafkaContainer kafka = new KafkaContainer(KAFKA_DOCKER_VERSION).withEmbeddedZookeeper();
public static KafkaContainer kafka = new KafkaContainer(KAFKA_DOCKER_VERSION)
.withEmbeddedZookeeper()
.withStartupTimeout(Duration.ofMinutes(10));
public static class Initializer implements ApplicationContextInitializer<ConfigurableApplicationContext> {
public static final String WB_LIST_EVENT_SINK = "wb-list-event-sink";

View File

@ -3,9 +3,10 @@
<include resource="org/springframework/boot/logging/logback/defaults.xml"/>
<include resource="org/springframework/boot/logging/logback/console-appender.xml"/>
<root level="warn">
<root level="INFO">
<appender-ref ref="CONSOLE"/>
</root>
<logger name="com.rbkmoney" level="ALL"/>
<logger name="org.springframework.kafka.listener" level="ALL"/>
<logger name="org.springframework.kafka" level="WARN"/>
<logger name="org.apache.kafka" level="ERROR"/>
</configuration>