File tree Expand file tree Collapse file tree 2 files changed +17
-6
lines changed Expand file tree Collapse file tree 2 files changed +17
-6
lines changed Original file line number Diff line number Diff line change 1313# limitations under the License.
1414steps :
1515 - id : run integration tests
16- name : maven:${_MAVEN_VERSION }
16+ name : ${_CONTAINER_IMAGE }
1717 entrypoint : bash
1818 env :
1919 - " IP_TYPE=${_IP_TYPE}"
@@ -106,7 +106,6 @@ availableSecrets:
106106 - versionName : " projects/$PROJECT_ID/secrets/CLOUD_BUILD_SA/versions/latest"
107107 env : " IMPERSONATED_USER"
108108substitutions :
109- _MAVEN_VERSION : ${_VERSION}
110109 _IP_TYPE : ${_IP_TYPE}
111110options :
112111 dynamicSubstitutions : true
Original file line number Diff line number Diff line change 1414# limitations under the License.
1515
1616# `-e` enables the script to automatically fail when a command fails
17- set -e
17+ set -ex
18+
19+ SCRIPT_DIR=$( cd -- " $( dirname -- " ${BASH_SOURCE[0]} " ) " & > /dev/null && pwd )
20+ PROJECT_DIR=$( dirname " $SCRIPT_DIR " )
1821
1922if [[ $OSTYPE == ' darwin' * ]]; then
2023 # Add alias for 127.0.0.2 to be used as a loopback address
@@ -27,7 +30,16 @@ echo -e "******************** Running tests... ********************\n"
2730echo " Running tests using Java:"
2831java -version
2932
30- echo " Maven version: $( mvn --version) "
33+ # Use the mvn command
34+ if which mvn ; then
35+ mvn_cmd=" mvn"
36+ else
37+ mvn_cmd=" ./mvnw"
38+ fi
39+
40+ ls -al
41+
42+ echo " Maven version: $( $mvn_cmd --version) "
3143
3244echo " Job type: ${JOB_TYPE} "
3345
@@ -36,11 +48,11 @@ set +e
3648
3749case ${JOB_TYPE} in
3850test)
39- mvn -e -B clean -ntp test -P coverage -Dcheckstyle.skip
51+ $mvn_cmd -e -B clean -ntp test -P coverage -Dcheckstyle.skip
4052 RETURN_CODE=$?
4153 ;;
4254integration)
43- mvn -e -B clean -ntp verify -P e2e -P coverage -Dcheckstyle.skip
55+ $mvn_cmd -e -B clean -ntp verify -P e2e -P coverage -Dcheckstyle.skip
4456 RETURN_CODE=$?
4557 ;;
4658esac
You can’t perform that action at this time.
0 commit comments