Skip to content
This repository was archived by the owner on Mar 3, 2026. It is now read-only.

Commit c962a7e

Browse files
dpebotjkwlui
authored andcommitted
build: bring in latest kokoro cfgs to run System tests on PRs (#413)
* Re-generate library using /synth.py * add missing keys
1 parent 6c32789 commit c962a7e

10 files changed

Lines changed: 35 additions & 4 deletions

File tree

.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'

.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) {

.kokoro/pre-system-test.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,6 @@
1818
# system test key
1919
export GCN_STORAGE_2ND_PROJECT_ID=gcloud-node-whitelist-ci-tests
2020
export GCN_STORAGE_2ND_PROJECT_KEY=${KOKORO_GFILE_DIR}/no-whitelist-key.json
21+
22+
export GOOGLE_CLOUD_KMS_KEY_ASIA="projects/long-door-651/locations/asia/keyRings/test-key-asia/cryptoKeys/test-key-asia"
23+
export GOOGLE_CLOUD_KMS_KEY_US="projects/long-door-651/locations/us/keyRings/test-key-us/cryptoKeys/test-key-us"
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-storage/.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-storage/.kokoro/system-test.sh"
7+
}

.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

.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

.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

.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

codecov.yaml

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)