@@ -27,6 +27,84 @@ source ${scriptDir}/common.sh
2727mvn -version
2828echo ${JOB_TYPE}
2929
30+ # # Store the current Java version since the version may change when installing sdk-platform-java
31+ # current_java_home=$JAVA_HOME
32+ #
33+ # # testing-infra-docker has Java 11 installed in java8 docker container. Use this as sdk-platform-java
34+ # # needs Java 11+ to run with GraalVM. For GH actions, JAVA11_HOME does not exist and would skip this.
35+ # if [ ! -z "${JAVA11_HOME}" ]; then
36+ # export JAVA_HOME="${JAVA11_HOME}"
37+ # export PATH=${JAVA_HOME}/bin:$PATH
38+ # fi
39+ #
40+ # # Get the current proto runtime version used in this repo
41+ # CURRENT_PROTO_VERSION=$(mvn -ntp help:effective-pom |
42+ # sed -n "/<artifactId>protobuf-java<\/artifactId>/,/<\/dependency>/ {
43+ # /<version>/{
44+ # s/<version>\(.*\)<\/version>/\1/p
45+ # q
46+ # }
47+ # }" | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//')
48+ # echo "The current proto version is: ${CURRENT_PROTO_VERSION}"
49+ #
50+ # # Find the latest proto runtime version available
51+ # LATEST_PROTO_VERSION=$(curl -s https://repo1.maven.org/maven2/com/google/protobuf/protobuf-java/maven-metadata.xml | sed -n '/<release>/s/.*<release>\(.*\)<\/release>.*/\1/p')
52+ # echo "The latest proto version is: ${LATEST_PROTO_VERSION}"
53+ #
54+ # # Only reinstall shared-deps again to test for a newer proto version
55+ # if [[ "${CURRENT_PROTO_VERSION}" != "${LATEST_PROTO_VERSION}" ]]; then
56+ # pushd /tmp
57+ # git clone https://github.com/googleapis/sdk-platform-java.git
58+ # pushd sdk-platform-java
59+ # pushd gapic-generator-java-pom-parent
60+ # sed -i "/<protobuf.version>.*<\/protobuf.version>/s/\(.*<protobuf.version>\).*\(<\/protobuf.version>\)/\1${LATEST_PROTO_VERSION}\2/" pom.xml
61+ # # sdk-platform-java
62+ # popd
63+ #
64+ # pushd sdk-platform-java-config
65+ # # Get current Shared-Deps version in sdk-platform-java
66+ # SHARED_DEPS_VERSION=$(mvn -ntp help:effective-pom |
67+ # sed -n "/<artifactId>sdk-platform-java-config<\/artifactId>/,/<\/dependency>/ {
68+ # /<version>/{
69+ # s/<version>\(.*\)<\/version>/\1/p
70+ # q
71+ # }
72+ # }" | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//')
73+ # echo "Shared-Deps Version: ${SHARED_DEPS_VERSION}"
74+ # # sdk-platform-java
75+ # popd
76+ # mvn clean install -q -ntp \
77+ # -DskipTests=true \
78+ # -Dclirr.skip=true \
79+ # -Denforcer.skip=true \
80+ # -T 1C
81+ # # /tmp
82+ # popd
83+ #
84+ # # Back to the original directory of the repo
85+ # popd
86+ # # Find all the poms with a reference to shared-deps and update to the new local version
87+ # poms=($(find . -name pom.xml))
88+ # for pom in "${poms[@]}"; do
89+ # if grep -q "sdk-platform-java-config" "${pom}"; then
90+ # echo "Updating the pom: ${pom} to use shared-deps version: ${SHARED_DEPS_VERSION}"
91+ # sed -i "/<artifactId>sdk-platform-java-config<\/artifactId>/,/<\/parent>/ s/<version>.*<\/version>/<version>$SHARED_DEPS_VERSION<\/version>/" "${pom}"
92+ # cat "${pom}"
93+ # # xmlstarlet ed --inplace -N x="http://maven.apache.org/POM/4.0.0" \
94+ # # -u "//x:project/x:parent[x:artifactId='sdk-platform-java-config']/x:version" \
95+ # # -v "${SHARED_DEPS_VERSION}" \
96+ # # "${pom}"
97+ # fi
98+ # done
99+ #
100+ # # Print out the dependency tree for all module to ensure latest protobuf was installed
101+ # mvn dependency:tree
102+ # fi
103+ #
104+ # # Reset back to the original Java version if changed
105+ # export JAVA_HOME="${current_java_home}"
106+ # export PATH=${JAVA_HOME}/bin:$PATH
107+
30108# attempt to install 3 times with exponential backoff (starting with 10 seconds)
31109retry_with_backoff 3 10 \
32110 mvn install -B -V -ntp \
@@ -60,14 +138,30 @@ javadoc)
60138 RETURN_CODE=$?
61139 ;;
62140integration)
63- mvn -B ${INTEGRATION_TEST_ARGS} \
64- -ntp \
65- -Penable-integration-tests \
66- -DtrimStackTrace=false \
67- -Dclirr.skip=true \
68- -Denforcer.skip=true \
69- -fae \
70- verify
141+ # mvn -B ${INTEGRATION_TEST_ARGS} \
142+ # -ntp \
143+ # -Penable-integration-tests \
144+ # -DtrimStackTrace=false \
145+ # -Dclirr.skip=true \
146+ # -Denforcer.skip=true \
147+ # -fae \
148+ # verify
149+
150+ repo=
" [email protected] :googleapis/java-bigquery.git" 151+ repo_name=$( basename " ${repo} " .git)
152+ echo " ${repo_name} "
153+ git clone " ${repo} "
154+ pushd " ${repo_name} "
155+ pwd
156+ mvn install -B -V -ntp \
157+ -DskipTests=true \
158+ -Dclirr.skip=true \
159+ -Denforcer.skip=true \
160+ -Dmaven.javadoc.skip=true \
161+ -Dgcloud.download.skip=true \
162+ -T 1C
163+ mvn clean verify -Penable-integration-tests -Dclirr.skip=true -Denforcer.skip=true
164+ popd
71165 RETURN_CODE=$?
72166 ;;
73167graalvm)
0 commit comments