Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 40 additions & 9 deletions .kokoro/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,7 @@ fi
if [[ -n "${BUILD_SUBDIR}" ]]
then
echo "Compiling and building all modules for ${BUILD_SUBDIR}"
mvn clean install \
-DskipTests \
-Dclirr.skip \
-Dflatten.skip \
-Dcheckstyle.skip \
-Djacoco.skip \
-Denforcer.skip \
--also-make \
--projects "${BUILD_SUBDIR}"
install_modules "${BUILD_SUBDIR}"
echo "Running in subdir: ${BUILD_SUBDIR}"
pushd "${BUILD_SUBDIR}"
fi
Expand Down Expand Up @@ -85,6 +77,28 @@ case ${JOB_TYPE} in
echo "No Integration Tests to run"
fi
;;
integration-single)
echo "SUREFIRE_JVM_OPT: ${SUREFIRE_JVM_OPT}"
echo "INTEGRATION_TEST_ARGS: ${INTEGRATION_TEST_ARGS}"
mvn verify -Penable-integration-tests \
${INTEGRATION_TEST_ARGS} \
-B -ntp -fae \
-DtrimStackTrace=false \
-Dclirr.skip=true \
-Denforcer.skip=true \
-Dorg.slf4j.simpleLogger.showDateTime=true \
-Dorg.slf4j.simpleLogger.dateTimeFormat=HH:mm:ss:SSS \
-Dcheckstyle.skip=true \
-Dflatten.skip=true \
-Danimal.sniffer.skip=true \
-Djacoco.skip=true \
-DskipUnitTests=true \
-Dmaven.wagon.http.retryHandler.count=5 \
-T 1C ${SUREFIRE_JVM_OPT}

RETURN_CODE=$?
printf "Finished integration tests for modules:\n%s\n" "${BUILD_SUBDIR}"
;;
graalvm-presubmit)
generate_graalvm_presubmit_modules_list
if [[ "$(release_please_snapshot_pull_request)" == "true" ]]; then
Expand All @@ -109,6 +123,23 @@ case ${JOB_TYPE} in
echo "Not running GraalVM checks -- No changes in relevant modules"
fi
;;
graalvm-single)
echo "INTEGRATION_TEST_ARGS: ${INTEGRATION_TEST_ARGS}"
mvn test -Pnative \
${INTEGRATION_TEST_ARGS} \
-B -ntp -fae \
-DtrimStackTrace=false \
-Dclirr.skip=true \
-Denforcer.skip=true \
-Dorg.slf4j.simpleLogger.showDateTime=true \
-Dorg.slf4j.simpleLogger.dateTimeFormat=HH:mm:ss:SSS \
-Dcheckstyle.skip=true \
-Dflatten.skip=true \
-Danimal.sniffer.skip=true

RETURN_CODE=$?
printf "Finished GraalVM ITs for modules:\n%s\n" "${BUILD_SUBDIR}"
;;
lint)
if [ -n "${BASE_SHA}" ] && [ -n "${HEAD_SHA}" ]; then
changed_file_list=$(git diff --name-only "${BASE_SHA}" "${HEAD_SHA}")
Expand Down
14 changes: 8 additions & 6 deletions .kokoro/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,13 @@
# See the License for the specific language governing permissions and
# limitations under the License.

excluded_modules=('gapic-libraries-bom' 'google-cloud-jar-parent' 'google-cloud-pom-parent' 'java-vertexai')
excluded_modules=(
'gapic-libraries-bom'
'google-cloud-jar-parent'
'google-cloud-pom-parent'
'java-vertexai',
'java-logging'
)

function retry_with_backoff {
attempts_left=$1
Expand Down Expand Up @@ -56,10 +62,8 @@ function retry_with_backoff {
# Given a folder containing a maven multi-module, assign the variable 'submodules' to a
# comma-delimited list of <folder>/<submodule>.
function parse_submodules() {
pushd "$1" >/dev/null

submodules_array=()
mvn_submodules=$(mvn help:evaluate -Dexpression=project.modules)
mvn_submodules=$(mvn help:evaluate -Dexpression=project.modules -pl "$1")
if mvn_submodules=$(grep '<.*>.*</.*>' <<< "$mvn_submodules"); then
mvn_submodules=$(sed -e 's/<.*>\(.*\)<\/.*>/\1/g' <<< "$mvn_submodules")
for submodule in $mvn_submodules; do
Expand All @@ -77,8 +81,6 @@ function parse_submodules() {
echo "${submodules_array[*]}"
)
export submodules

popd >/dev/null
}

# Given a list of folders containing maven multi-modules, assign the variable 'all_submodules' to a
Expand Down
2 changes: 2 additions & 0 deletions .kokoro/dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ export MAVEN_OPTS=$(determineMavenOpts)

if [[ -n "${BUILD_SUBDIR}" ]]
then
echo "Compiling and building all modules for ${BUILD_SUBDIR}"
install_dependencies "${BUILD_SUBDIR}"
echo "Running in subdir: ${BUILD_SUBDIR}"
pushd "${BUILD_SUBDIR}"
fi
Expand Down
38 changes: 38 additions & 0 deletions .kokoro/presubmit/logging-graalvm-native-presubmit.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Format: //devtools/kokoro/config/proto/build.proto

# Configure the docker image for kokoro-trampoline.
env_vars: {
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-public-resources/graalvm_sdk_platform_a:3.56.1"
}

env_vars: {
key: "JOB_TYPE"
value: "graalvm-single"
}

# TODO: remove this after we've migrated all tests and scripts
env_vars: {
key: "GCLOUD_PROJECT"
value: "cloud-java-ci-test"
}

env_vars: {
key: "GOOGLE_CLOUD_PROJECT"
value: "cloud-java-ci-test"
}

env_vars: {
key: "GOOGLE_APPLICATION_CREDENTIALS"
value: "secret_manager/cloud-java-ci-it-service-account"
}

env_vars: {
key: "SECRET_MANAGER_KEYS"
value: "cloud-java-ci-it-service-account, java-bigqueryconnection-samples-secrets"
}

env_vars: {
key: "BUILD_SUBDIR"
value: "java-logging"
}
38 changes: 38 additions & 0 deletions .kokoro/presubmit/logging-integration.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Format: //devtools/kokoro/config/proto/build.proto

# Configure the docker image for kokoro-trampoline.
env_vars: {
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-kokoro-resources/java11"
}

env_vars: {
key: "JOB_TYPE"
value: "integration-single"
}

# TODO: remove this after we've migrated all tests and scripts
env_vars: {
key: "GCLOUD_PROJECT"
value: "cloud-java-ci-test"
}

env_vars: {
key: "GOOGLE_CLOUD_PROJECT"
value: "cloud-java-ci-test"
}

env_vars: {
key: "GOOGLE_APPLICATION_CREDENTIALS"
value: "secret_manager/cloud-java-ci-it-service-account"
}

env_vars: {
key: "SECRET_MANAGER_KEYS"
value: "cloud-java-ci-it-service-account, java-bigqueryconnection-samples-secrets"
}

env_vars: {
key: "BUILD_SUBDIR"
value: "java-logging"
}
Loading