File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -33,10 +33,17 @@ if [ -f "${KOKORO_GFILE_DIR}/secret_manager/java-bigqueryconnection-samples-secr
3333 source " ${KOKORO_GFILE_DIR} /secret_manager/java-bigqueryconnection-samples-secrets"
3434fi
3535
36+ if [[ -n " ${BUILD_SUBDIR} " ]]
37+ then
38+ echo " Running in subdir: ${BUILD_SUBDIR} "
39+ pushd " ${BUILD_SUBDIR} "
40+ fi
41+
3642RETURN_CODE=0
3743
3844case ${JOB_TYPE} in
3945 test)
46+ echo " SUREFIRE_JVM_OPT: ${SUREFIRE_JVM_OPT} "
4047 retry_with_backoff 3 10 \
4148 mvn test \
4249 -B -ntp \
@@ -48,7 +55,7 @@ case ${JOB_TYPE} in
4855 -Dflatten.skip=true \
4956 -Danimal.sniffer.skip=true \
5057 -Dmaven.wagon.http.retryHandler.count=5 \
51- -T 1C
58+ -T 1C ${SUREFIRE_JVM_OPT}
5259 RETURN_CODE=$?
5360 echo " Finished running unit tests"
5461 ;;
@@ -125,6 +132,12 @@ case ${JOB_TYPE} in
125132
126133esac
127134
135+ if [[ -n " ${BUILD_SUBDIR} " ]]
136+ then
137+ echo " restoring directory"
138+ popd
139+ fi
140+
128141if [ " ${REPORT_COVERAGE} " == " true" ]; then
129142 bash ${KOKORO_GFILE_DIR} /codecov.sh
130143fi
Original file line number Diff line number Diff line change @@ -49,6 +49,12 @@ function determineMavenOpts() {
4949
5050export MAVEN_OPTS=$( determineMavenOpts)
5151
52+ if [[ -n " ${BUILD_SUBDIR} " ]]
53+ then
54+ echo " Running in subdir: ${BUILD_SUBDIR} "
55+ pushd " ${BUILD_SUBDIR} "
56+ fi
57+
5258# this should run maven enforcer
5359retry_with_backoff 3 10 \
5460 mvn install -B -V -ntp \
@@ -57,3 +63,9 @@ retry_with_backoff 3 10 \
5763 -Dclirr.skip=true
5864
5965mvn -B dependency:analyze -DfailOnWarning=true
66+
67+ if [[ -n " ${BUILD_SUBDIR} " ]]
68+ then
69+ echo " Leaving subdir: ${BUILD_SUBDIR} "
70+ popd
71+ fi
Original file line number Diff line number Diff line change @@ -19,6 +19,10 @@ for pomFile in $(find . -mindepth 2 -name pom.xml | sort ); do
1919 echo " Skipping version check for java-samples directory"
2020 continue
2121 fi
22+ if [[ " ${pomFile} " =~ .* /samples/.* ]]; then
23+ echo " Skipping version check for samples directory"
24+ continue
25+ fi
2226
2327 if grep -n ' <version>.*</version>' " $pomFile " | grep -v ' x-version-update' ; then
2428 echo " Found version declaration(s) without x-version-update in: $pomFile "
You can’t perform that action at this time.
0 commit comments