Skip to content

Commit

Permalink
chore:regen
Browse files Browse the repository at this point in the history
  • Loading branch information
thiagotnunes committed May 6, 2021
1 parent b4e4c39 commit f5569ef
Show file tree
Hide file tree
Showing 140 changed files with 24,935 additions and 7,039 deletions.
7 changes: 7 additions & 0 deletions .github/blunderbuss.yml
@@ -0,0 +1,7 @@
# Configuration for the Blunderbuss GitHub app. For more info see
# https://github.com/googleapis/repo-automation-bots/tree/master/packages/blunderbuss
assign_prs_by:
- labels:
- samples
to:
- googleapis/java-samples-reviewers
4 changes: 4 additions & 0 deletions .github/generated-files-bot.yml
Expand Up @@ -5,3 +5,7 @@ externalManifests:
- type: json
file: '.github/readme/synth.metadata/synth.metadata'
jsonpath: '$.generatedFiles[*]'
ignoreAuthors:
- 'renovate-bot'
- 'yoshi-automation'
- 'release-please[bot]'
3 changes: 2 additions & 1 deletion .github/release-please.yml
@@ -1,2 +1,3 @@
bumpMinorPreMajor: true
handleGHRelease: true
releaseType: java-yoshi
bumpMinorPreMajor: true
2 changes: 1 addition & 1 deletion .github/workflows/approve-readme.yaml
Expand Up @@ -6,7 +6,7 @@ jobs:
runs-on: ubuntu-latest
if: github.repository_owner == 'googleapis' && github.head_ref == 'autosynth-readme'
steps:
- uses: actions/github-script@v3.0.0
- uses: actions/github-script@v3
with:
github-token: ${{secrets.YOSHI_APPROVER_TOKEN}}
script: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/auto-release.yaml
Expand Up @@ -4,9 +4,9 @@ name: auto-release
jobs:
approve:
runs-on: ubuntu-latest
if: contains(github.head_ref, 'release-v')
if: contains(github.head_ref, 'release-please')
steps:
- uses: actions/github-script@v3.0.0
- uses: actions/github-script@v3
with:
github-token: ${{secrets.YOSHI_APPROVER_TOKEN}}
debug: true
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/ci.yaml
Expand Up @@ -54,7 +54,11 @@ jobs:
with:
java-version: 8
- run: java -version
- run: .kokoro/linkage-monitor.sh
- name: Install artifacts to local Maven repository
run: .kokoro/build.sh
shell: bash
- name: Validate any conflicts with regard to com.google.cloud:libraries-bom (latest release)
uses: GoogleCloudPlatform/cloud-opensource-java/linkage-monitor@v1-linkagemonitor
lint:
runs-on: ubuntu-latest
steps:
Expand Down
15 changes: 11 additions & 4 deletions .kokoro/build.sh
Expand Up @@ -29,15 +29,15 @@ echo ${JOB_TYPE}

# attempt to install 3 times with exponential backoff (starting with 10 seconds)
retry_with_backoff 3 10 \
mvn install -B -V \
mvn install -B -V -ntp \
-DskipTests=true \
-Dclirr.skip=true \
-Denforcer.skip=true \
-Dmaven.javadoc.skip=true \
-Dgcloud.download.skip=true \
-T 1C

