From a744ea2441615f4f6843c6c0ec5681ec5eeb3f2c Mon Sep 17 00:00:00 2001 From: dpebot Date: Mon, 10 Sep 2018 04:25:58 -0700 Subject: [PATCH] Re-generate library using /synth.py --- .circleci/config.yml | 11 +++++++---- .kokoro/common.cfg | 2 +- .kokoro/continuous/node10/common.cfg | 2 +- .kokoro/continuous/node6/common.cfg | 2 +- .kokoro/continuous/node8/common.cfg | 2 +- .kokoro/docs.sh | 2 ++ .kokoro/lint.sh | 2 ++ .kokoro/presubmit/node10/common.cfg | 2 +- .kokoro/presubmit/node6/common.cfg | 2 +- .kokoro/presubmit/node8/common.cfg | 2 +- .kokoro/samples-test.sh | 2 ++ .kokoro/system-test.sh | 8 ++++++++ .kokoro/test.sh | 2 ++ 13 files changed, 30 insertions(+), 11 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 80dcf7e67..8af6a4d04 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -149,21 +149,24 @@ jobs: name: Decrypt credentials. command: | if ! [[ -z "${SYSTEM_TESTS_ENCRYPTION_KEY}" ]]; then - openssl aes-256-cbc -d -in .circleci/key.json.enc \ - -out .circleci/key.json \ - -k "${SYSTEM_TESTS_ENCRYPTION_KEY}" + for encrypted_key in .circleci/*.json.enc; do + openssl aes-256-cbc -d -in $encrypted_key \ + -out $(echo $encrypted_key | sed 's/\.enc//') \ + -k "${SYSTEM_TESTS_ENCRYPTION_KEY}" + done fi - run: *npm_install_and_link - run: name: Run system tests. command: npm run system-test environment: + GCLOUD_PROJECT: long-door-651 GOOGLE_APPLICATION_CREDENTIALS: .circleci/key.json - run: name: Remove unencrypted key. command: | if ! [[ -z "${SYSTEM_TESTS_ENCRYPTION_KEY}" ]]; then - rm .circleci/key.json + rm .circleci/*.json fi when: always publish_npm: diff --git a/.kokoro/common.cfg b/.kokoro/common.cfg index e8bbb93db..28ef5923d 100644 --- a/.kokoro/common.cfg +++ b/.kokoro/common.cfg @@ -16,7 +16,7 @@ build_file: "nodejs-datastore/.kokoro/trampoline.sh" # Configure the docker image for kokoro-trampoline. env_vars: { key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/node:10" + value: "gcr.io/cloud-devrel-kokoro-resources/node:10-user" } env_vars: { key: "TRAMPOLINE_BUILD_FILE" diff --git a/.kokoro/continuous/node10/common.cfg b/.kokoro/continuous/node10/common.cfg index e8bbb93db..28ef5923d 100644 --- a/.kokoro/continuous/node10/common.cfg +++ b/.kokoro/continuous/node10/common.cfg @@ -16,7 +16,7 @@ build_file: "nodejs-datastore/.kokoro/trampoline.sh" # Configure the docker image for kokoro-trampoline. env_vars: { key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/node:10" + value: "gcr.io/cloud-devrel-kokoro-resources/node:10-user" } env_vars: { key: "TRAMPOLINE_BUILD_FILE" diff --git a/.kokoro/continuous/node6/common.cfg b/.kokoro/continuous/node6/common.cfg index 55c0ce02f..31fb70e77 100644 --- a/.kokoro/continuous/node6/common.cfg +++ b/.kokoro/continuous/node6/common.cfg @@ -16,7 +16,7 @@ build_file: "nodejs-datastore/.kokoro/trampoline.sh" # Configure the docker image for kokoro-trampoline. env_vars: { key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/node:6" + value: "gcr.io/cloud-devrel-kokoro-resources/node:6-user" } env_vars: { key: "TRAMPOLINE_BUILD_FILE" diff --git a/.kokoro/continuous/node8/common.cfg b/.kokoro/continuous/node8/common.cfg index bcf98f863..a28e5b75f 100644 --- a/.kokoro/continuous/node8/common.cfg +++ b/.kokoro/continuous/node8/common.cfg @@ -16,7 +16,7 @@ build_file: "nodejs-datastore/.kokoro/trampoline.sh" # Configure the docker image for kokoro-trampoline. env_vars: { key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/node:8" + value: "gcr.io/cloud-devrel-kokoro-resources/node:8-user" } env_vars: { key: "TRAMPOLINE_BUILD_FILE" diff --git a/.kokoro/docs.sh b/.kokoro/docs.sh index 1d288f3d4..3af319341 100755 --- a/.kokoro/docs.sh +++ b/.kokoro/docs.sh @@ -16,6 +16,8 @@ set -xeo pipefail +export NPM_CONFIG_PREFIX=/home/node/.npm-global + cd $(dirname $0)/.. npm install diff --git a/.kokoro/lint.sh b/.kokoro/lint.sh index 9d29203ed..7c2ea2a28 100755 --- a/.kokoro/lint.sh +++ b/.kokoro/lint.sh @@ -16,6 +16,8 @@ set -xeo pipefail +export NPM_CONFIG_PREFIX=/home/node/.npm-global + cd $(dirname $0)/.. npm install diff --git a/.kokoro/presubmit/node10/common.cfg b/.kokoro/presubmit/node10/common.cfg index e8bbb93db..28ef5923d 100644 --- a/.kokoro/presubmit/node10/common.cfg +++ b/.kokoro/presubmit/node10/common.cfg @@ -16,7 +16,7 @@ build_file: "nodejs-datastore/.kokoro/trampoline.sh" # Configure the docker image for kokoro-trampoline. env_vars: { key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/node:10" + value: "gcr.io/cloud-devrel-kokoro-resources/node:10-user" } env_vars: { key: "TRAMPOLINE_BUILD_FILE" diff --git a/.kokoro/presubmit/node6/common.cfg b/.kokoro/presubmit/node6/common.cfg index 55c0ce02f..31fb70e77 100644 --- a/.kokoro/presubmit/node6/common.cfg +++ b/.kokoro/presubmit/node6/common.cfg @@ -16,7 +16,7 @@ build_file: "nodejs-datastore/.kokoro/trampoline.sh" # Configure the docker image for kokoro-trampoline. env_vars: { key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/node:6" + value: "gcr.io/cloud-devrel-kokoro-resources/node:6-user" } env_vars: { key: "TRAMPOLINE_BUILD_FILE" diff --git a/.kokoro/presubmit/node8/common.cfg b/.kokoro/presubmit/node8/common.cfg index bcf98f863..a28e5b75f 100644 --- a/.kokoro/presubmit/node8/common.cfg +++ b/.kokoro/presubmit/node8/common.cfg @@ -16,7 +16,7 @@ build_file: "nodejs-datastore/.kokoro/trampoline.sh" # Configure the docker image for kokoro-trampoline. env_vars: { key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/node:8" + value: "gcr.io/cloud-devrel-kokoro-resources/node:8-user" } env_vars: { key: "TRAMPOLINE_BUILD_FILE" diff --git a/.kokoro/samples-test.sh b/.kokoro/samples-test.sh index 93af79aa3..76edbbbb2 100755 --- a/.kokoro/samples-test.sh +++ b/.kokoro/samples-test.sh @@ -16,6 +16,8 @@ set -xeo pipefail +export NPM_CONFIG_PREFIX=/home/node/.npm-global + # Setup service account credentials. export GOOGLE_APPLICATION_CREDENTIALS=${KOKORO_GFILE_DIR}/service-account.json export GCLOUD_PROJECT=long-door-651 diff --git a/.kokoro/system-test.sh b/.kokoro/system-test.sh index 299032dc3..a954b7942 100755 --- a/.kokoro/system-test.sh +++ b/.kokoro/system-test.sh @@ -16,11 +16,19 @@ set -xeo pipefail +export NPM_CONFIG_PREFIX=/home/node/.npm-global + # Setup service account credentials. export GOOGLE_APPLICATION_CREDENTIALS=${KOKORO_GFILE_DIR}/service-account.json +export GCLOUD_PROJECT=long-door-651 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 + . .kokoro/pre-system-test.sh +fi + npm install npm run system-test diff --git a/.kokoro/test.sh b/.kokoro/test.sh index 7f49f6d32..51f29589b 100755 --- a/.kokoro/test.sh +++ b/.kokoro/test.sh @@ -16,6 +16,8 @@ set -xeo pipefail +export NPM_CONFIG_PREFIX=/home/node/.npm-global + cd $(dirname $0)/.. npm install