Skip to content
This repository has been archived by the owner on Sep 16, 2023. It is now read-only.

Commit

Permalink
feat: enable REDIS_5_0 as and option for redis_version, add --stream-…
Browse files Browse the repository at this point in the history
…node-max-entries, --stream-node-max-bytes (#98)

* redis: v1 enables REDIS_5_0 as an option for redis_version field and adds two new redis configs --stream-node-max-entries --stream-node-max-bytes

googleapis/googleapis@685f164
commit 685f16483cc4d87c35051f21f8f13ef4fdc919b4
Author: Google APIs <noreply@google.com>
Date:   Wed Mar 25 13:30:47 2020 -0700

    redis: v1 enables REDIS_5_0 as an option for redis_version field and adds two new redis configs --stream-node-max-entries --stream-node-max-bytes

    PiperOrigin-RevId: 302957729

* redis: v1beta1 enables REDIS_5_0 as an option for redis_version field and adds two new redis configs --stream-node-max-entries --stream-node-max-bytes

googleapis/googleapis@32dc6e8
commit 32dc6e832039b61ac3fb82c72eb0a27570aebcd6
Author: Google APIs <noreply@google.com>
Date:   Wed Mar 25 13:32:11 2020 -0700

    redis: v1beta1 enables REDIS_5_0 as an option for redis_version field and adds two new redis configs --stream-node-max-entries --stream-node-max-bytes

    PiperOrigin-RevId: 302958009

* fix(java): run mvn install with retry (#453)

googleapis/synthtool@a0d3133
commit a0d3133a5d45544a66345059eebf76933265c099
Author: Jeff Ching <chingor@google.com>
Date:   Tue Mar 24 15:34:29 2020 -0700

    fix(java): run mvn install with retry (#453)

    * fix(java): run mvn install with retry

    * fix invocation of command

* chore(java_templates): mark version bumps of current library as a chore (#452)

googleapis/synthtool@ee4330a
commit ee4330a0e5f4b93978e8683fbda8e6d4148326b7
Author: Jeff Ching <chingor@google.com>
Date:   Tue Mar 24 16:20:05 2020 -0700

    chore(java_templates): mark version bumps of current library as a chore (#452)

    With the samples/install-without-bom/pom.xml referencing the latest released library, we want to mark updates of this version as a chore for renovate bot.

* chore(java): treat samples shared configuration dependency update as chore (#457)

googleapis/synthtool@e36822b
commit e36822bfa0acb355502dab391b8ef9c4f30208d8
Author: Jeff Ching <chingor@google.com>
Date:   Wed Mar 25 09:18:16 2020 -0700

    chore(java): treat samples shared configuration dependency update as chore (#457)
  • Loading branch information
yoshi-automation committed Mar 27, 2020
1 parent 427863d commit 2947244
Show file tree
Hide file tree
Showing 12 changed files with 376 additions and 150 deletions.
19 changes: 12 additions & 7 deletions .kokoro/build.sh
Expand Up @@ -20,17 +20,22 @@ scriptDir=$(realpath $(dirname "${BASH_SOURCE[0]}"))
## cd to the parent directory, i.e. the root of the git repo
cd ${scriptDir}/..

# include common functions
source ${scriptDir}/common.sh

# Print out Java version
java -version
echo ${JOB_TYPE}

mvn install -B -V \
-DskipTests=true \
-Dclirr.skip=true \
-Denforcer.skip=true \
-Dmaven.javadoc.skip=true \
-Dgcloud.download.skip=true \
-T 1C
# attempt to install 3 times with exponential backoff (starting with 10 seconds)
retry_with_backoff 3 10 \
mvn install -B -V \
-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 [[ ! -z "${GOOGLE_APPLICATION_CREDENTIALS}" && "${GOOGLE_APPLICATION_CREDENTIALS}" != /* ]]; then
Expand Down
44 changes: 44 additions & 0 deletions .kokoro/common.sh
@@ -0,0 +1,44 @@
#!/bin/bash
# Copyright 2020 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
#
# 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

function retry_with_backoff {
attempts_left=$1
sleep_seconds=$2
shift 2
command=$@

echo "${command}"
${command}
exit_code=$?

if [[ $exit_code == 0 ]]
then
return 0
fi

# failure
if [[ ${attempts_left} > 0 ]]
then
echo "failure (${exit_code}), sleeping ${sleep_seconds}..."
sleep ${sleep_seconds}
new_attempts=$((${attempts_left} - 1))
new_sleep=$((${sleep_seconds} * 2))
retry_with_backoff ${new_attempts} ${new_sleep} ${command}
fi

return $exit_code
}
15 changes: 11 additions & 4 deletions .kokoro/dependencies.sh
Expand Up @@ -15,7 +15,13 @@

set -eo pipefail

cd github/java-redis/
## Get the directory of the build script
scriptDir=$(realpath $(dirname "${BASH_SOURCE[0]}"))
## cd to the parent directory, i.e. the root of the git repo
cd ${scriptDir}/..

# include common functions
source ${scriptDir}/common.sh

# Print out Java
java -version
Expand All @@ -24,8 +30,9 @@ echo $JOB_TYPE
export MAVEN_OPTS="-Xmx1024m -XX:MaxPermSize=128m"

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

mvn -B dependency:analyze -DfailOnWarning=true
22 changes: 15 additions & 7 deletions .kokoro/linkage-monitor.sh
Expand Up @@ -17,18 +17,26 @@ set -eo pipefail
# Display commands being run.
set -x

cd github/java-redis/
## Get the directory of the build script
scriptDir=$(realpath $(dirname "${BASH_SOURCE[0]}"))
## cd to the parent directory, i.e. the root of the git repo
cd ${scriptDir}/..

# include common functions
source ${scriptDir}/common.sh

# Print out Java version
java -version
echo ${JOB_TYPE}

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

# Kokoro job cloud-opensource-java/ubuntu/linkage-monitor-gcs creates this JAR
JAR=linkage-monitor-latest-all-deps.jar
Expand Down

0 comments on commit 2947244

Please sign in to comment.