diff --git a/.kokoro/appengine/test-deployment/common.cfg b/.kokoro/appengine/test-deployment/common.cfg index 9e7e3fa872..4bc6c78e36 100644 --- a/.kokoro/appengine/test-deployment/common.cfg +++ b/.kokoro/appengine/test-deployment/common.cfg @@ -20,3 +20,10 @@ env_vars: { key: "TRAMPOLINE_BUILD_FILE" value: "github/nodejs-docs-samples/.kokoro/build-with-appengine.sh" } + + +# Used in `gcloud app deploy ${APPENGINE_ENVIRONMENT}.yaml +env_vars: { + key: "APPENGINE_ENVIRONMENT" + value: "app" +} \ No newline at end of file diff --git a/.kokoro/appengine/test-deployment/hello-world-flex.cfg b/.kokoro/appengine/test-deployment/hello-world-flex.cfg index c02fe8153a..2cf566c297 100644 --- a/.kokoro/appengine/test-deployment/hello-world-flex.cfg +++ b/.kokoro/appengine/test-deployment/hello-world-flex.cfg @@ -1,13 +1,7 @@ # 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-world" + value: "appengine/hello-world/flexible" } \ No newline at end of file diff --git a/.kokoro/appengine/test-deployment/hello-world-standard.cfg b/.kokoro/appengine/test-deployment/hello-world-standard.cfg index d361f2a9a6..61cf999d85 100644 --- a/.kokoro/appengine/test-deployment/hello-world-standard.cfg +++ b/.kokoro/appengine/test-deployment/hello-world-standard.cfg @@ -1,13 +1,7 @@ # 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-world" + value: "appengine/hello-world/standard" } \ No newline at end of file diff --git a/.kokoro/appengine/test-deployment/metadata-flex.cfg b/.kokoro/appengine/test-deployment/metadata-flex.cfg index bed9a2b004..1cfc090954 100644 --- a/.kokoro/appengine/test-deployment/metadata-flex.cfg +++ b/.kokoro/appengine/test-deployment/metadata-flex.cfg @@ -1,13 +1,7 @@ # 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" + value: "appengine/metadata/flexible" } \ No newline at end of file diff --git a/.kokoro/appengine/test-deployment/metadata-standard.cfg b/.kokoro/appengine/test-deployment/metadata-standard.cfg index 1bb0a9ce02..4b24812553 100644 --- a/.kokoro/appengine/test-deployment/metadata-standard.cfg +++ b/.kokoro/appengine/test-deployment/metadata-standard.cfg @@ -1,13 +1,7 @@ # 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" + value: "appengine/metadata/standard" } \ No newline at end of file diff --git a/.kokoro/appengine/test-deployment/storage-flex.cfg b/.kokoro/appengine/test-deployment/storage-flex.cfg index 221725dcde..57325f6ca6 100644 --- a/.kokoro/appengine/test-deployment/storage-flex.cfg +++ b/.kokoro/appengine/test-deployment/storage-flex.cfg @@ -1,13 +1,7 @@ # 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" + value: "appengine/storage/flexible" } \ No newline at end of file diff --git a/.kokoro/appengine/test-deployment/storage-standard.cfg b/.kokoro/appengine/test-deployment/storage-standard.cfg index d3b231f922..678b37a417 100644 --- a/.kokoro/appengine/test-deployment/storage-standard.cfg +++ b/.kokoro/appengine/test-deployment/storage-standard.cfg @@ -1,13 +1,7 @@ # 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" + value: "appengine/storage/standard" } \ No newline at end of file diff --git a/.kokoro/build-with-appengine.sh b/.kokoro/build-with-appengine.sh index e6f129b453..22221c3f12 100755 --- a/.kokoro/build-with-appengine.sh +++ b/.kokoro/build-with-appengine.sh @@ -24,7 +24,7 @@ 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-${PROJECT}-flex +export GAE_VERSION=doc-sample-${PROJECT}-${APPENGINE_ENVIRONMENT} # Register post-test cleanup function cleanup { @@ -48,7 +48,7 @@ gcloud config set project $GCLOUD_PROJECT # Deploy the app -gcloud app deploy --version $GAE_VERSION --no-promote --quiet +gcloud app deploy ${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