Skip to content

Commit a0d571c

Browse files
committed
WIP upgrade dependencies
1 parent cac2b20 commit a0d571c

File tree

35 files changed

+274
-262
lines changed

35 files changed

+274
-262
lines changed

.circleci/config.yml

+19-37
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,21 @@
1-
version: 2
1+
version: 2.1
2+
setup: true
3+
orbs:
4+
eventuate-gradle-build-and-test: "eventuate_io/[email protected]"
5+
continuation: circleci/[email protected]
26
jobs:
3-
build:
4-
machine: true
5-
working_directory: ~/ftgo-application
7+
setup:
8+
executor: continuation/default
69
steps:
7-
- checkout
8-
- restore_cache:
9-
keys:
10-
- ftgo-application-{{ checksum "gradle.properties" }}
11-
- ftgo-application-
12-
- run: TERM=dumb ./gradlew buildContracts
13-
- run: TERM=dumb ./gradlew compileAll
14-
- save_cache:
15-
paths:
16-
- ~/.gradle
17-
- ~/.m2
18-
key: ftgo-application-{{ checksum "gradle.properties" }}
19-
- run:
20-
command: |
21-
./.circleci/upgrade-docker-compose.sh
22-
. .circleci/setenv-circle-ci.sh
23-
./build-and-test-all.sh
24-
- run:
25-
name: Save test results
26-
command: |
27-
mkdir -p ~/junit/
28-
find . -type f -regex ".*/build/test-results/.*xml" -exec cp {} ~/junit/ \;
29-
when: always
30-
- store_test_results:
31-
path: ~/junit
32-
- store_artifacts:
33-
path: ~/junit
34-
- run:
35-
command: |
36-
. .circleci/setenv-circle-ci.sh
37-
./gradlew assemble
38-
docker-compose build
39-
./publish-docker-images.sh
10+
- checkout # checkout code
11+
- run: # run a command
12+
name: Generate config
13+
command: |
14+
./.circleci/generate-config.sh > generated_config.yml
15+
- continuation/continue:
16+
configuration_path: generated_config.yml
17+
18+
workflows:
19+
setup:
20+
jobs:
21+
- setup

.circleci/generate-config.sh

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#! /bin/bash -e
2+
3+
cat > generated_config.yml <<END
4+
version: 2.1
5+
orbs:
6+
eventuate-gradle-build-and-test: "eventuate_io/[email protected]"
7+
workflows:
8+
version: 2.1
9+
build-test-and-deploy:
10+
jobs:
11+
END
12+
13+
for build_script in build-and-test-all*.sh ; do
14+
cat >> generated_config.yml <<END
15+
- eventuate-gradle-build-and-test/build-and-test:
16+
name: $build_script
17+
maven_cache_command: ./gradlew buildContracts
18+
script: ./$build_script
19+
END
20+
done

build-and-test-all.sh

+9-33
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@ ASSEMBLE_ONLY=
55
USE_EXISTING_CONTAINERS=
66

77
DATABASE_SERVICES="dynamodblocal mysql dynamodblocal-init"
8-
if [ -z "$DOCKER_COMPOSE" ] ; then
9-
DOCKER_COMPOSE=docker-compose
10-
fi
118

129
while [ ! -z "$*" ] ; do
1310
case $1 in
@@ -30,75 +27,54 @@ done
3027

3128
echo KEEP_RUNNING=$KEEP_RUNNING
3229

33-
. ./set-env.sh
34-
3530
# TODO Temporarily
3631

3732
./gradlew buildContracts
3833

3934
./gradlew compileAll
4035

4136
if [ -z "$USE_EXISTING_CONTAINERS" ] ; then
42-
${DOCKER_COMPOSE?} down --remove-orphans -v
37+
./gradlew composeDown
4338
fi
4439

45-
${DOCKER_COMPOSE?} up -d --build ${DATABASE_SERVICES?}
46-
47-
./gradlew waitForMySql
40+
./gradlew infrastructureComposeUp
4841

4942
echo mysql is started
5043

5144
# Test ./mysql-cli.sh
5245

5346
echo 'show databases;' | ./mysql-cli.sh -i
5447

55-
${DOCKER_COMPOSE?} up -d --build cdc-service
56-
5748
if [ -z "$ASSEMBLE_ONLY" ] ; then
5849

5950
./gradlew -x :ftgo-end-to-end-tests:test $* build
6051

61-
${DOCKER_COMPOSE?} build
62-
6352
./gradlew $* integrationTest
6453

65-
./gradlew cleanComponentTest componentTest
66-
67-
# Reset the DB/messages
54+
./gradlew infrastructureComposeDown
55+
./gradlew infrastructureComposeUp
6856

