-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add kokoro docs job to publish to googleapis.dev. (#142)
- Loading branch information
1 parent
460cceb
commit 1873811
Showing
6 changed files
with
122 additions
and
111 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# Format: //devtools/kokoro/config/proto/build.proto | ||
|
||
# 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: "python-ndb/.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/.kokoro/publish-docs.sh" | ||
} | ||
|
||
env_vars: { | ||
key: "STAGING_BUCKET" | ||
value: "docs-staging" | ||
} | ||
|
||
# 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" | ||
} | ||
} | ||
} | ||
|
||
before_action { | ||
fetch_keystore { | ||
keystore_resource { | ||
keystore_config_id: 73713 | ||
keyname: "docuploader_service_account" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# Format: //devtools/kokoro/config/proto/build.proto |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#!/bin/bash | ||
|
||
set -eo pipefail | ||
|
||
# Disable buffering, so that the logs stream through. | ||
export PYTHONUNBUFFERED=1 | ||
|
||
cd github/python-ndb | ||
|
||
# Remove old nox | ||
python3.6 -m pip uninstall --yes --quiet nox-automation | ||
|
||
# Install nox | ||
python3.6 -m pip install --upgrade --quiet nox | ||
python3.6 -m nox --version | ||
|
||
# build docs | ||
nox -s docs | ||
|
||
python3 -m pip install gcp-docuploader | ||
|
||
# install a json parser | ||
sudo apt-get update | ||
sudo apt-get -y install software-properties-common | ||
sudo add-apt-repository universe | ||
sudo apt-get update | ||
sudo apt-get -y install jq | ||
|
||
# create metadata | ||
python3 -m docuploader create-metadata \ | ||
--name=$(jq --raw-output '.name // empty' .repo-metadata.json) \ | ||
--version=$(python3 setup.py --version) \ | ||
--language=$(jq --raw-output '.language // empty' .repo-metadata.json) \ | ||
--distribution-name=$(python3 setup.py --name) \ | ||
--product-page=$(jq --raw-output '.product_documentation // empty' .repo-metadata.json) \ | ||
--github-repository=$(jq --raw-output '.repo // empty' .repo-metadata.json) \ | ||
--issue-tracker=$(jq --raw-output '.issue_tracker // empty' .repo-metadata.json) | ||
|
||
cat docs.metadata | ||
|
||
# upload docs | ||
python3 -m docuploader upload docs/_build/html --metadata-file docs.metadata --staging-bucket docs-staging |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"name": "python-ndb", | ||
"name_pretty": "NDB Client Library for Google Cloud Datastore", | ||
"client_documentation": "https://googleapis.dev/python/python-ndb/latest", | ||
"issue_tracker": "https://github.com/googleapis/python-ndb/issues", | ||
"release_level": "alpha", | ||
"language": "python", | ||
"repo": "googleapis/python-ndb", | ||
"distribution_name": "google-cloud-ndb", | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.