aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/internal_ci/helper_scripts/prepare_build_linux_perf_rc
diff options
context:
space:
mode:
authorGravatar Matt Kwong <mattkwong@google.com>2017-08-21 08:09:06 -0700
committerGravatar Matt Kwong <mattkwong@google.com>2017-09-15 15:20:49 -0700
commitf68858464afd15402e09f480938e5efc6c7ff02f (patch)
tree7c90c74f523e7b5ff8b2d0b3ac61a2e08a91e61e /tools/internal_ci/helper_scripts/prepare_build_linux_perf_rc
parent2346480d721e1f9bb93226d8e5b172e7ffb093c2 (diff)
Add Kokoro perf PR jobs
Diffstat (limited to 'tools/internal_ci/helper_scripts/prepare_build_linux_perf_rc')
-rw-r--r--tools/internal_ci/helper_scripts/prepare_build_linux_perf_rc15
1 files changed, 15 insertions, 0 deletions
diff --git a/tools/internal_ci/helper_scripts/prepare_build_linux_perf_rc b/tools/internal_ci/helper_scripts/prepare_build_linux_perf_rc
index 1b7779caa8..dc3c75a6a1 100644
--- a/tools/internal_ci/helper_scripts/prepare_build_linux_perf_rc
+++ b/tools/internal_ci/helper_scripts/prepare_build_linux_perf_rc
@@ -19,4 +19,19 @@
ulimit -n 32768
ulimit -c unlimited
+# Performance PR testing needs GH API key and PR metadata to comment results
+if [ -n "$KOKORO_GITHUB_PULL_REQUEST_NUMBER" ]; then
+ set +x
+ sudo apt-get install -y jq
+ export ghprbTargetBranch=$(curl -s https://api.github.com/repos/grpc/grpc/pulls/$KOKORO_GITHUB_PULL_REQUEST_NUMBER | jq -r .base.ref)
+
+ gsutil cp gs://grpc-testing-secrets/github_credentials/oauth_token.txt ~/
+ # TODO(matt-kwong): rename this to GITHUB_OAUTH_TOKEN after Jenkins deprecation
+ export JENKINS_OAUTH_TOKEN=$(cat ~/oauth_token.txt)
+ export ghprbPullId=$KOKORO_GITHUB_PULL_REQUEST_NUMBER
+ set -x
+fi
+
+sudo pip install tabulate
+
git submodule update --init