From 4869f78b2e0885ae28765f17ee1f9fa99db2ba32 Mon Sep 17 00:00:00 2001 From: DPE bot Date: Tue, 2 Oct 2018 08:20:14 -0700 Subject: [PATCH] Update kokoro config (#482) --- .circleci/config.yml | 2 -- .circleci/npm-install-retry.js | 2 +- .github/ISSUE_TEMPLATE.md | 2 +- .kokoro/common.cfg | 15 +++++++++++++-- .kokoro/continuous/node10/common.cfg | 4 ++-- .kokoro/continuous/node6/common.cfg | 4 ++-- .kokoro/continuous/node8/common.cfg | 4 ++-- .kokoro/continuous/node8/docs.cfg | 2 +- .kokoro/continuous/node8/lint.cfg | 2 +- .kokoro/continuous/node8/samples-test.cfg | 2 +- .kokoro/continuous/node8/system-test.cfg | 2 +- .kokoro/presubmit/node10/common.cfg | 4 ++-- .kokoro/presubmit/node6/common.cfg | 4 ++-- .kokoro/presubmit/node8/common.cfg | 4 ++-- .kokoro/presubmit/node8/docs.cfg | 2 +- .kokoro/presubmit/node8/lint.cfg | 2 +- .kokoro/presubmit/node8/samples-test.cfg | 7 +++++++ .kokoro/presubmit/node8/system-test.cfg | 7 +++++++ .kokoro/presubmit/windows/test.cfg | 2 +- .kokoro/samples-test.sh | 7 +++++++ .kokoro/system-test.sh | 2 ++ .kokoro/test.bat | 2 ++ .kokoro/test.sh | 3 ++- codecov.yaml | 4 ++++ 24 files changed, 65 insertions(+), 26 deletions(-) create mode 100644 .kokoro/presubmit/node8/samples-test.cfg create mode 100644 .kokoro/presubmit/node8/system-test.cfg create mode 100644 codecov.yaml diff --git a/.circleci/config.yml b/.circleci/config.yml index 8af6a4d0..da54155f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -68,8 +68,6 @@ jobs: environment: NPM_CONFIG_PREFIX: /home/node/.npm-global - run: npm test - - run: node_modules/.bin/codecov - node8: docker: - image: 'node:8' diff --git a/.circleci/npm-install-retry.js b/.circleci/npm-install-retry.js index ae3220d7..3240aa2c 100755 --- a/.circleci/npm-install-retry.js +++ b/.circleci/npm-install-retry.js @@ -6,7 +6,7 @@ let spawn = require('child_process').spawn; //USE: ./index.js [... NPM ARGS] // -let timeout = process.argv[2] || 60000; +let timeout = process.argv[2] || process.env.NPM_INSTALL_TIMEOUT || 60000; let attempts = process.argv[3] || 3; let args = process.argv.slice(4); if (args.length === 0) { diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md index 6d415a03..1c1e676d 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE.md @@ -3,7 +3,7 @@ Thanks for stopping by to let us know something could be better! Please run down the following list and make sure you've tried the usual "quick fixes": - - Search the issues already opened: https://github.com/google/google-auth-library-nodejs.git/issues + - Search the issues already opened: https://github.com/google/google-auth-library-nodejs/issues - Search the issues on our "catch-all" repository: https://github.com/GoogleCloudPlatform/google-cloud-node - Search StackOverflow: http://stackoverflow.com/questions/tagged/google-cloud-platform+node.js diff --git a/.kokoro/common.cfg b/.kokoro/common.cfg index 195870c2..0b0afd9a 100644 --- a/.kokoro/common.cfg +++ b/.kokoro/common.cfg @@ -11,7 +11,18 @@ action { gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" # Use the trampoline script to run in docker. -build_file: "google-auth-library-nodejs.git/.kokoro/trampoline.sh" +build_file: "google-auth-library-nodejs/.kokoro/trampoline.sh" + +# Bring in codecov.io master token into the build as $KOKORO_KEYSTORE_DIR/73713_dpebot_codecov_token +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "dpebot_codecov_token" + backend_type: FASTCONFIGPUSH + } + } +} # Configure the docker image for kokoro-trampoline. env_vars: { @@ -20,5 +31,5 @@ env_vars: { } env_vars: { key: "TRAMPOLINE_BUILD_FILE" - value: "github/google-auth-library-nodejs.git/.kokoro/test.sh" + value: "github/google-auth-library-nodejs/.kokoro/test.sh" } diff --git a/.kokoro/continuous/node10/common.cfg b/.kokoro/continuous/node10/common.cfg index 195870c2..e3c7faf0 100644 --- a/.kokoro/continuous/node10/common.cfg +++ b/.kokoro/continuous/node10/common.cfg @@ -11,7 +11,7 @@ action { gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" # Use the trampoline script to run in docker. -build_file: "google-auth-library-nodejs.git/.kokoro/trampoline.sh" +build_file: "google-auth-library-nodejs/.kokoro/trampoline.sh" # Configure the docker image for kokoro-trampoline. env_vars: { @@ -20,5 +20,5 @@ env_vars: { } env_vars: { key: "TRAMPOLINE_BUILD_FILE" - value: "github/google-auth-library-nodejs.git/.kokoro/test.sh" + value: "github/google-auth-library-nodejs/.kokoro/test.sh" } diff --git a/.kokoro/continuous/node6/common.cfg b/.kokoro/continuous/node6/common.cfg index 83760a04..0a307290 100644 --- a/.kokoro/continuous/node6/common.cfg +++ b/.kokoro/continuous/node6/common.cfg @@ -11,7 +11,7 @@ action { gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" # Use the trampoline script to run in docker. -build_file: "google-auth-library-nodejs.git/.kokoro/trampoline.sh" +build_file: "google-auth-library-nodejs/.kokoro/trampoline.sh" # Configure the docker image for kokoro-trampoline. env_vars: { @@ -20,5 +20,5 @@ env_vars: { } env_vars: { key: "TRAMPOLINE_BUILD_FILE" - value: "github/google-auth-library-nodejs.git/.kokoro/test.sh" + value: "github/google-auth-library-nodejs/.kokoro/test.sh" } diff --git a/.kokoro/continuous/node8/common.cfg b/.kokoro/continuous/node8/common.cfg index 34328dd4..e3a36c7f 100644 --- a/.kokoro/continuous/node8/common.cfg +++ b/.kokoro/continuous/node8/common.cfg @@ -11,7 +11,7 @@ action { gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" # Use the trampoline script to run in docker. -build_file: "google-auth-library-nodejs.git/.kokoro/trampoline.sh" +build_file: "google-auth-library-nodejs/.kokoro/trampoline.sh" # Configure the docker image for kokoro-trampoline. env_vars: { @@ -20,5 +20,5 @@ env_vars: { } env_vars: { key: "TRAMPOLINE_BUILD_FILE" - value: "github/google-auth-library-nodejs.git/.kokoro/test.sh" + value: "github/google-auth-library-nodejs/.kokoro/test.sh" } diff --git a/.kokoro/continuous/node8/docs.cfg b/.kokoro/continuous/node8/docs.cfg index 0dcaa112..213beda5 100644 --- a/.kokoro/continuous/node8/docs.cfg +++ b/.kokoro/continuous/node8/docs.cfg @@ -1,4 +1,4 @@ env_vars: { key: "TRAMPOLINE_BUILD_FILE" - value: "github/google-auth-library-nodejs.git/.kokoro/docs.sh" + value: "github/google-auth-library-nodejs/.kokoro/docs.sh" } diff --git a/.kokoro/continuous/node8/lint.cfg b/.kokoro/continuous/node8/lint.cfg index 2605906e..49ffcd82 100644 --- a/.kokoro/continuous/node8/lint.cfg +++ b/.kokoro/continuous/node8/lint.cfg @@ -1,4 +1,4 @@ env_vars: { key: "TRAMPOLINE_BUILD_FILE" - value: "github/google-auth-library-nodejs.git/.kokoro/lint.sh" + value: "github/google-auth-library-nodejs/.kokoro/lint.sh" } diff --git a/.kokoro/continuous/node8/samples-test.cfg b/.kokoro/continuous/node8/samples-test.cfg index 307855b6..308a084d 100644 --- a/.kokoro/continuous/node8/samples-test.cfg +++ b/.kokoro/continuous/node8/samples-test.cfg @@ -3,5 +3,5 @@ gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/google-cloud-nodejs" env_vars: { key: "TRAMPOLINE_BUILD_FILE" - value: "github/google-auth-library-nodejs.git/.kokoro/samples-test.sh" + value: "github/google-auth-library-nodejs/.kokoro/samples-test.sh" } diff --git a/.kokoro/continuous/node8/system-test.cfg b/.kokoro/continuous/node8/system-test.cfg index a8e2cb41..bb5fd2ad 100644 --- a/.kokoro/continuous/node8/system-test.cfg +++ b/.kokoro/continuous/node8/system-test.cfg @@ -3,5 +3,5 @@ gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/google-cloud-nodejs" env_vars: { key: "TRAMPOLINE_BUILD_FILE" - value: "github/google-auth-library-nodejs.git/.kokoro/system-test.sh" + value: "github/google-auth-library-nodejs/.kokoro/system-test.sh" } diff --git a/.kokoro/presubmit/node10/common.cfg b/.kokoro/presubmit/node10/common.cfg index 195870c2..e3c7faf0 100644 --- a/.kokoro/presubmit/node10/common.cfg +++ b/.kokoro/presubmit/node10/common.cfg @@ -11,7 +11,7 @@ action { gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" # Use the trampoline script to run in docker. -build_file: "google-auth-library-nodejs.git/.kokoro/trampoline.sh" +build_file: "google-auth-library-nodejs/.kokoro/trampoline.sh" # Configure the docker image for kokoro-trampoline. env_vars: { @@ -20,5 +20,5 @@ env_vars: { } env_vars: { key: "TRAMPOLINE_BUILD_FILE" - value: "github/google-auth-library-nodejs.git/.kokoro/test.sh" + value: "github/google-auth-library-nodejs/.kokoro/test.sh" } diff --git a/.kokoro/presubmit/node6/common.cfg b/.kokoro/presubmit/node6/common.cfg index 83760a04..0a307290 100644 --- a/.kokoro/presubmit/node6/common.cfg +++ b/.kokoro/presubmit/node6/common.cfg @@ -11,7 +11,7 @@ action { gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" # Use the trampoline script to run in docker. -build_file: "google-auth-library-nodejs.git/.kokoro/trampoline.sh" +build_file: "google-auth-library-nodejs/.kokoro/trampoline.sh" # Configure the docker image for kokoro-trampoline. env_vars: { @@ -20,5 +20,5 @@ env_vars: { } env_vars: { key: "TRAMPOLINE_BUILD_FILE" - value: "github/google-auth-library-nodejs.git/.kokoro/test.sh" + value: "github/google-auth-library-nodejs/.kokoro/test.sh" } diff --git a/.kokoro/presubmit/node8/common.cfg b/.kokoro/presubmit/node8/common.cfg index 34328dd4..e3a36c7f 100644 --- a/.kokoro/presubmit/node8/common.cfg +++ b/.kokoro/presubmit/node8/common.cfg @@ -11,7 +11,7 @@ action { gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" # Use the trampoline script to run in docker. -build_file: "google-auth-library-nodejs.git/.kokoro/trampoline.sh" +build_file: "google-auth-library-nodejs/.kokoro/trampoline.sh" # Configure the docker image for kokoro-trampoline. env_vars: { @@ -20,5 +20,5 @@ env_vars: { } env_vars: { key: "TRAMPOLINE_BUILD_FILE" - value: "github/google-auth-library-nodejs.git/.kokoro/test.sh" + value: "github/google-auth-library-nodejs/.kokoro/test.sh" } diff --git a/.kokoro/presubmit/node8/docs.cfg b/.kokoro/presubmit/node8/docs.cfg index 0dcaa112..213beda5 100644 --- a/.kokoro/presubmit/node8/docs.cfg +++ b/.kokoro/presubmit/node8/docs.cfg @@ -1,4 +1,4 @@ env_vars: { key: "TRAMPOLINE_BUILD_FILE" - value: "github/google-auth-library-nodejs.git/.kokoro/docs.sh" + value: "github/google-auth-library-nodejs/.kokoro/docs.sh" } diff --git a/.kokoro/presubmit/node8/lint.cfg b/.kokoro/presubmit/node8/lint.cfg index 2605906e..49ffcd82 100644 --- a/.kokoro/presubmit/node8/lint.cfg +++ b/.kokoro/presubmit/node8/lint.cfg @@ -1,4 +1,4 @@ env_vars: { key: "TRAMPOLINE_BUILD_FILE" - value: "github/google-auth-library-nodejs.git/.kokoro/lint.sh" + value: "github/google-auth-library-nodejs/.kokoro/lint.sh" } diff --git a/.kokoro/presubmit/node8/samples-test.cfg b/.kokoro/presubmit/node8/samples-test.cfg new file mode 100644 index 00000000..308a084d --- /dev/null +++ b/.kokoro/presubmit/node8/samples-test.cfg @@ -0,0 +1,7 @@ +# Download resources for system tests (service account key, etc.) +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/google-cloud-nodejs" + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/google-auth-library-nodejs/.kokoro/samples-test.sh" +} diff --git a/.kokoro/presubmit/node8/system-test.cfg b/.kokoro/presubmit/node8/system-test.cfg new file mode 100644 index 00000000..bb5fd2ad --- /dev/null +++ b/.kokoro/presubmit/node8/system-test.cfg @@ -0,0 +1,7 @@ +# Download resources for system tests (service account key, etc.) +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/google-cloud-nodejs" + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/google-auth-library-nodejs/.kokoro/system-test.sh" +} diff --git a/.kokoro/presubmit/windows/test.cfg b/.kokoro/presubmit/windows/test.cfg index ab4c4966..a9d1a4e4 100644 --- a/.kokoro/presubmit/windows/test.cfg +++ b/.kokoro/presubmit/windows/test.cfg @@ -1,2 +1,2 @@ # Use the test file directly -build_file: "google-auth-library-nodejs.git/.kokoro/test.bat" +build_file: "google-auth-library-nodejs/.kokoro/test.bat" diff --git a/.kokoro/samples-test.sh b/.kokoro/samples-test.sh index 76edbbbb..5a81ec01 100755 --- a/.kokoro/samples-test.sh +++ b/.kokoro/samples-test.sh @@ -24,6 +24,13 @@ export GCLOUD_PROJECT=long-door-651 cd $(dirname $0)/.. +# Run a pre-test hook, if a pre-samples-test.sh is in the project +if [ -f .kokoro/pre-samples-test.sh ]; then + set +x + . .kokoro/pre-samples-test.sh + set -x +fi + npm install # Install and link samples diff --git a/.kokoro/system-test.sh b/.kokoro/system-test.sh index a954b794..fd8f0b63 100755 --- a/.kokoro/system-test.sh +++ b/.kokoro/system-test.sh @@ -26,7 +26,9 @@ cd $(dirname $0)/.. # Run a pre-test hook, if a pre-system-test.sh is in the project if [ -f .kokoro/pre-system-test.sh ]; then + set +x . .kokoro/pre-system-test.sh + set -x fi npm install diff --git a/.kokoro/test.bat b/.kokoro/test.bat index a8534ba8..d6047366 100644 --- a/.kokoro/test.bat +++ b/.kokoro/test.bat @@ -17,6 +17,8 @@ cd /d %~dp0 cd .. +call npm install -g npm@5 || goto :error + call npm install || goto :error call npm run test || goto :error diff --git a/.kokoro/test.sh b/.kokoro/test.sh index 51f29589..eb25b89b 100755 --- a/.kokoro/test.sh +++ b/.kokoro/test.sh @@ -22,4 +22,5 @@ cd $(dirname $0)/.. npm install npm test -node_modules/.bin/codecov + +bash $KOKORO_GFILE_DIR/codecov.sh diff --git a/codecov.yaml b/codecov.yaml new file mode 100644 index 00000000..5724ea94 --- /dev/null +++ b/codecov.yaml @@ -0,0 +1,4 @@ +--- +codecov: + ci: + - source.cloud.google.com