From 45162c887998db4a3b24cc0d0b42e221b266ae84 Mon Sep 17 00:00:00 2001 From: Artem Sidorkin Date: Tue, 7 Jul 2020 18:00:23 +0300 Subject: [PATCH] #4: Updated libraries. --- build.gradle | 14 +++++- deploy-artifacts.sh | 46 +++++++++++-------- docker-compose-mysql-binlog.yml | 13 ++++-- .../tram/consumer/http/HttpConsumerTest.java | 4 +- gradle.properties | 15 +++--- 5 files changed, 56 insertions(+), 36 deletions(-) diff --git a/build.gradle b/build.gradle index 5e7163a..e7c1973 100644 --- a/build.gradle +++ b/build.gradle @@ -46,10 +46,21 @@ subprojects { eventuateMavenRepoUrl.split(',').each { repoUrl -> maven { url repoUrl } } } + configurations { + deployerJars + } + + dependencies { + deployerJars 'org.springframework.build:aws-maven:5.0.0.RELEASE' + } + uploadArchives { repositories { mavenDeployer { - repository(url: deployUrl) + configuration = configurations.deployerJars + repository(url: deployUrl) { + authentication(userName: System.getenv('S3_REPO_AWS_ACCESS_KEY'), password: System.getenv('S3_REPO_AWS_SECRET_ACCESS_KEY')) + } pom.project { licenses { license { @@ -67,7 +78,6 @@ subprojects { dockerCompose { environment.put "EVENTUATE_COMMON_VERSION", eventuateCommonImageVersion - environment.put "EVENTUATE_KAFKA_VERSION", eventuateMessagingKafkaImageVersion environment.put "EVENTUATE_CDC_VERSION", eventuateCdcImageVersion environment.put "PROXY_SERVICE_VERSION", version diff --git a/deploy-artifacts.sh b/deploy-artifacts.sh index 17aedcf..608b277 100755 --- a/deploy-artifacts.sh +++ b/deploy-artifacts.sh @@ -2,28 +2,36 @@ BRANCH=$(git rev-parse --abbrev-ref HEAD) -if ! [[ $BRANCH =~ ^[0-9]+ ]] ; then - echo Not release $BRANCH - no PUSH - exit 0 -elif [[ $BRANCH =~ RELEASE$ ]] ; then - BINTRAY_REPO_TYPE=release -elif [[ $BRANCH =~ M[0-9]+$ ]] ; then - BINTRAY_REPO_TYPE=milestone -elif [[ $BRANCH =~ RC[0-9]+$ ]] ; then - BINTRAY_REPO_TYPE=rc +if [ $BRANCH == "master" ] ; then + VERSION=$(sed -e '/^version=/!d' -e 's/^version=\(.*\)-SNAPSHOT$/\1.BUILD-SNAPSHOT/' < gradle.properties) + echo master: publishing $VERSION + ./gradlew -P version=$VERSION -P deployUrl=${S3_REPO_DEPLOY_URL} uploadArchives else - echo cannot figure out bintray for this branch $BRANCH - exit -1 -fi - -echo BINTRAY_REPO_TYPE=${BINTRAY_REPO_TYPE} -VERSION=$BRANCH + if ! [[ $BRANCH =~ ^[0-9]+ ]] ; then + echo Not release $BRANCH - no PUSH + exit 0 + elif [[ $BRANCH =~ RELEASE$ ]] ; then + BINTRAY_REPO_TYPE=release + elif [[ $BRANCH =~ M[0-9]+$ ]] ; then + BINTRAY_REPO_TYPE=milestone + elif [[ $BRANCH =~ RC[0-9]+$ ]] ; then + BINTRAY_REPO_TYPE=rc + else + echo cannot figure out bintray for this branch $BRANCH + exit -1 + fi + + echo BINTRAY_REPO_TYPE=${BINTRAY_REPO_TYPE} + + VERSION=$BRANCH + + $PREFIX ./gradlew -P version=${VERSION} \ + -P bintrayRepoType=${BINTRAY_REPO_TYPE} \ + -P deployUrl=https://dl.bintray.com/eventuateio-oss/eventuate-maven-${BINTRAY_REPO_TYPE} \ + testClasses assemble bintrayUpload -$PREFIX ./gradlew -P version=${VERSION} \ - -P bintrayRepoType=${BINTRAY_REPO_TYPE} \ - -P deployUrl=https://dl.bintray.com/eventuateio-oss/eventuate-maven-${BINTRAY_REPO_TYPE} \ - testClasses assemble bintrayUpload +fi docker login -u ${DOCKER_USER_ID?} -p ${DOCKER_PASSWORD?} diff --git a/docker-compose-mysql-binlog.yml b/docker-compose-mysql-binlog.yml index e7eba98..ef1a928 100755 --- a/docker-compose-mysql-binlog.yml +++ b/docker-compose-mysql-binlog.yml @@ -6,16 +6,19 @@ services: - 2181:2181 kafka: - image: eventuateio/eventuate-kafka:$EVENTUATE_KAFKA_VERSION + image: "confluentinc/cp-kafka:5.2.4" ports: - 9092:9092 + - 29092:29092 depends_on: - zookeeper environment: - - ADVERTISED_HOST_NAME=${DOCKER_HOST_IP} - - KAFKA_HEAP_OPTS=-Xmx320m -Xms320m - - ZOOKEEPER_SERVERS=zookeeper:2181 - - ZOOKEEPER_CONNECTION_TIMEOUT_MS=60000 + KAFKA_LISTENERS: LC://kafka:29092,LX://kafka:9092 + KAFKA_ADVERTISED_LISTENERS: LC://kafka:29092,LX://${DOCKER_HOST_IP:-localhost}:9092 + KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: LC:PLAINTEXT,LX:PLAINTEXT + KAFKA_INTER_BROKER_LISTENER_NAME: LC + KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181 + KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1 mysql: diff --git a/eventuate-tram-consumer-http-micronaut/src/test/java/io/eventuate/tram/consumer/http/HttpConsumerTest.java b/eventuate-tram-consumer-http-micronaut/src/test/java/io/eventuate/tram/consumer/http/HttpConsumerTest.java index 6d126e2..b10b5b6 100644 --- a/eventuate-tram-consumer-http-micronaut/src/test/java/io/eventuate/tram/consumer/http/HttpConsumerTest.java +++ b/eventuate-tram-consumer-http-micronaut/src/test/java/io/eventuate/tram/consumer/http/HttpConsumerTest.java @@ -66,7 +66,7 @@ public class HttpConsumerTest { public void init() { subscriberId = "subscriber-" + generateId(); id = "id-" + generateId(); - payload = "payload-" + generateId(); + payload = "\"payload-" + generateId() + "\""; channel = "channel-" + generateId(); messages = new LinkedBlockingQueue<>(); } @@ -115,7 +115,7 @@ public void testUnsubscribe() throws InterruptedException { Thread.sleep(3000); id = "id-" + generateId(); - payload = "payload-" + generateId(); + payload = "\"payload-" + generateId() + "\""; sendMessage(); diff --git a/gradle.properties b/gradle.properties index d2672cc..91e70d3 100644 --- a/gradle.properties +++ b/gradle.properties @@ -7,13 +7,12 @@ eventuateMavenRepoUrl=https://dl.bintray.com/eventuateio-oss/eventuate-maven-rel springBootVersion=2.1.5.RELEASE micronautVersion=1.2.4 -eventuateTramVersion=0.24.0.RC4 -eventuateUtilVersion=0.2.0.RELEASE -eventuateMessagingKafkaVersion=0.9.0.RC4 -eventuateCommonVersion=0.9.0.RC4 +eventuateTramVersion=0.25.1.RELEASE +eventuateUtilVersion=0.5.0.RELEASE +eventuateMessagingKafkaVersion=0.10.0.RELEASE +eventuateCommonVersion=0.10.0.RELEASE dockerComposePluginVersion=0.4.5 -version=0.1.0-SNAPSHOT +version=0.1.2-SNAPSHOT -eventuateCommonImageVersion=0.9.0.RC4 -eventuateMessagingKafkaImageVersion=0.9.0.RC4 -eventuateCdcImageVersion=0.6.0.RC4 +eventuateCommonImageVersion=0.10.0.RELEASE +eventuateCdcImageVersion=0.7.0.RELEASE