69-
${DOCKER_COMPOSE?} down --remove-orphans -v
70-
71-
${DOCKER_COMPOSE?} up -d ${DATABASE_SERVICES?}
72-
73-
./gradlew waitForMySql
57+
./gradlew cleanComponentTest componentTest
7458

75-
echo mysql is started
59+
./gradlew infrastructureComposeDown
7660

77-
${DOCKER_COMPOSE?} up -d
61+
./gradlew composeUp
7862

7963

8064
else
8165

8266
./gradlew $* assemble
8367

84-
${DOCKER_COMPOSE?} up -d --build ${DATABASE_SERVICES?}
85-
86-
./gradlew waitForMySql
87-
88-
echo mysql is started
89-
90-
${DOCKER_COMPOSE?} up -d --build
68+
./gradlew composeUp
9169

9270
fi
9371

94-
./wait-for-services.sh
95-
9672
./run-end-to-end-tests.sh
9773

9874

9975
# NEED TO FIX
10076
# ./run-graphql-api-gateway-tests.sh
10177

10278
if [ -z "$KEEP_RUNNING" ] ; then
103-
${DOCKER_COMPOSE?} down --remove-orphans -v
79+
./gradlew composeDown
10480
fi

build.gradle

+38-4
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,6 @@ buildscript {
1111
}
1212
}
1313

14-
plugins {
15-
id "com.github.ben-manes.versions" version "0.20.0"
16-
}
17-
1814
apply plugin: WaitForMySqlPlugin
1915
apply plugin: 'docker-compose'
2016

@@ -46,7 +42,17 @@ subprojects {
4642
}
4743

4844
dependencies {
45+
4946
implementation(platform("io.eventuate.platform:eventuate-platform-dependencies:$eventuatePlatformVersion"))
47+
constraints {
48+
compile ("io.netty:netty-codec-http2") {
49+
version {
50+
strictly("4.1.72.Final")
51+
}
52+
}
53+
}
54+
55+
5056
}
5157
}
5258

@@ -59,8 +65,36 @@ task compileAll(type: GradleBuild) {
5965
}
6066

6167
dockerCompose {
68+
69+
environment.put "EVENTUATE_COMMON_VERSION", eventuateCommonImageVersion
70+
environment.put "EVENTUATE_CDC_VERSION", eventuateCdcImageVersion
71+
environment.put "EVENTUATE_SAGA_VERSION", eventuateTramSagasImageVersion
72+
environment.put "EVENTUATE_JAVA_BASE_IMAGE_VERSION", eventuateExamplesBaseImageVersion
73+
environment.put "EVENTUATE_MESSAGING_KAFKA_IMAGE_VERSION", eventuateMessagingKafkaImageVersion
74+
6275
projectName = null
6376
removeOrphans = true
77+
retainContainersOnStartupFailure = true
78+
6479
if (project.hasProperty('startedServices'))
6580
startedServices= project.ext.startedServices.split(',')
81+
82+
infrastructure {
83+
projectName = null
84+
startedServices = ["mysql", "cdc-service", "dynamodblocal-init", "kafka", "zookeeper"]
85+
}
86+
87+
kafkaGui {
88+
projectName = null
89+
startedServices = ["kafka-gui"]
90+
}
6691
}
92+
93+
composeUp.dependsOn(infrastructureComposeUp)
94+
95+
subprojects.each {
96+
if (it.name.endsWith("-service") || it.name.endsWith("-gateway")) {
97+
composeBuild.dependsOn(":" + it.name + ":assemble")
98+
composeUp.dependsOn(":" + it.name + ":assemble")
99+
}
100+
}

buildSrc/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ repositories {
99
}
1010

1111
dependencies {
12-
compile 'mysql:mysql-connector-java:5.1.39'
12+
compile 'mysql:mysql-connector-java:8.0.21'
1313
compile 'com.amazonaws:aws-java-sdk-dynamodb:1.11.158'
1414
compile 'commons-lang:commons-lang:2.6'
1515

buildSrc/src/main/groovy/FtgoServicePlugin.groovy

+2-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ class FtgoServicePlugin implements Plugin<Project> {
2828
compile 'org.springframework.cloud:spring-cloud-starter-zipkin'
2929
compile "io.zipkin.brave:brave-bom:4.17.1"
3030

31-
compile "io.eventuate.tram.core:eventuate-tram-spring-cloud-sleuth-integration"
31+
// Temporarily disable
32+
//compile "io.eventuate.tram.core:eventuate-tram-spring-cloud-sleuth-integration"
3233

3334
implementation(platform("io.eventuate.platform:eventuate-platform-dependencies:${project.ext.eventuatePlatformVersion}"))
3435
}

common-swagger/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
dependencies {
2-
compile "io.eventuate.util:eventuate-util-spring-swagger:$eventuateUtilVersion"
2+
compile "io.eventuate.util:eventuate-util-spring-swagger"
33
}

0 commit comments

Comments
 (0)