@@ -27,16 +27,37 @@ source ${scriptDir}/common.sh
2727mvn -version
2828echo ${JOB_TYPE}
2929
30- # attempt to install 3 times with exponential backoff (starting with 10 seconds)
31- retry_with_backoff 3 10 \
32- mvn install -B -V -ntp \
33- -DskipTests=true \
34- -Dclirr.skip=true \
35- -Denforcer.skip=true \
36- -Dcheckstyle.skip=true \
37- -Dmaven.javadoc.skip=true \
38- -Dgcloud.download.skip=true \
39- -T 1C
30+ # TODO: We'll change define this value in a different place later
31+ if [[ " ${JOB_TYPE} " == " integration" ]]; then
32+ SHARED_DEPS_OVERRIDE=3.45.2-SNAPSHOT
33+ fi
34+ if [ -n " ${SHARED_DEPS_OVERRIDE} " ]; then
35+ echo " Account used for Artifact Registry authentication"
36+ echo " gcloud config get-value core/account:"
37+ gcloud config get-value core/account
38+ echo " wget a file from Artifact Registry:"
39+ wget --quiet --header=" Authorization: Bearer $( gcloud auth print-access-token) " \
40+ --output-document=/dev/null \
41+ https://us-maven.pkg.dev/suztomo-cloud-function-test/test-maven-repo/com/google/cloud/google-cloud-shared-dependencies/3.45.2-latest-deps-2024-0418-102802/google-cloud-shared-dependencies-3.45.2-latest-deps-2024-0418-102802.pom
42+
43+ # Tell the integration tests to use the specific shared dependencies available in the snapshot repository.
44+ INTEGRATION_TEST_ARGS=" ${INTEGRATION_TEST_ARGS} -X -Dgoogle-cloud-shared-dependencies.version=${SHARED_DEPS_OVERRIDE} -Puse-snapshot-repo"
45+ echo " Showing dependency tree"
46+ mvn -B ${INTEGRATION_TEST_ARGS} -ntp dependency:tree
47+ echo " End of dependency tree"
48+ fi
49+
50+ mvn install -B -V -ntp \
51+ ${INTEGRATION_TEST_ARGS}
52+ -DskipTests=true \
53+ -Dclirr.skip=true \
54+ -Denforcer.skip=true \
55+ -Dcheckstyle.skip=true \
56+ -Dmaven.javadoc.skip=true \
57+ -Dgcloud.download.skip=true \
58+ -T 1C
59+
60+ echo " mvn instal succeeded"
4061
4162# if GOOGLE_APPLICATION_CREDENTIALS is specified as a relative path, prepend Kokoro root directory onto it
4263if [[ ! -z " ${GOOGLE_APPLICATION_CREDENTIALS} " && " ${GOOGLE_APPLICATION_CREDENTIALS} " != /* ]]; then
0 commit comments