# if GOOGLE_APPLICATION_CREDIENTIALS is specified as a relative path prepend Kokoro root directory onto it
# if GOOGLE_APPLICATION_CREDENTIALS is specified as a relative path, prepend Kokoro root directory onto it
if [[ ! -z "${GOOGLE_APPLICATION_CREDENTIALS}" && "${GOOGLE_APPLICATION_CREDENTIALS}" != /* ]]; then
export GOOGLE_APPLICATION_CREDENTIALS=$(realpath ${KOKORO_GFILE_DIR}/${GOOGLE_APPLICATION_CREDENTIALS})
fi
Expand All @@ -60,6 +60,7 @@ javadoc)
;;
integration)
mvn -B ${INTEGRATION_TEST_ARGS} \
-ntp \
-Penable-integration-tests \
-DtrimStackTrace=false \
-Dclirr.skip=true \
Expand All @@ -78,9 +79,15 @@ samples)

if [[ -f ${SAMPLES_DIR}/pom.xml ]]
then
for FILE in ${KOKORO_GFILE_DIR}/secret_manager/*-samples-secrets; do
[[ -f "$FILE" ]] || continue
source "$FILE"
done

pushd ${SAMPLES_DIR}
mvn -B \
-Penable-samples \
-ntp \
-DtrimStackTrace=false \
-Dclirr.skip=true \
-Denforcer.skip=true \
Expand Down Expand Up @@ -110,8 +117,8 @@ bash .kokoro/coerce_logs.sh

if [[ "${ENABLE_BUILD_COP}" == "true" ]]
then
chmod +x ${KOKORO_GFILE_DIR}/linux_amd64/buildcop
${KOKORO_GFILE_DIR}/linux_amd64/buildcop -repo=googleapis/java-spanner
chmod +x ${KOKORO_GFILE_DIR}/linux_amd64/flakybot
${KOKORO_GFILE_DIR}/linux_amd64/flakybot -repo=googleapis/java-spanner
fi

echo "exiting with ${RETURN_CODE}"
Expand Down
1 change: 0 additions & 1 deletion .kokoro/common.sh
Expand Up @@ -25,7 +25,6 @@ function retry_with_backoff {

# allow a failures to continue
set +e
echo "${command}"
${command}
exit_code=$?

Expand Down
5 changes: 3 additions & 2 deletions .kokoro/dependencies.sh
Expand Up @@ -31,8 +31,9 @@ export MAVEN_OPTS="-Xmx1024m -XX:MaxPermSize=128m"

# this should run maven enforcer
retry_with_backoff 3 10 \
mvn install -B -V \
mvn install -B -V -ntp \
-DskipTests=true \
-Dmaven.javadoc.skip=true \
-Dclirr.skip=true

mvn -B dependency:analyze -DfailOnWarning=true
Expand Down Expand Up @@ -86,4 +87,4 @@ then
else
msg "Errors found. See log statements above."
exit 1
fi
fi
6 changes: 0 additions & 6 deletions .kokoro/release/publish_javadoc.cfg
Expand Up @@ -7,12 +7,6 @@ env_vars: {
value: "docs-staging"
}

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

env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
value: "github/java-spanner/.kokoro/release/publish_javadoc.sh"
Expand Down
27 changes: 2 additions & 25 deletions .kokoro/release/publish_javadoc.sh
Expand Up @@ -24,11 +24,6 @@ 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")/../../

Expand All @@ -38,8 +33,8 @@ python3 -m pip install gcp-docuploader
# compile all packages
mvn clean install -B -q -DskipTests=true

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

# build the docs
mvn site -B -q
Expand All @@ -56,21 +51,3 @@ python3 -m docuploader create-metadata \
python3 -m docuploader upload . \
--credentials ${CREDENTIALS} \
--staging-bucket ${STAGING_BUCKET}

popd

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

pushd target/devsite/reference

# 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}
30 changes: 30 additions & 0 deletions .kokoro/release/publish_javadoc11.cfg
@@ -0,0 +1,30 @@
# Format: //devtools/kokoro/config/proto/build.proto

# cloud-rad production
env_vars: {
key: "STAGING_BUCKET_V2"
value: "docs-staging-v2"
}

# Configure the docker image for kokoro-trampoline
env_vars: {
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-kokoro-resources/java11"
}

env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
value: "github/java-spanner/.kokoro/release/publish_javadoc11.sh"
}

before_action {
fetch_keystore {
keystore_resource {
keystore_config_id: 73713
keyname: "docuploader_service_account"
}
}
}

# Downloads docfx doclet resource. This will be in ${KOKORO_GFILE_DIR}/<doclet name>
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/docfx"
58 changes: 58 additions & 0 deletions .kokoro/release/publish_javadoc11.sh
@@ -0,0 +1,58 @@
#!/bin/bash
# Copyright 2021 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

if [[ -z "${CREDENTIALS}" ]]; then
CREDENTIALS=${KOKORO_KEYSTORE_DIR}/73713_docuploader_service_account
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 -q -DskipTests=true

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

# V3 generates docfx yml from javadoc
# generate yml
mvn clean site -B -q -P docFX

# copy README to docfx-yml dir and rename index.md
cp README.md target/docfx-yml/index.md

pushd target/docfx-yml

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

# upload yml to production bucket
python3 -m docuploader upload . \
--credentials ${CREDENTIALS} \
--staging-bucket ${STAGING_BUCKET_V2} \
--destination-prefix docfx
2 changes: 1 addition & 1 deletion .kokoro/release/snapshot.sh
Expand Up @@ -25,7 +25,7 @@ grep SNAPSHOT versions.txt
setup_environment_secrets
create_settings_xml_file "settings.xml"

mvn clean install deploy -B \
mvn clean deploy -B \
--settings ${MAVEN_SETTINGS_FILE} \
-DperformRelease=true \
-Dgpg.executable=gpg \
Expand Down
17 changes: 10 additions & 7 deletions .kokoro/release/stage.sh
Expand Up @@ -20,19 +20,22 @@ python3 -m pip install gcp-releasetool
python3 -m releasetool publish-reporter-script > /tmp/publisher-script; source /tmp/publisher-script

source $(dirname "$0")/common.sh
source $(dirname "$0")/../common.sh
MAVEN_SETTINGS_FILE=$(realpath $(dirname "$0")/../../)/settings.xml
pushd $(dirname "$0")/../../

setup_environment_secrets
create_settings_xml_file "settings.xml"

mvn clean install deploy -B \
--settings ${MAVEN_SETTINGS_FILE} \
-DskipTests=true \
-DperformRelease=true \
-Dgpg.executable=gpg \
-Dgpg.passphrase=${GPG_PASSPHRASE} \
-Dgpg.homedir=${GPG_HOMEDIR}
# attempt to stage 3 times with exponential backoff (starting with 10 seconds)
retry_with_backoff 3 10 \
mvn clean deploy -B \
--settings ${MAVEN_SETTINGS_FILE} \
-DskipTests=true \
-DperformRelease=true \
-Dgpg.executable=gpg \
-Dgpg.passphrase=${GPG_PASSPHRASE} \
-Dgpg.homedir=${GPG_HOMEDIR}

if [[ -n "${AUTORELEASE_PR}" ]]
then
Expand Down
1 change: 0 additions & 1 deletion LICENSE
@@ -1,4 +1,3 @@

Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
Expand Down

0 comments on commit f5569ef

Please sign in to comment.