Skip to content

Commit

Permalink
chore: Update Kokoro build toolchain: run from docker, update to grpc…
Browse files Browse the repository at this point in the history
… 1.36.4 and bazel 4.0.0

PiperOrigin-RevId: 370536131
  • Loading branch information
Google APIs authored and copybara-github committed Apr 26, 2021
1 parent 60e129d commit de7fb25
Show file tree
Hide file tree
Showing 9 changed files with 48 additions and 45 deletions.
2 changes: 1 addition & 1 deletion .bazeliskrc
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# See https://github.com/bazelbuild/bazelisk
USE_BAZEL_VERSION=3.0.0
USE_BAZEL_VERSION=4.0.0
3 changes: 1 addition & 2 deletions .kokoro/.bazelrc
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
build --extra_toolchains=@gapic_generator_python//:pyenv3_toolchain --define=gapic_gen_python=3.6
test --extra_toolchains=@gapic_generator_python//:pyenv3_toolchain --define=gapic_gen_python=3.6

27 changes: 27 additions & 0 deletions .kokoro/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
FROM python:3.8

RUN apt-get update

RUN apt-get install -y \
zip \
build-essential \
python-dev \
python3-dev \
openjdk-11-jdk

RUN mkdir -p /tools
WORKDIR /tools
RUN curl -L https://github.com/bazelbuild/bazelisk/releases/download/v1.8.0/bazelisk-linux-amd64 -o bazelisk
RUN chmod +x bazelisk
RUN curl -L https://github.com/bazelbuild/bazel/releases/download/4.0.0/bazel-4.0.0-linux-x86_64 -o bazel
RUN chmod +x bazel
WORKDIR /

ENV PATH="/tools:${PATH}"

ENV BAZELISK_BIN=/tools/bazelisk
ENV BAZEL_BIN=/tools/bazelisk

RUN apt-get clean

ENTRYPOINT [ "/bin/bash" ]
3 changes: 0 additions & 3 deletions .kokoro/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ set -e
cd ${KOKORO_ARTIFACTS_DIR}/github/googleapis
cp .kokoro/.bazelrc $HOME/.bazelrc

# shellcheck source=/dev/null
source .kokoro/setup.sh

#
# Run build and tests
#
Expand Down
2 changes: 1 addition & 1 deletion .kokoro/continuous.cfg
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Format: //devtools/kokoro/config/proto/build.proto

build_file: "googleapis/.kokoro/build.sh"
build_file: "googleapis/.kokoro/start.sh"
2 changes: 1 addition & 1 deletion .kokoro/presubmit.cfg
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Format: //devtools/kokoro/config/proto/build.proto

build_file: "googleapis/.kokoro/build.sh"
build_file: "googleapis/.kokoro/start.sh"
34 changes: 0 additions & 34 deletions .kokoro/setup.sh

This file was deleted.

14 changes: 14 additions & 0 deletions .kokoro/start.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash

set -e

export BAZEL_ROOT=/bazel_root

docker container run \
--env KOKORO_ROOT --env KOKORO_ARTIFACTS_DIR --env KOKORO_PIPER_DIR --env BAZEL_ROOT \
--volume ${KOKORO_ROOT}:${KOKORO_ROOT} \
--tmpfs ${BAZEL_ROOT}:exec \
--workdir ${KOKORO_ROOT} \
--ipc=host \
--entrypoint ${KOKORO_ARTIFACTS_DIR}/github/googleapis/.kokoro/build.sh \
gcr.io/gapic-images/googleapis:20210423
6 changes: 3 additions & 3 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -154,9 +154,8 @@ rules_gapic_repositories()

http_archive(
name = "com_github_grpc_grpc",
sha256 = "0f330e4734f49d2bfdb9ad195b021720b5dd2e2a534cdf21c7ddc7f7eb42e170",
strip_prefix = "grpc-1.33.1",
urls = ["https://github.com/grpc/grpc/archive/v1.33.1.zip"],
strip_prefix = "grpc-1.36.4",
urls = ["https://github.com/grpc/grpc/archive/v1.36.4.zip"],
)

load("@com_github_grpc_grpc//bazel:grpc_deps.bzl", "grpc_deps")
Expand Down Expand Up @@ -407,3 +406,4 @@ http_archive(
load("@gapic_generator_ruby//rules_ruby_gapic:repositories.bzl", "gapic_generator_ruby_repositories")

gapic_generator_ruby_repositories()

0 comments on commit de7fb25

Please sign in to comment.