Skip to content

Commit 1745387

Browse files
dpebotJustinBeckwith
authored andcommitted
Update kokoro config (#220)
1 parent ed01bd7 commit 1745387

10 files changed

Lines changed: 43 additions & 4 deletions

File tree

handwritten/error-reporting/.circleci/config.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,6 @@ jobs:
6868
environment:
6969
NPM_CONFIG_PREFIX: /home/node/.npm-global
7070
- run: npm test
71-
- run: node_modules/.bin/codecov
72-
7371
node8:
7472
docker:
7573
- image: 'node:8'

handwritten/error-reporting/.circleci/npm-install-retry.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ let spawn = require('child_process').spawn;
66
//USE: ./index.js <ms npm can be idle> <number of attempts> [... NPM ARGS]
77
//
88

9-
let timeout = process.argv[2] || 60000;
9+
let timeout = process.argv[2] || process.env.NPM_INSTALL_TIMEOUT || 60000;
1010
let attempts = process.argv[3] || 3;
1111
let args = process.argv.slice(4);
1212
if (args.length === 0) {

handwritten/error-reporting/.kokoro/common.cfg

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,17 @@ gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline"
1313
# Use the trampoline script to run in docker.
1414
build_file: "nodejs-error-reporting/.kokoro/trampoline.sh"
1515

16+
# Bring in codecov.io master token into the build as $KOKORO_KEYSTORE_DIR/73713_dpebot_codecov_token
17+
before_action {
18+
fetch_keystore {
19+
keystore_resource {
20+
keystore_config_id: 73713
21+
keyname: "dpebot_codecov_token"
22+
backend_type: FASTCONFIGPUSH
23+
}
24+
}
25+
}
26+
1627
# Configure the docker image for kokoro-trampoline.
1728
env_vars: {
1829
key: "TRAMPOLINE_IMAGE"
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Download resources for system tests (service account key, etc.)
2+
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/google-cloud-nodejs"
3+
4+
env_vars: {
5+
key: "TRAMPOLINE_BUILD_FILE"
6+
value: "github/nodejs-error-reporting/.kokoro/samples-test.sh"
7+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Download resources for system tests (service account key, etc.)
2+
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/google-cloud-nodejs"
3+
4+
env_vars: {
5+
key: "TRAMPOLINE_BUILD_FILE"
6+
value: "github/nodejs-error-reporting/.kokoro/system-test.sh"
7+
}

handwritten/error-reporting/.kokoro/samples-test.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,13 @@ export GCLOUD_PROJECT=long-door-651
2424

2525
cd $(dirname $0)/..
2626

27+
# Run a pre-test hook, if a pre-samples-test.sh is in the project
28+
if [ -f .kokoro/pre-samples-test.sh ]; then
29+
set +x
30+
. .kokoro/pre-samples-test.sh
31+
set -x
32+
fi
33+
2734
npm install
2835

2936
# Install and link samples

handwritten/error-reporting/.kokoro/system-test.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@ cd $(dirname $0)/..
2626

2727
# Run a pre-test hook, if a pre-system-test.sh is in the project
2828
if [ -f .kokoro/pre-system-test.sh ]; then
29+
set +x
2930
. .kokoro/pre-system-test.sh
31+
set -x
3032
fi
3133

3234
npm install

handwritten/error-reporting/.kokoro/test.bat

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
cd /d %~dp0
1818
cd ..
1919

20+
call npm install -g npm@5 || goto :error
21+
2022
call npm install || goto :error
2123
call npm run test || goto :error
2224

handwritten/error-reporting/.kokoro/test.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,5 @@ cd $(dirname $0)/..
2222

2323
npm install
2424
npm test
25-
node_modules/.bin/codecov
25+
26+
bash $KOKORO_GFILE_DIR/codecov.sh
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
codecov:
3+
ci:
4+
- source.cloud.google.com

0 commit comments

Comments
 (0)