buildscripts,gae-interop-testing: do not promote versions by default

Only the dummy-default version should ever be promoted. Test versions
should have no traffic routed to it, so that deletions are
simpler. Versions receiving traffic can not be deleted in GAE.
This commit is contained in:
Spencer Fang 2018-08-16 13:42:53 -07:00 committed by zpencer
parent b821cf13b0
commit 9aa53b589d
3 changed files with 6 additions and 7 deletions

View File

@ -16,7 +16,6 @@ DUMMY_DEFAULT_VERSION='dummy-default'
function cleanup() {
echo "Performing cleanup now."
gcloud app services set-traffic $KOKORO_GAE_SERVICE --quiet --splits $DUMMY_DEFAULT_VERSION=1.0
gcloud app services delete $KOKORO_GAE_SERVICE --version $KOKORO_GAE_APP_VERSION --quiet
}
trap cleanup SIGHUP SIGINT SIGTERM EXIT
@ -26,9 +25,9 @@ cd ./github/grpc-java
##
## Deploy the dummy 'default' version of the service
##
GRADLE_FLAGS="--stacktrace -DgaeStopPreviousVersion=false -DgaePromote=false -PskipCodegen=true"
GRADLE_FLAGS="--stacktrace -DgaeStopPreviousVersion=false -PskipCodegen=true"
DUMMY_EXISTS_CMD="gcloud app versions describe $DUMMY_DEFAULT_VERSION --service=$KOKORO_GAE_SERVICE"
DEPLOY_DUMMY_CMD="./gradlew $GRADLE_FLAGS -DgaeDeployVersion=$DUMMY_DEFAULT_VERSION :grpc-gae-interop-testing-jdk8:appengineDeploy"
DEPLOY_DUMMY_CMD="./gradlew $GRADLE_FLAGS -DgaeDeployVersion=$DUMMY_DEFAULT_VERSION -DgaePromote=true :grpc-gae-interop-testing-jdk8:appengineDeploy"
# Deploy the dummy 'default' version. We only require that it exists when cleanup() is called.
# It ok if we race with another run and fail here, because the end result is idempotent.

View File

@ -69,8 +69,8 @@ appengine {
// deploy configuration
// default - stop the current version
stopPreviousVersion = System.getProperty('gaeStopPreviousVersion') ?: true
// default - make this the current version
promote = System.getProperty('gaePromote') ?: true
// default - do not make this the promoted version
promote = System.getProperty('gaePromote') ?: false
// Use -DgaeDeployVersion if set, otherwise the version is null and the plugin will generate it
version = System.getProperty('gaeDeployVersion')
}

View File

@ -66,8 +66,8 @@ appengine {
// deploy configuration
// default - stop the current version
stopPreviousVersion = System.getProperty('gaeStopPreviousVersion') ?: true
// default - make this the current version
promote = System.getProperty('gaePromote') ?: true
// default - do not make this the promoted version
promote = System.getProperty('gaePromote') ?: false
// Use -DgaeDeployVersion if set, otherwise the version is null and the plugin will generate it
version = System.getProperty('gaeDeployVersion')
}