-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate tests to Kokoro Move existing CircleCI tests to Kokoro. Add semistandard dev-dependency Update appengine/pubsub dependencies Skip pubsub Kokoro tests
- Loading branch information
Showing
51 changed files
with
631 additions
and
23 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Format: //devtools/kokoro/config/proto/build.proto | ||
|
||
# Set GAE environment | ||
env_vars: { | ||
key: "APPENGINE_ENVIRONMENT" | ||
value: "flexible" | ||
} | ||
|
||
# Set the folder in which the tests are run | ||
env_vars: { | ||
key: "PROJECT" | ||
value: "analytics" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Format: //devtools/kokoro/config/proto/build.proto | ||
|
||
# Set GAE environment | ||
env_vars: { | ||
key: "APPENGINE_ENVIRONMENT" | ||
value: "standard" | ||
} | ||
|
||
# Set the folder in which the tests are run | ||
env_vars: { | ||
key: "PROJECT" | ||
value: "analytics" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
#!/bin/bash | ||
|
||
# Copyright 2018 Google Inc. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
export GCLOUD_PROJECT=nodejs-docs-samples-tests | ||
|
||
export NODE_ENV=development | ||
export GAE_VERSION=appengine-${PROJECT}-${APPENGINE_ENVIRONMENT} | ||
|
||
# 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 | ||
set -e; | ||
|
||
cd github/nodejs-docs-samples/appengine/${PROJECT} | ||
|
||
# Install dependencies | ||
npm install | ||
|
||
# Configure gcloud | ||
export GOOGLE_APPLICATION_CREDENTIALS=${KOKORO_GFILE_DIR}/secrets-key.json | ||
gcloud auth activate-service-account --key-file "$GOOGLE_APPLICATION_CREDENTIALS" | ||
gcloud config set project $GCLOUD_PROJECT | ||
|
||
|
||
# Deploy the app | ||
gcloud app deploy app.${APPENGINE_ENVIRONMENT}.yaml --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 | ||
npm test | ||
|
||
exit $? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Format: //devtools/kokoro/config/proto/build.proto | ||
|
||
# Download trampoline resources. These will be in ${KOKORO_GFILE_DIR} | ||
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" | ||
|
||
# Download secrets from Cloud Storage. | ||
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/nodejs-docs-samples" | ||
|
||
# All builds use the trampoline script to run in docker. | ||
build_file: "nodejs-docs-samples/.kokoro/trampoline.sh" | ||
|
||
# Configure the docker image for kokoro-trampoline. | ||
env_vars: { | ||
key: "TRAMPOLINE_IMAGE" | ||
value: "gcr.io/cloud-docs-samples/nodejs" | ||
} | ||
|
||
# Tell the trampoline which build file to use. | ||
env_vars: { | ||
key: "TRAMPOLINE_BUILD_FILE" | ||
value: "github/nodejs-docs-samples/.kokoro/appengine/build.sh" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Format: //devtools/kokoro/config/proto/build.proto | ||
|
||
# Set GAE environment | ||
env_vars: { | ||
key: "APPENGINE_ENVIRONMENT" | ||
value: "flexible" | ||
} | ||
|
||
# Set the folder in which the tests are run | ||
env_vars: { | ||
key: "PROJECT" | ||
value: "datastore" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Format: //devtools/kokoro/config/proto/build.proto | ||
|
||
# Set GAE environment | ||
env_vars: { | ||
key: "APPENGINE_ENVIRONMENT" | ||
value: "standard" | ||
} | ||
|
||
# Set the folder in which the tests are run | ||
env_vars: { | ||
key: "PROJECT" | ||
value: "datastore" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
#!/bin/bash | ||
|
||
# Copyright 2018 Google Inc. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
export GCLOUD_PROJECT=nodejs-docs-samples-tests | ||
|
||
export NODE_ENV=development | ||
export GAE_VERSION=appengine-${PROJECT}-${APPENGINE_ENVIRONMENT} | ||
|
||
# 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 | ||
set -e; | ||
|
||
cd github/nodejs-docs-samples/appengine/${PROJECT}/${APPENGINE_ENVIRONMENT} | ||
|
||
# Install dependencies | ||
npm install | ||
|
||
# Configure gcloud | ||
export GOOGLE_APPLICATION_CREDENTIALS=${KOKORO_GFILE_DIR}/secrets-key.json | ||
gcloud auth activate-service-account --key-file "$GOOGLE_APPLICATION_CREDENTIALS" | ||
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 | ||
npm test | ||
|
||
exit $? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Format: //devtools/kokoro/config/proto/build.proto | ||
|
||
# Download trampoline resources. These will be in ${KOKORO_GFILE_DIR} | ||
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" | ||
|
||
# Download secrets from Cloud Storage. | ||
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/nodejs-docs-samples" | ||
|
||
# All builds use the trampoline script to run in docker. | ||
build_file: "nodejs-docs-samples/.kokoro/trampoline.sh" | ||
|
||
# Configure the docker image for kokoro-trampoline. | ||
env_vars: { | ||
key: "TRAMPOLINE_IMAGE" | ||
value: "gcr.io/cloud-docs-samples/nodejs" | ||
} | ||
|
||
# Tell the trampoline which build file to use. | ||
env_vars: { | ||
key: "TRAMPOLINE_BUILD_FILE" | ||
value: "github/nodejs-docs-samples/.kokoro/appengine/default-yml/build.sh" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Format: //devtools/kokoro/config/proto/build.proto | ||
|
||
# Set GAE environment | ||
env_vars: { | ||
key: "APPENGINE_ENVIRONMENT" | ||
value: "flexible" | ||
} | ||
|
||
# Set the folder in which the tests are run | ||
env_vars: { | ||
key: "PROJECT" | ||
value: "hello-worl" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Format: //devtools/kokoro/config/proto/build.proto | ||
|
||
# Set GAE environment | ||
env_vars: { | ||
key: "APPENGINE_ENVIRONMENT" | ||
value: "standard" | ||
} | ||
|
||
# Set the folder in which the tests are run | ||
env_vars: { | ||
key: "PROJECT" | ||
value: "hello-worl" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Format: //devtools/kokoro/config/proto/build.proto | ||
|
||
# Set GAE environment | ||
env_vars: { | ||
key: "APPENGINE_ENVIRONMENT" | ||
value: "flexible" | ||
} | ||
|
||
# Set the folder in which the tests are run | ||
env_vars: { | ||
key: "PROJECT" | ||
value: "metadata" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Format: //devtools/kokoro/config/proto/build.proto | ||
|
||
# Set GAE environment | ||
env_vars: { | ||
key: "APPENGINE_ENVIRONMENT" | ||
value: "standard" | ||
} | ||
|
||
# Set the folder in which the tests are run | ||
env_vars: { | ||
key: "PROJECT" | ||
value: "metadata" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Format: //devtools/kokoro/config/proto/build.proto | ||
|
||
# Set GAE environment | ||
env_vars: { | ||
key: "APPENGINE_ENVIRONMENT" | ||
value: "flexible" | ||
} | ||
|
||
# Set the folder in which the tests are run | ||
env_vars: { | ||
key: "PROJECT" | ||
value: "storage" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Format: //devtools/kokoro/config/proto/build.proto | ||
|
||
# Set GAE environment | ||
env_vars: { | ||
key: "APPENGINE_ENVIRONMENT" | ||
value: "standard" | ||
} | ||
|
||
# Set the folder in which the tests are run | ||
env_vars: { | ||
key: "PROJECT" | ||
value: "storage" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Format: //devtools/kokoro/config/proto/build.proto | ||
|
||
# Set GAE environment | ||
env_vars: { | ||
key: "APPENGINE_ENVIRONMENT" | ||
value: "flexible" | ||
} | ||
|
||
# Set the folder in which the tests are run | ||
env_vars: { | ||
key: "PROJECT" | ||
value: "endpoints" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Format: //devtools/kokoro/config/proto/build.proto | ||
|
||
# Set GAE environment | ||
env_vars: { | ||
key: "APPENGINE_ENVIRONMENT" | ||
value: "standard" | ||
} | ||
|
||
# Set the folder in which the tests are run | ||
env_vars: { | ||
key: "PROJECT" | ||
value: "endpoints" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Format: //devtools/kokoro/config/proto/build.proto | ||
|
||
# Set GAE environment | ||
env_vars: { | ||
key: "APPENGINE_ENVIRONMENT" | ||
value: "flexible" | ||
} | ||
|
||
# Set the folder in which the tests are run | ||
env_vars: { | ||
key: "PROJECT" | ||
value: "errorreporting" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Format: //devtools/kokoro/config/proto/build.proto | ||
|
||
# Set GAE environment | ||
env_vars: { | ||
key: "APPENGINE_ENVIRONMENT" | ||
value: "standard" | ||
} | ||
|
||
# Set the folder in which the tests are run | ||
env_vars: { | ||
key: "PROJECT" | ||
value: "errorreporting" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Format: //devtools/kokoro/config/proto/build.proto | ||
|
||
# Set GAE environment | ||
env_vars: { | ||
key: "APPENGINE_ENVIRONMENT" | ||
value: "flexible" | ||
} | ||
|
||
# Set the folder in which the tests are run | ||
env_vars: { | ||
key: "PROJECT" | ||
value: "mailjet" | ||
} |
Oops, something went wrong.