Skip to content

Commit 755c0de

Browse files
committed
restore .kokoro folder
1 parent c908f7b commit 755c0de

37 files changed

+24
-1332
lines changed

hermetic_build/library_generation/owlbot/templates/java_library/.kokoro/build.bat

Lines changed: 0 additions & 18 deletions
This file was deleted.
Lines changed: 10 additions & 117 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
#!/bin/bash
2-
# Copyright 2019 Google LLC
2+
3+
# Copyright 2018 Google LLC
34
#
45
# Licensed under the Apache License, Version 2.0 (the "License");
56
# you may not use this file except in compliance with the License.
67
# You may obtain a copy of the License at
78
#
8-
# http://www.apache.org/licenses/LICENSE-2.0
9+
# https://www.apache.org/licenses/LICENSE-2.0
910
#
1011
# Unless required by applicable law or agreed to in writing, software
1112
# distributed under the License is distributed on an "AS IS" BASIS,
@@ -15,121 +16,13 @@
1516

1617
set -eo pipefail
1718

18-
## Get the directory of the build script
19-
scriptDir=$(realpath $(dirname "${BASH_SOURCE[0]}"))
20-
## cd to the parent directory, i.e. the root of the git repo
21-
cd ${scriptDir}/..
22-
23-
# include common functions
24-
source ${scriptDir}/common.sh
25-
26-
# Print out Maven & Java version
27-
mvn -version
28-
echo ${JOB_TYPE}
29-
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-
-Dmaven.javadoc.skip=true \
37-
-Dgcloud.download.skip=true \
38-
-T 1C
39-
40-
# if GOOGLE_APPLICATION_CREDENTIALS is specified as a relative path, prepend Kokoro root directory onto it
41-
if [[ ! -z "${GOOGLE_APPLICATION_CREDENTIALS}" && "${GOOGLE_APPLICATION_CREDENTIALS}" != /* ]]; then
42-
export GOOGLE_APPLICATION_CREDENTIALS=$(realpath ${KOKORO_GFILE_DIR}/${GOOGLE_APPLICATION_CREDENTIALS})
43-
fi
44-
45-
RETURN_CODE=0
46-
set +e
47-
48-
case ${JOB_TYPE} in
49-
test)
50-
echo "SUREFIRE_JVM_OPT: ${SUREFIRE_JVM_OPT}"
51-
mvn test -B -ntp -Dclirr.skip=true -Denforcer.skip=true ${SUREFIRE_JVM_OPT}
52-
RETURN_CODE=$?
53-
;;
54-
lint)
55-
mvn com.coveo:fmt-maven-plugin:check -B -ntp
56-
RETURN_CODE=$?
57-
;;
58-
javadoc)
59-
mvn javadoc:javadoc javadoc:test-javadoc -B -ntp
60-
RETURN_CODE=$?
61-
;;
62-
integration)
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
71-
RETURN_CODE=$?
72-
;;
73-
graalvm)
74-
# Run Unit and Integration Tests with Native Image
75-
mvn -B ${INTEGRATION_TEST_ARGS} -ntp -Pnative test
76-
RETURN_CODE=$?
77-
;;
78-
graalvm17)
79-
# Run Unit and Integration Tests with Native Image
80-
mvn -B ${INTEGRATION_TEST_ARGS} -ntp -Pnative test
81-
RETURN_CODE=$?
82-
;;
83-
samples)
84-
SAMPLES_DIR=samples
85-
# only run ITs in snapshot/ on presubmit PRs. run ITs in all 3 samples/ subdirectories otherwise.
86-
if [[ ! -z ${KOKORO_GITHUB_PULL_REQUEST_NUMBER} ]]
87-
then
88-
SAMPLES_DIR=samples/snapshot
89-
fi
90-
91-
if [[ -f ${SAMPLES_DIR}/pom.xml ]]
92-
then
93-
for FILE in ${KOKORO_GFILE_DIR}/secret_manager/*-samples-secrets; do
94-
[[ -f "$FILE" ]] || continue
95-
source "$FILE"
96-
done
97-
98-
pushd ${SAMPLES_DIR}
99-
mvn -B \
100-
-ntp \
101-
-DtrimStackTrace=false \
102-
-Dclirr.skip=true \
103-
-Denforcer.skip=true \
104-
-fae \
105-
verify
106-
RETURN_CODE=$?
107-
popd
108-
else
109-
echo "no sample pom.xml found - skipping sample tests"
110-
fi
111-
;;
112-
clirr)
113-
mvn -B -ntp -Denforcer.skip=true clirr:check
114-
RETURN_CODE=$?
115-
;;
116-
*)
117-
;;
118-
esac
119-
120-
if [ "${REPORT_COVERAGE}" == "true" ]
121-
then
122-
bash ${KOKORO_GFILE_DIR}/codecov.sh
123-
fi
19+
cd github/synthtool
12420

125-
# fix output location of logs
126-
bash .kokoro/coerce_logs.sh
21+
# Disable buffering, so that the logs stream through.
22+
export PYTHONUNBUFFERED=1
12723

128-
if [[ "${ENABLE_FLAKYBOT}" == "true" ]]
129-
then
130-
chmod +x ${KOKORO_GFILE_DIR}/linux_amd64/flakybot
131-
${KOKORO_GFILE_DIR}/linux_amd64/flakybot -repo={{metadata['repo']['repo']}}
132-
fi
24+
# Run tests
25+
nox -s lint test
13326

134-
echo "exiting with ${RETURN_CODE}"
135-
exit ${RETURN_CODE}
27+
# remove all files, preventing kokoro from trying to sync them.
28+
rm -rf *

hermetic_build/library_generation/owlbot/templates/java_library/.kokoro/coerce_logs.sh

Lines changed: 0 additions & 37 deletions
This file was deleted.
Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,19 @@
11
# Format: //devtools/kokoro/config/proto/build.proto
22

3-
# Download trampoline resources. These will be in ${KOKORO_GFILE_DIR}
3+
# Download trampoline resources.
44
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline"
55

6-
# All builds use the trampoline script to run in docker.
7-
build_file: "{{ metadata['repo']['repo_short'] }}/.kokoro/trampoline.sh"
6+
# Use the trampoline script to run in docker.
7+
build_file: "synthtool/.kokoro/trampoline.sh"
8+
9+
# Configure the docker image for kokoro-trampoline.
10+
env_vars: {
11+
key: "TRAMPOLINE_IMAGE"
12+
value: "gcr.io/cloud-devrel-kokoro-resources/python"
13+
}
814

915
# Tell the trampoline which build file to use.
1016
env_vars: {
11-
key: "TRAMPOLINE_BUILD_FILE"
12-
value: "github/{{ metadata['repo']['repo_short'] }}/.kokoro/build.sh"
17+
key: "TRAMPOLINE_BUILD_FILE"
18+
value: "github/synthtool/.kokoro/build.sh"
1319
}

hermetic_build/library_generation/owlbot/templates/java_library/.kokoro/common.sh

Lines changed: 0 additions & 60 deletions
This file was deleted.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Format: //devtools/kokoro/config/proto/build.proto

hermetic_build/library_generation/owlbot/templates/java_library/.kokoro/continuous/common.cfg

Lines changed: 0 additions & 25 deletions
This file was deleted.

hermetic_build/library_generation/owlbot/templates/java_library/.kokoro/continuous/java8.cfg

Lines changed: 0 additions & 12 deletions
This file was deleted.

hermetic_build/library_generation/owlbot/templates/java_library/.kokoro/dependencies.sh

Lines changed: 0 additions & 59 deletions
This file was deleted.

0 commit comments

Comments
 (0)