Skip to content

Commit

Permalink
WIP upgrade dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
cer committed Jun 13, 2022
1 parent cac2b20 commit a0d571c
Show file tree
Hide file tree
Showing 35 changed files with 274 additions and 262 deletions.
56 changes: 19 additions & 37 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,39 +1,21 @@
version: 2
version: 2.1
setup: true
orbs:
eventuate-gradle-build-and-test: "eventuate_io/[email protected]"
continuation: circleci/[email protected]
jobs:
build:
machine: true
working_directory: ~/ftgo-application
setup:
executor: continuation/default
steps:
- checkout
- restore_cache:
keys:
- ftgo-application-{{ checksum "gradle.properties" }}
- ftgo-application-
- run: TERM=dumb ./gradlew buildContracts
- run: TERM=dumb ./gradlew compileAll
- save_cache:
paths:
- ~/.gradle
- ~/.m2
key: ftgo-application-{{ checksum "gradle.properties" }}
- run:
command: |
./.circleci/upgrade-docker-compose.sh
. .circleci/setenv-circle-ci.sh
./build-and-test-all.sh
- run:
name: Save test results
command: |
mkdir -p ~/junit/
find . -type f -regex ".*/build/test-results/.*xml" -exec cp {} ~/junit/ \;
when: always
- store_test_results:
path: ~/junit
- store_artifacts:
path: ~/junit
- run:
command: |
. .circleci/setenv-circle-ci.sh
./gradlew assemble
docker-compose build
./publish-docker-images.sh
- checkout # checkout code
- run: # run a command
name: Generate config
command: |
./.circleci/generate-config.sh > generated_config.yml
- continuation/continue:
configuration_path: generated_config.yml

workflows:
setup:
jobs:
- setup
20 changes: 20 additions & 0 deletions .circleci/generate-config.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#! /bin/bash -e

cat > generated_config.yml <<END
version: 2.1
orbs:
eventuate-gradle-build-and-test: "eventuate_io/[email protected]"
workflows:
version: 2.1
build-test-and-deploy:
jobs:
END

for build_script in build-and-test-all*.sh ; do
cat >> generated_config.yml <<END
- eventuate-gradle-build-and-test/build-and-test:
name: $build_script
maven_cache_command: ./gradlew buildContracts
script: ./$build_script
END
done
42 changes: 9 additions & 33 deletions build-and-test-all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ ASSEMBLE_ONLY=
USE_EXISTING_CONTAINERS=

DATABASE_SERVICES="dynamodblocal mysql dynamodblocal-init"
if [ -z "$DOCKER_COMPOSE" ] ; then
DOCKER_COMPOSE=docker-compose
fi

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

echo KEEP_RUNNING=$KEEP_RUNNING

. ./set-env.sh

# TODO Temporarily

./gradlew buildContracts

./gradlew compileAll

if [ -z "$USE_EXISTING_CONTAINERS" ] ; then
${DOCKER_COMPOSE?} down --remove-orphans -v
./gradlew composeDown
fi

${DOCKER_COMPOSE?} up -d --build ${DATABASE_SERVICES?}

./gradlew waitForMySql
./gradlew infrastructureComposeUp

echo mysql is started

# Test ./mysql-cli.sh

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

${DOCKER_COMPOSE?} up -d --build cdc-service

if [ -z "$ASSEMBLE_ONLY" ] ; then

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

${DOCKER_COMPOSE?} build

./gradlew $* integrationTest

./gradlew cleanComponentTest componentTest

# Reset the DB/messages
./gradlew infrastructureComposeDown
./gradlew infrastructureComposeUp

${DOCKER_COMPOSE?} down --remove-orphans -v

${DOCKER_COMPOSE?} up -d ${DATABASE_SERVICES?}

./gradlew waitForMySql
./gradlew cleanComponentTest componentTest

echo mysql is started
./gradlew infrastructureComposeDown

${DOCKER_COMPOSE?} up -d
./gradlew composeUp


else

./gradlew $* assemble

${DOCKER_COMPOSE?} up -d --build ${DATABASE_SERVICES?}

./gradlew waitForMySql

echo mysql is started

${DOCKER_COMPOSE?} up -d --build
./gradlew composeUp

fi

./wait-for-services.sh

./run-end-to-end-tests.sh


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

if [ -z "$KEEP_RUNNING" ] ; then
${DOCKER_COMPOSE?} down --remove-orphans -v
./gradlew composeDown
fi
42 changes: 38 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@ buildscript {
}
}

plugins {
id "com.github.ben-manes.versions" version "0.20.0"
}

apply plugin: WaitForMySqlPlugin
apply plugin: 'docker-compose'

Expand Down Expand Up @@ -46,7 +42,17 @@ subprojects {
}

dependencies {

implementation(platform("io.eventuate.platform:eventuate-platform-dependencies:$eventuatePlatformVersion"))
constraints {
compile ("io.netty:netty-codec-http2") {
version {
strictly("4.1.72.Final")
}
}
}


}
}

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

dockerCompose {

environment.put "EVENTUATE_COMMON_VERSION", eventuateCommonImageVersion
environment.put "EVENTUATE_CDC_VERSION", eventuateCdcImageVersion
environment.put "EVENTUATE_SAGA_VERSION", eventuateTramSagasImageVersion
environment.put "EVENTUATE_JAVA_BASE_IMAGE_VERSION", eventuateExamplesBaseImageVersion
environment.put "EVENTUATE_MESSAGING_KAFKA_IMAGE_VERSION", eventuateMessagingKafkaImageVersion

projectName = null
removeOrphans = true
retainContainersOnStartupFailure = true

if (project.hasProperty('startedServices'))
startedServices= project.ext.startedServices.split(',')

infrastructure {
projectName = null
startedServices = ["mysql", "cdc-service", "dynamodblocal-init", "kafka", "zookeeper"]
}

kafkaGui {
projectName = null
startedServices = ["kafka-gui"]
}
}

composeUp.dependsOn(infrastructureComposeUp)

subprojects.each {
if (it.name.endsWith("-service") || it.name.endsWith("-gateway")) {
composeBuild.dependsOn(":" + it.name + ":assemble")
composeUp.dependsOn(":" + it.name + ":assemble")
}
}
2 changes: 1 addition & 1 deletion buildSrc/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ repositories {
}

dependencies {
compile 'mysql:mysql-connector-java:5.1.39'
compile 'mysql:mysql-connector-java:8.0.21'
compile 'com.amazonaws:aws-java-sdk-dynamodb:1.11.158'
compile 'commons-lang:commons-lang:2.6'

Expand Down
3 changes: 2 additions & 1 deletion buildSrc/src/main/groovy/FtgoServicePlugin.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ class FtgoServicePlugin implements Plugin<Project> {
compile 'org.springframework.cloud:spring-cloud-starter-zipkin'
compile "io.zipkin.brave:brave-bom:4.17.1"

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

implementation(platform("io.eventuate.platform:eventuate-platform-dependencies:${project.ext.eventuatePlatformVersion}"))
}
Expand Down
2 changes: 1 addition & 1 deletion common-swagger/build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
dependencies {
compile "io.eventuate.util:eventuate-util-spring-swagger:$eventuateUtilVersion"
compile "io.eventuate.util:eventuate-util-spring-swagger"
}
Loading

0 comments on commit a0d571c

Please sign in to comment.