From 0a65b1e6fdea84af8259db8fb85858bacced175c Mon Sep 17 00:00:00 2001 From: Franziska Hinkelmann Date: Mon, 18 Jun 2018 11:41:51 -0400 Subject: [PATCH 1/2] Simplify bulid script Do not check for worker.yaml, none of the examples have one. --- .kokoro/build-with-appengine.sh | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/.kokoro/build-with-appengine.sh b/.kokoro/build-with-appengine.sh index 2244d08e80..ed705a40a5 100755 --- a/.kokoro/build-with-appengine.sh +++ b/.kokoro/build-with-appengine.sh @@ -29,17 +29,12 @@ export GAE_VERSION=doc-sample-$(echo $PROJECT | sed 's_/_-_g') # Register post-test cleanup function cleanup { gcloud app versions delete $GAE_VERSION --quiet - if [ -e "worker.yaml" ]; then - gcloud app versions delete ${GAE_VERSION}-worker --quiet - fi } trap cleanup EXIT cd github/nodejs-docs-samples/${PROJECT} -# Install dependencies -npm install # Configure gcloud export GOOGLE_APPLICATION_CREDENTIALS=${KOKORO_GFILE_DIR}/secrets-key.json @@ -49,12 +44,10 @@ gcloud config set project $GCLOUD_PROJECT # Deploy the app gcloud app deploy --version $GAE_VERSION --no-promote --quiet -if [ -e "worker.yaml" ]; then - gcloud app deploy worker.yaml --version ${GAE_VERSION} --no-promote --quiet -fi -# Test the deployed app +# Install dependencies and run tests +npm install npm test exit $? \ No newline at end of file From e8606fb9a4a53599a2e6340370e6b105abf2bd82 Mon Sep 17 00:00:00 2001 From: Franziska Hinkelmann Date: Mon, 18 Jun 2018 12:16:56 -0400 Subject: [PATCH 2/2] Shorten version string --- .kokoro/build-with-appengine.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.kokoro/build-with-appengine.sh b/.kokoro/build-with-appengine.sh index ed705a40a5..43f84a7a6b 100755 --- a/.kokoro/build-with-appengine.sh +++ b/.kokoro/build-with-appengine.sh @@ -24,7 +24,12 @@ gcloud auth activate-service-account --key-file "$GOOGLE_APPLICATION_CREDENTIALS gcloud config set project $GCLOUD_PROJECT export NODE_ENV=development -export GAE_VERSION=doc-sample-$(echo $PROJECT | sed 's_/_-_g') + +# Strip appengine and flexible/standard from version string. +VERSION=$(echo $PROJECT | sed 's_appengine/__') +VERSION=$(echo $VERSION | sed 's_/flexible\|standard__') + +export GAE_VERSION=$VERSION # Register post-test cleanup function cleanup {