Skip to content

Commit

Permalink
chore(docs): add cloud-RAD (#140)
Browse files Browse the repository at this point in the history
Co-authored-by: Jeff Ching <chingor@google.com>

Source-Author: Les Vogel <lesv@users.noreply.github.com>
Source-Date: Thu Jul 30 13:09:50 2020 -0700
Source-Repo: googleapis/synthtool
Source-Sha: dd230c816f88d0141fcd0be83498986287220d1b
Source-Link: googleapis/synthtool@dd230c8
  • Loading branch information
yoshi-automation committed Aug 7, 2020
1 parent 34fb4f2 commit de7d2f6
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 4 deletions.
10 changes: 10 additions & 0 deletions .kokoro/release/publish_javadoc.cfg
Original file line number Diff line number Diff line change
@@ -1,14 +1,24 @@
# Format: //devtools/kokoro/config/proto/build.proto

gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/doc-templates/"

env_vars: {
key: "STAGING_BUCKET"
value: "docs-staging"
}

env_vars: {
key: "STAGING_BUCKET_V2"
value: "docs-staging-v2-staging"
# Production will be at: docs-staging-v2
}

env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
value: "github/java-logging-logback/.kokoro/release/publish_javadoc.sh"
}


before_action {
fetch_keystore {
keystore_resource {
Expand Down
25 changes: 23 additions & 2 deletions .kokoro/release/publish_javadoc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,20 +24,25 @@ if [[ -z "${STAGING_BUCKET}" ]]; then
exit 1
fi

if [[ -z "${STAGING_BUCKET_V2}" ]]; then
echo "Need to set STAGING_BUCKET_V2 environment variable"
exit 1
fi

# work from the git root directory
pushd $(dirname "$0")/../../

# install docuploader package
python3 -m pip install gcp-docuploader

# compile all packages
mvn clean install -B -DskipTests=true
mvn clean install -B -q -DskipTests=true

NAME=google-cloud-logging-logback
VERSION=$(grep ${NAME}: versions.txt | cut -d: -f3)

# build the docs
mvn site -B
mvn site -B -q

pushd target/site/apidocs

Expand All @@ -53,3 +58,19 @@ python3 -m docuploader upload . \
--staging-bucket ${STAGING_BUCKET}

popd

# V2
mvn clean site -B -q -Ddevsite.template="${KOKORO_GFILE_DIR}/java/"

pushd target/devsite

# create metadata
python3 -m docuploader create-metadata \
--name ${NAME} \
--version ${VERSION} \
--language java

# upload docs
python3 -m docuploader upload . \
--credentials ${CREDENTIALS} \
--staging-bucket ${STAGING_BUCKET_V2}
4 changes: 2 additions & 2 deletions synth.metadata
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
"git": {
"name": ".",
"remote": "https://github.com/googleapis/java-logging-logback.git",
"sha": "a891198c812194cec0245214bf27abae434f0998"
"sha": "34fb4f26883499169fa777e28066b0c7ee7a1016"
}
},
{
"git": {
"name": "synthtool",
"remote": "https://github.com/googleapis/synthtool.git",
"sha": "4f2c9f752a94042472fc03c5bd9e06e89817d2bd"
"sha": "dd230c816f88d0141fcd0be83498986287220d1b"
}
}
],
Expand Down

0 comments on commit de7d2f6

Please sign in to comment.