55# Fail on error
66set -e
77
8- BUILDS=" inventory-python inventory-nodejs inventory-dotnet inventory-go inventory-helidon-se order-mongodb-kafka inventory-postgres-kafka inventory-springboot inventory-micronaut inventory-quarkus foodwinepairing-python"
8+ NON_JAVA_POLYGLOT_BUILDS=" foodwinepairing-python inventory-python inventory-nodejs inventory-dotnet inventory-go"
9+ # Run serially (Java)
10+ JAVA_POLYGLOT_BUILDS=" inventory-helidon-se order-mongodb-kafka inventory-postgres-kafka inventory-springboot inventory-micronaut inventory-quarkus"
11+
912# we provision a repos for db-log-exporter but it's in nested observability/db-log-exporter dir so not reusing BUILDS list to build (see DB_LOG_EXPORTER_BUILD below)
10- REPOS=" inventory-python inventory-nodejs inventory-dotnet inventory-go inventory-helidon-se order-mongodb-kafka inventory-postgres-kafka inventory-springboot inventory-micronaut inventory-micronaut-native-image inventory-quarkus db-log-exporter foodwinepairing-python "
13+ REPOS=" $NON_JAVA_POLYGLOT_BUILDS $JAVA_POLYGLOT_BUILDS db-log-exporter"
1114
1215# Provision Repos
1316while ! state_done NON_JAVA_REPOS; do
@@ -32,19 +35,30 @@ while ! state_done JAVA_BUILDS; do
3235done
3336
3437
35- # Build the images
36- while ! state_done NON_JAVA_BUILDS ; do
37- for b in $BUILDS ; do
38+ # Build POLYGLOT_BUILDS images
39+ while ! state_done POLYGLOT_BUILDS ; do
40+ for b in $NON_JAVA_POLYGLOT_BUILDS ; do
3841 cd $GRABDISH_HOME /$b
42+ echo " ### building $b "
3943 time ./build.sh & >> $GRABDISH_LOG /build-$b .log &
4044 done
45+
46+ # Run serially because maven is unstable in parallel
47+ for b in $JAVA_POLYGLOT_BUILDS ; do
48+ cd $GRABDISH_HOME /$b
49+ echo " ### building $b "
50+ time ./build.sh & >> $GRABDISH_LOG /build-$b .log
51+ done
4152 wait
53+ state_set_done POLYGLOT_BUILDS
4254 state_set_done NON_JAVA_BUILDS
4355done
4456
57+
4558# Build the db-log-exporter image
4659while ! state_done DB_LOG_EXPORTER_BUILD; do
4760 cd $GRABDISH_HOME /observability/db-log-exporter
61+ echo " ### building db-log-exporter"
4862 time ./build.sh & >> $GRABDISH_LOG /build-db-log-exporter.log &
4963 state_set_done DB_LOG_EXPORTER_BUILD
5064done
0 commit comments