Skip to content

Commit 3bc7bba

Browse files
authored
ci: Update to use zulu-openjdk-17 image for integration tests. (#2162)
1 parent 70c6d24 commit 3bc7bba

File tree

2 files changed

+17
-6
lines changed

2 files changed

+17
-6
lines changed

.ci/cloudbuild.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
# limitations under the License.
1414
steps:
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"
108108
substitutions:
109-
_MAVEN_VERSION: ${_VERSION}
110109
_IP_TYPE: ${_IP_TYPE}
111110
options:
112111
dynamicSubstitutions: true

.github/scripts/run_tests.sh

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@
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

1922
if [[ $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"
2730
echo "Running tests using Java:"
2831
java -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

3244
echo "Job type: ${JOB_TYPE}"
3345

@@ -36,11 +48,11 @@ set +e
3648

3749
case ${JOB_TYPE} in
3850
test)
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
;;
4254
integration)
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
;;
4658
esac

0 commit comments

Comments
 (0)