Fix CI log interleaving

* Stop logs from parallel tests interleaving with each other
* Cut down on noise and reduce page load times by only logging std
streams for tests that fail
* @Validated AT cloud foundry configuration
* Remove unnecessary Gradle tasks from the AT job since they've already
been performed as part of `build`
* Stop tests and javadoc Gradle tasks being run against docs subproject
and causing failures

#380
This commit is contained in:
Gareth Clay
2020-06-09 17:16:23 +01:00
committed by Roy Clarkson
parent f2ec97d977
commit 6fed6572cb
16 changed files with 91 additions and 47 deletions

View File

@@ -11,10 +11,7 @@ readonly CLIENT_SECRET="${CLIENT_SECRET:?must be set}"
readonly DEFAULT_ORG="${DEFAULT_ORG:?must be set}"
readonly DEFAULT_SPACE="${DEFAULT_SPACE:?must be set}"
readonly SKIP_SSL_VALIDATION="${SKIP_SSL_VALIDATION:?must be set}"
build() {
./gradlew assemble -x test
}
readonly ONLY_SHOW_STANDARD_STREAMS_ON_TEST_FAILURE="${ONLY_SHOW_STANDARD_STREAMS_ON_TEST_FAILURE:?must be set}"
run_tests() {
export SPRING_CLOUD_APPBROKER_ACCEPTANCETEST_CLOUDFOUNDRY_API_HOST="${API_HOST}"
@@ -27,12 +24,13 @@ run_tests() {
export SPRING_CLOUD_APPBROKER_ACCEPTANCETEST_CLOUDFOUNDRY_DEFAULT_SPACE="${DEFAULT_SPACE}"
export SPRING_CLOUD_APPBROKER_ACCEPTANCETEST_CLOUDFOUNDRY_SKIP_SSL_VALIDATION="${SKIP_SSL_VALIDATION}"
export TESTS_BROKERAPPPATH=build/libs/spring-cloud-app-broker-acceptance-tests.jar
./gradlew clean assemble check -PacceptanceTests -b spring-cloud-app-broker-acceptance-tests/build.gradle
./gradlew -PacceptanceTests \
-PonlyShowStandardStreamsOnTestFailure="${ONLY_SHOW_STANDARD_STREAMS_ON_TEST_FAILURE}" \
:spring-cloud-app-broker-acceptance-tests:test
}
main() {
pushd "git-repo" > /dev/null
build
run_tests
popd > /dev/null
}

View File

@@ -1,10 +1,15 @@
#!/bin/bash
set -e
readonly ONLY_SHOW_STANDARD_STREAMS_ON_TEST_FAILURE="${ONLY_SHOW_STANDARD_STREAMS_ON_TEST_FAILURE:"true"}"
# shellcheck source=scripts/common.sh
source "$(dirname "$0")/common.sh"
repository=$(pwd)/distribution-repository
pushd git-repo >/dev/null
./gradlew --no-daemon clean build install -Dmaven.repo.local="${repository}" -Dorg.gradle.jvmargs="-Xmx512m -Xmx2048m"
./gradlew --no-daemon clean build install \
-PonlyShowStandardStreamsOnTestFailure="${ONLY_SHOW_STANDARD_STREAMS_ON_TEST_FAILURE}" \
-Dmaven.repo.local="${repository}" \
-Dorg.gradle.jvmargs="-Xmx512m -Xmx2048m"
popd >/dev/null