Skip to content

Commit e2e1456

Browse files
busunkim96crwilcox
authored andcommitted
Use .kokoro configs from templates. (#194)
* Use .kokoro configs from templates. * Re-add system test setup in build.sh.
1 parent e078838 commit e2e1456

File tree

14 files changed

+72
-46
lines changed

14 files changed

+72
-46
lines changed

packages/google-cloud-ndb/.kokoro/build.sh

Lines changed: 7 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -14,47 +14,32 @@
1414
# See the License for the specific language governing permissions and
1515
# limitations under the License.
1616

17-
# Need enchant for spell check
18-
sudo apt-get update
19-
sudo apt-get -y install dictionaries-common aspell aspell-en \
20-
hunspell-en-us libenchant1c2a enchant
21-
2217
set -eo pipefail
2318

2419
cd github/python-ndb
2520

21+
# Need enchant for spell check
22+
sudo apt-get update
23+
sudo apt-get -y install dictionaries-common aspell aspell-en \
24+
hunspell-en-us libenchant1c2a enchant
25+
2626
# Disable buffering, so that the logs stream through.
2727
export PYTHONUNBUFFERED=1
2828

2929
# Debug: show build environment
3030
env | grep KOKORO
3131

32-
# Setup firestore account credentials
33-
export FIRESTORE_APPLICATION_CREDENTIALS=${KOKORO_GFILE_DIR}/firebase-credentials.json
34-
3532
# Setup service account credentials.
3633
export GOOGLE_APPLICATION_CREDENTIALS=${KOKORO_GFILE_DIR}/service-account.json
3734

3835
# Setup project id.
3936
export PROJECT_ID=$(cat "${KOKORO_GFILE_DIR}/project-id.json")
4037

41-
# Find out if this package was modified.
42-
# Temporarily use Thea's fork of ci-diff-helper w/ Kokoro support.
43-
# python3.6 -m pip install --quiet git+https://github.com/theacodes/ci-diff-helper.git
44-
# python3.6 test_utils/scripts/get_target_packages_kokoro.py > ~/target_packages
45-
# cat ~/target_packages
46-
47-
# if [[ ! -n $(grep -x "$PACKAGE" ~/target_packages) ]]; then
48-
# echo "$PACKAGE was not modified, returning."
49-
# exit;
50-
# fi
51-
52-
# cd "$PACKAGE"
53-
54-
# Some system tests require indexes. Use gclod to create them.
38+
# Some system tests require indexes. Use gcloud to create them.
5539
gcloud auth activate-service-account --key-file=$GOOGLE_APPLICATION_CREDENTIALS --project=$PROJECT_ID
5640
gcloud --quiet --verbosity=debug datastore indexes create tests/system/index.yaml
5741

42+
5843
# Remove old nox
5944
python3.6 -m pip uninstall --yes --quiet nox-automation
6045

packages/google-cloud-ndb/.kokoro/continuous/ndb.cfg

Lines changed: 0 additions & 7 deletions
This file was deleted.

packages/google-cloud-ndb/.kokoro/docs/common.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,4 @@ before_action {
4545
keyname: "docuploader_service_account"
4646
}
4747
}
48-
}
48+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Format: //devtools/kokoro/config/proto/build.proto

packages/google-cloud-ndb/.kokoro/presubmit/ndb.cfg

Lines changed: 0 additions & 7 deletions
This file was deleted.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Format: //devtools/kokoro/config/proto/build.proto

packages/google-cloud-ndb/.kokoro/publish-docs.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,4 @@ python3 -m docuploader create-metadata \
4444
cat docs.metadata
4545

4646
# upload docs
47-
python3 -m docuploader upload docs/_build/html --metadata-file docs.metadata --staging-bucket docs-staging
47+
python3 -m docuploader upload docs/_build/html --metadata-file docs.metadata --staging-bucket docs-staging

packages/google-cloud-ndb/.kokoro/release.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ export PYTHONUNBUFFERED=1
1414

1515
# Move into the package, build the distribution and upload.
1616
TWINE_PASSWORD=$(cat "${KOKORO_KEYSTORE_DIR}/73713_google_cloud_pypi_password")
17-
cd github/google-cloud-python/${PACKAGE}
17+
cd github/python-ndb
1818
python3 setup.py sdist bdist_wheel
1919
twine upload --username gcloudpypi --password "${TWINE_PASSWORD}" dist/*

packages/google-cloud-ndb/.kokoro/release/common.cfg

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,23 @@ before_action {
4242
}
4343
}
4444
}
45+
46+
# Fetch magictoken to use with Magic Github Proxy
47+
before_action {
48+
fetch_keystore {
49+
keystore_resource {
50+
keystore_config_id: 73713
51+
keyname: "releasetool-magictoken"
52+
}
53+
}
54+
}
55+
56+
# Fetch api key to use with Magic Github Proxy
57+
before_action {
58+
fetch_keystore {
59+
keystore_resource {
60+
keystore_config_id: 73713
61+
keyname: "magic-github-proxy-api-key"
62+
}
63+
}
64+
}

0 commit comments

Comments
 (0)