From 20828a693645df2507f4976d762830dbeeeebe92 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 31 Jul 2020 14:58:33 -0700 Subject: [PATCH] chore(docs): add cloud-RAD (#210) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/71a02c6b-8ba2-4db0-b76d-9e42934df8a3/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/dd230c816f88d0141fcd0be83498986287220d1b --- .../.kokoro/release/publish_javadoc.cfg | 10 ++++++++ .../.kokoro/release/publish_javadoc.sh | 25 +++++++++++++++++-- java-resourcemanager/synth.metadata | 4 +-- 3 files changed, 35 insertions(+), 4 deletions(-) diff --git a/java-resourcemanager/.kokoro/release/publish_javadoc.cfg b/java-resourcemanager/.kokoro/release/publish_javadoc.cfg index 13c27a964cbc..38cc2352b53b 100644 --- a/java-resourcemanager/.kokoro/release/publish_javadoc.cfg +++ b/java-resourcemanager/.kokoro/release/publish_javadoc.cfg @@ -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-resourcemanager/.kokoro/release/publish_javadoc.sh" } + before_action { fetch_keystore { keystore_resource { diff --git a/java-resourcemanager/.kokoro/release/publish_javadoc.sh b/java-resourcemanager/.kokoro/release/publish_javadoc.sh index 2d05aefaa5bf..19c281c9f25b 100755 --- a/java-resourcemanager/.kokoro/release/publish_javadoc.sh +++ b/java-resourcemanager/.kokoro/release/publish_javadoc.sh @@ -24,6 +24,11 @@ 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")/../../ @@ -31,13 +36,13 @@ pushd $(dirname "$0")/../../ 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-resourcemanager VERSION=$(grep ${NAME}: versions.txt | cut -d: -f3) # build the docs -mvn site -B +mvn site -B -q pushd target/site/apidocs @@ -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} diff --git a/java-resourcemanager/synth.metadata b/java-resourcemanager/synth.metadata index b9d74868e5ca..117f47b03ba6 100644 --- a/java-resourcemanager/synth.metadata +++ b/java-resourcemanager/synth.metadata @@ -4,14 +4,14 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/java-resourcemanager.git", - "sha": "4434fbf1a5c2ddeba8c6ba9bfd22d4392f4ac6c2" + "sha": "66fc54d8160553dbf643d9333824939d205d8dd9" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "4f2c9f752a94042472fc03c5bd9e06e89817d2bd" + "sha": "dd230c816f88d0141fcd0be83498986287220d1b" } } ],