8000 Add kokoro config for GAE system tests · johnmanong/python-docs-samples@cfc3ded · GitHub
[go: up one dir, main page]

Skip to content

Commit cfc3ded

Browse files
author
Jon Wayne Parrott
committed
Add kokoro config for GAE system tests
Change-Id: Ie04fec5085184c60a1915f46613662d1fa9a8372
1 parent 29ec3d8 commit cfc3ded

File tree

4 files changed

+76
-0
lines changed

4 files changed

+76
-0
lines changed

.kokoro/common.cfg

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Format: //devtools/kokoro/config/proto/build.proto
2+
3+
# Download trampoline resources. These will be in ${KOKORO_GFILE_DIR}
4+
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline"
5+
6+
# All builds use the trampoline script to run in docker.
7+
build_file: "python-docs-samples/.kokoro/trampoline.sh"
8+
9+
# Use the Python worker docker iamge.
10+
env_vars: {
11+
key: "TRAMPOLINE_IMAGE"
12+
value: "gcr.io/silver-python2/python-worker"
13+
}

.kokoro/system_tests.sh

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#!/bin/bash
2+
3+
# Copyright 2017 Google Inc.
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
17+
set -eo pipefail
18+
19+
cd github/python-docs-samples
20+
21+
# Unencrypt and extract secrets
22+
SECRETS_PASSWORD=$(cat "${KOKORO_GFILE_DIR}/secrets-password.txt")
23+
./scripts/decrypt-secrets.sh "${SECRETS_PASSWORD}"
24+
25+
source ./testing/test-env.sh
26+
export GOOGLE_APPLICATION_CREDENTIALS=$(pwd)/testing/service-account.json
27+
export GOOGLE_CLIENT_SECRETS=$(pwd)/testing/client-secrets.json
28+
29+
# Run tests
30+
pip install --upgrade nox-automation
31+
nox -s "${NOX_SESSION}"

.kokoro/system_tests_appengine.cfg

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Format: //devtools/kokoro/config/proto/build.proto
2+
3+
# Download secrets from Cloud Storage.
4+
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/python-docs-samples"
5+
6+
# Tell the trampoline which build file to use.
7+
env_vars: {
8+
key: "TRAMPOLINE_BUILD_FILE"
9+
value: "github/python-docs-samples/.kokoro/system_tests.sh"
10+
}
11+
12+
env_vars: {
13+
key: "NOX_SESSION"
14+
value: gae"
15+
}

.kokoro/trampoline.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/bin/bash
2+
3+
# Copyright 2017 Google Inc.
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
17+
python3 "${KOKORO_GFILE_DIR}/trampoline_v1.py"

0 commit comments

Comments
 (0)
0