Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add kokoro #61

Merged
merged 15 commits into from
Feb 5, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ pip-log.txt
.tox
.cache
.pytest_cache
.nox

# Translations
*.mo
Expand Down
34 changes: 34 additions & 0 deletions .kokoro/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#!/bin/bash

# Copyright 2018 Google LLC
#
# 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
#
# https://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.

set -eo pipefail

cd github/google-cloud-python-happybase

# Disable buffering, so that the logs stream through.
export PYTHONUNBUFFERED=1

# Debug: show build environment
env | grep KOKORO

# TODO: Set up directory with service account credentials.
export GOOGLE_APPLICATION_CREDENTIALS=${KOKORO_GFILE_DIR}/service-account.json

# TODO: Setup project id.
export PROJECT_ID=$(cat "${KOKORO_GFILE_DIR}/project-id.json")

python3.6 -m pip install nox
python3.6 -m nox
27 changes: 27 additions & 0 deletions .kokoro/continuous.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Format: //devtools/kokoro/config/proto/build.proto
crwilcox marked this conversation as resolved.
Show resolved Hide resolved

# Build logs will be here
action {
define_artifacts {
regex: "**/*sponge_log.xml"
}
}

# Download trampoline resources.
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline"

# Download resources for system tests (service account key, etc.)
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/google-cloud-python"

# Use the trampoline script to run in docker.
build_file: "google-cloud-python-happybase/.kokoro/trampoline.sh"

# Configure the docker image for kokoro-trampoline.
env_vars: {
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-kokoro-resources/python-multi"
}
env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
value: "github/google-cloud-python-happybase/.kokoro/build.sh"
}
27 changes: 27 additions & 0 deletions .kokoro/presubmit.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Format: //devtools/kokoro/config/proto/build.proto
crwilcox marked this conversation as resolved.
Show resolved Hide resolved

# Build logs will be here
action {
define_artifacts {
regex: "**/*sponge_log.xml"
}
}

# Download trampoline resources.
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline"

# Download resources for system tests (service account key, etc.)
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/google-cloud-python"

# Use the trampoline script to run in docker.
build_file: "google-cloud-python-happybase/.kokoro/trampoline.sh"

# Configure the docker image for kokoro-trampoline.
env_vars: {
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-kokoro-resources/python-multi"
}
env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
value: "github/google-cloud-python-happybase/.kokoro/build.sh"
}
44 changes: 44 additions & 0 deletions .kokoro/release.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Format: //devtools/kokoro/config/proto/build.proto
crwilcox marked this conversation as resolved.
Show resolved Hide resolved

# Build logs will be here
action {
define_artifacts {
regex: "**/*sponge_log.xml"
}
}

# Download trampoline resources.
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline"

# Use the trampoline script to run in docker.
build_file: "google-cloud-python-happybase/.kokoro/trampoline.sh"

# Configure the docker image for kokoro-trampoline.
env_vars: {
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-kokoro-resources/python-multi"
}
env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
value: "github/google-cloud-python-happybase/.kokoro/release.sh"
}

# Fetch the token needed for reporting release status to GitHub
before_action {
fetch_keystore {
keystore_resource {
keystore_config_id: 73713
keyname: "yoshi-automation-github-key"
}
}
}

# Fetch PyPI password
before_action {
fetch_keystore {
keystore_resource {
keystore_config_id: 73713
keyname: "google_cloud_pypi_password"
}
}
}
34 changes: 34 additions & 0 deletions .kokoro/release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#!/bin/bash

# Copyright 2018 Google LLC
#
# 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
#
# https://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.


set -eo pipefail

# Start the releasetool reporter
python3 -m pip install gcp-releasetool
python3 -m releasetool publish-reporter-script > /tmp/publisher-script; source /tmp/publisher-script

# Ensure that we have the latest versions of Twine, Wheel, and Setuptools.
python3 -m pip install --upgrade twine wheel setuptools

# Disable buffering, so that the logs stream through.
export PYTHONUNBUFFERED=1

# Move into the package, build the distribution and upload.
TWINE_PASSWORD=$(cat "${KOKORO_KEYSTORE_DIR}/73713_google_cloud_pypi_password")
cd github/google-cloud-python-happybase
python3 setup.py sdist bdist_wheel
twine upload --username gcloudpypi --password "${TWINE_PASSWORD}" dist/*
23 changes: 23 additions & 0 deletions .kokoro/trampoline.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/bash
# Copyright 2017 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.

set -eo pipefail

python3 "${KOKORO_GFILE_DIR}/trampoline_v1.py" || ret_code=$?

chmod +x ${KOKORO_GFILE_DIR}/trampoline_cleanup.sh
${KOKORO_GFILE_DIR}/trampoline_cleanup.sh || true

exit ${ret_code}
4 changes: 0 additions & 4 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,6 @@ MIT - See `LICENSE`_ for more information.

.. _LICENSE: https://github.com/googleapis/google-cloud-python-happybase/blob/master/LICENSE

.. |build| image:: https://travis-ci.org/googleapis/google-cloud-python-happybase.svg?branch=master
:target: https://travis-ci.org/googleapis/google-cloud-python-happybase
.. |coverage| image:: https://coveralls.io/repos/googleapis/google-cloud-python-happybase/badge.png?branch=master
:target: https://coveralls.io/r/googleapis/google-cloud-python-happybase?branch=master
.. |pypi| image:: https://img.shields.io/pypi/v/google-cloud-happybase.svg
:target: https://pypi.org/project/google-cloud-happybase/
.. |versions| image:: https://img.shields.io/pypi/pyversions/google-cloud-happybase.svg
Expand Down
102 changes: 0 additions & 102 deletions appveyor.yml

This file was deleted.