diff options
Diffstat (limited to 'kokoro')
-rw-r--r-- | kokoro/build.cfg | 7 | ||||
-rw-r--r-- | kokoro/build_tests.cfg | 1 | ||||
-rw-r--r-- | kokoro/continuous.cfg | 11 | ||||
-rw-r--r-- | kokoro/docker_tests.cfg | 1 | ||||
-rw-r--r-- | kokoro/go.cfg | 14 | ||||
-rw-r--r-- | kokoro/go_tests.cfg (renamed from kokoro/go_test.cfg) | 0 | ||||
-rw-r--r-- | kokoro/hostnet_tests.cfg | 1 | ||||
-rw-r--r-- | kokoro/iptables_tests.cfg | 10 | ||||
-rw-r--r-- | kokoro/kvm_tests.cfg | 1 | ||||
-rw-r--r-- | kokoro/kythe/generate_xrefs.cfg | 28 | ||||
-rw-r--r-- | kokoro/kythe/generate_xrefs.sh | 54 | ||||
-rw-r--r-- | kokoro/overlay_tests.cfg | 1 | ||||
-rw-r--r-- | kokoro/presubmit.cfg | 11 | ||||
-rw-r--r-- | kokoro/release-nightly.cfg | 10 | ||||
-rw-r--r-- | kokoro/release.cfg | 14 | ||||
-rw-r--r-- | kokoro/root_tests.cfg | 1 | ||||
-rwxr-xr-x | kokoro/run_build.sh | 19 | ||||
-rw-r--r-- | kokoro/run_tests.sh | 29 | ||||
-rw-r--r-- | kokoro/runtime_tests.cfg | 1 | ||||
-rw-r--r-- | kokoro/swgso_tests.cfg | 9 | ||||
-rw-r--r-- | kokoro/syscall_kvm_tests.cfg | 9 | ||||
-rwxr-xr-x | kokoro/ubuntu1604/10_core.sh | 4 | ||||
-rwxr-xr-x | kokoro/ubuntu1604/20_bazel.sh | 4 | ||||
-rwxr-xr-x | kokoro/ubuntu1604/40_kokoro.sh | 5 | ||||
-rw-r--r-- | kokoro/ubuntu1604/README.md | 34 |
25 files changed, 190 insertions, 89 deletions
diff --git a/kokoro/build.cfg b/kokoro/build.cfg index d67af4694..c9ceda947 100644 --- a/kokoro/build.cfg +++ b/kokoro/build.cfg @@ -11,13 +11,14 @@ before_action { env_vars { key: "KOKORO_REPO_KEY" - value: "$KOKORO_ROOT/src/keystore/73898_kokoro-repo-key" + value: "73898_kokoro-repo-key" } action { define_artifacts { regex: "**/runsc" - regex: "**/runsc.sha256" - regex: "**/repo/**" + regex: "**/runsc.*" + regex: "**/dists/**" + regex: "**/pool/**" } } diff --git a/kokoro/build_tests.cfg b/kokoro/build_tests.cfg new file mode 100644 index 000000000..c64b7e679 --- /dev/null +++ b/kokoro/build_tests.cfg @@ -0,0 +1 @@ +build_file: "repo/scripts/build.sh" diff --git a/kokoro/continuous.cfg b/kokoro/continuous.cfg deleted file mode 100644 index 88694220a..000000000 --- a/kokoro/continuous.cfg +++ /dev/null @@ -1,11 +0,0 @@ -# This is a temporary file. It will be removed when new Kokoro jobs exist for -# all the other presubmits. -build_file: "repo/scripts/build.sh" - -action { - define_artifacts { - regex: "**/sponge_log.xml" - regex: "**/sponge_log.log" - regex: "**/outputs.zip" - } -} diff --git a/kokoro/docker_tests.cfg b/kokoro/docker_tests.cfg index 717d71dd3..0a0ef87ed 100644 --- a/kokoro/docker_tests.cfg +++ b/kokoro/docker_tests.cfg @@ -5,5 +5,6 @@ action { regex: "**/sponge_log.xml" regex: "**/sponge_log.log" regex: "**/outputs.zip" + regex: "**/runsc_logs_*.tar.gz" } } diff --git a/kokoro/go.cfg b/kokoro/go.cfg index d1577252a..b9c1fcb12 100644 --- a/kokoro/go.cfg +++ b/kokoro/go.cfg @@ -1,5 +1,19 @@ build_file: "repo/scripts/go.sh" +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73898 + keyname: "kokoro-github-access-token" + } + } +} + +env_vars { + key: "KOKORO_GITHUB_ACCESS_TOKEN" + value: "73898_kokoro-github-access-token" +} + env_vars { key: "KOKORO_GO_PUSH" value: "true" diff --git a/kokoro/go_test.cfg b/kokoro/go_tests.cfg index 5eb51041a..5eb51041a 100644 --- a/kokoro/go_test.cfg +++ b/kokoro/go_tests.cfg diff --git a/kokoro/hostnet_tests.cfg b/kokoro/hostnet_tests.cfg index 532755f4a..520dc55a3 100644 --- a/kokoro/hostnet_tests.cfg +++ b/kokoro/hostnet_tests.cfg @@ -5,5 +5,6 @@ action { regex: "**/sponge_log.xml" regex: "**/sponge_log.log" regex: "**/outputs.zip" + regex: "**/runsc_logs_*.tar.gz" } } diff --git a/kokoro/iptables_tests.cfg b/kokoro/iptables_tests.cfg new file mode 100644 index 000000000..7af20629a --- /dev/null +++ b/kokoro/iptables_tests.cfg @@ -0,0 +1,10 @@ +build_file: "repo/scripts/iptables_test.sh" + +action { + define_artifacts { + regex: "**/sponge_log.xml" + regex: "**/sponge_log.log" + regex: "**/outputs.zip" + regex: "**/runsc_logs_*.tar.gz" + } +} diff --git a/kokoro/kvm_tests.cfg b/kokoro/kvm_tests.cfg index 54365c2b2..1feb60c8a 100644 --- a/kokoro/kvm_tests.cfg +++ b/kokoro/kvm_tests.cfg @@ -5,5 +5,6 @@ action { regex: "**/sponge_log.xml" regex: "**/sponge_log.log" regex: "**/outputs.zip" + regex: "**/runsc_logs_*.tar.gz" } } diff --git a/kokoro/kythe/generate_xrefs.cfg b/kokoro/kythe/generate_xrefs.cfg new file mode 100644 index 000000000..03e65c54e --- /dev/null +++ b/kokoro/kythe/generate_xrefs.cfg @@ -0,0 +1,28 @@ +build_file: "gvisor/kokoro/kythe/generate_xrefs.sh" + +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73898 + keyname: "kokoro-rbe-service-account" + } + } +} + +bazel_setting { + project_id: "gvisor-rbe" + local_execution: false + auth_credential: { + keystore_config_id: 73898 + keyname: "kokoro-rbe-service-account" + } + bes_backend_address: "buildeventservice.googleapis.com" + foundry_backend_address: "remotebuildexecution.googleapis.com" + upsalite_frontend_address: "https://source.cloud.google.com" +} + +action { + define_artifacts { + regex: "*.kzip" + } +} diff --git a/kokoro/kythe/generate_xrefs.sh b/kokoro/kythe/generate_xrefs.sh new file mode 100644 index 000000000..799467a34 --- /dev/null +++ b/kokoro/kythe/generate_xrefs.sh @@ -0,0 +1,54 @@ +#!/bin/bash + +# Copyright 2019 The gVisor Authors. +# +# 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 -ex + +# Install the latest version of Bazel. The default on Kokoro images is out of +# date. +if command -v use_bazel.sh >/dev/null; then + use_bazel.sh latest +fi +bazel version + +python3 -V + +readonly KYTHE_VERSION='v0.0.37' +readonly WORKDIR="$(mktemp -d)" +readonly KYTHE_DIR="${WORKDIR}/kythe-${KYTHE_VERSION}" +if [[ -n "$KOKORO_GIT_COMMIT" ]]; then + readonly KZIP_FILENAME="${KOKORO_ARTIFACTS_DIR}/${KOKORO_GIT_COMMIT}.kzip" +else + readonly KZIP_FILENAME="$(git rev-parse HEAD).kzip" +fi + +wget -q -O "${WORKDIR}/kythe.tar.gz" \ + "https://github.com/kythe/kythe/releases/download/${KYTHE_VERSION}/kythe-${KYTHE_VERSION}.tar.gz" +tar --no-same-owner -xzf "${WORKDIR}/kythe.tar.gz" --directory "$WORKDIR" + +if [[ -n "$KOKORO_ARTIFACTS_DIR" ]]; then + cd "${KOKORO_ARTIFACTS_DIR}/github/gvisor" +fi +bazel \ + --bazelrc="${KYTHE_DIR}/extractors.bazelrc" \ + build \ + --override_repository kythe_release="${KYTHE_DIR}" \ + --define=kythe_corpus=gvisor.dev \ + --cxxopt=-std=c++17 \ + //... + +"${KYTHE_DIR}/tools/kzip" merge \ + --output "$KZIP_FILENAME" \ + $(find -L bazel-out/*/extra_actions/ -name '*.kzip') diff --git a/kokoro/overlay_tests.cfg b/kokoro/overlay_tests.cfg index abd96f60c..6a2ddbd03 100644 --- a/kokoro/overlay_tests.cfg +++ b/kokoro/overlay_tests.cfg @@ -5,5 +5,6 @@ action { regex: "**/sponge_log.xml" regex: "**/sponge_log.log" regex: "**/outputs.zip" + regex: "**/runsc_logs_*.tar.gz" } } diff --git a/kokoro/presubmit.cfg b/kokoro/presubmit.cfg deleted file mode 100644 index eb0c78ea4..000000000 --- a/kokoro/presubmit.cfg +++ /dev/null @@ -1,11 +0,0 @@ -# This is a temporary file. It will be removed when new Kokoro jobs exist for -# all the other presubmits. -build_file: "repo/kokoro/run_tests.sh" - -action { - define_artifacts { - regex: "**/sponge_log.xml" - regex: "**/sponge_log.log" - regex: "**/outputs.zip" - } -} diff --git a/kokoro/release-nightly.cfg b/kokoro/release-nightly.cfg deleted file mode 100644 index ae134258c..000000000 --- a/kokoro/release-nightly.cfg +++ /dev/null @@ -1,10 +0,0 @@ -# This file is a temporary bridge. It will be removed shortly, when Kokoro jobs -# are configured to point at the new build and release configurations. -build_file: "repo/kokoro/run_build.sh" - -action { - define_artifacts { - regex: "**/runsc" - regex: "**/runsc.sha512" - } -} diff --git a/kokoro/release.cfg b/kokoro/release.cfg index b9d35bc51..5cec1790a 100644 --- a/kokoro/release.cfg +++ b/kokoro/release.cfg @@ -1 +1,15 @@ build_file: "repo/scripts/release.sh" + +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73898 + keyname: "kokoro-github-access-token" + } + } +} + +env_vars { + key: "KOKORO_GITHUB_ACCESS_TOKEN" + value: "73898_kokoro-github-access-token" +} diff --git a/kokoro/root_tests.cfg b/kokoro/root_tests.cfg index 20b97766a..28351695c 100644 --- a/kokoro/root_tests.cfg +++ b/kokoro/root_tests.cfg @@ -5,5 +5,6 @@ action { regex: "**/sponge_log.xml" regex: "**/sponge_log.log" regex: "**/outputs.zip" + regex: "**/runsc_logs_*.tar.gz" } } diff --git a/kokoro/run_build.sh b/kokoro/run_build.sh deleted file mode 100755 index da6a0c85e..000000000 --- a/kokoro/run_build.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/bash - -# Copyright 2018 The gVisor Authors. -# -# 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. - -# This file is a temporary bridge. We will create multiple independent Kokoro -# workflows that call each of the build scripts independently. -KOKORO_BUILD_NIGHTLY=true $(dirname $0)/../scripts/build.sh diff --git a/kokoro/run_tests.sh b/kokoro/run_tests.sh deleted file mode 100644 index 5552da11c..000000000 --- a/kokoro/run_tests.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/bash - -# Copyright 2019 The gVisor Authors. -# -# 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 -xeo pipefail - -# This file is a temporary bridge. We will create multiple independent Kokoro -# workflows that call each of the test scripts independently. - -# Run all the tests in sequence. -$(dirname $0)/../scripts/do_tests.sh -$(dirname $0)/../scripts/make_tests.sh -$(dirname $0)/../scripts/root_tests.sh -$(dirname $0)/../scripts/docker_tests.sh -$(dirname $0)/../scripts/overlay_tests.sh -$(dirname $0)/../scripts/hostnet_tests.sh -$(dirname $0)/../scripts/simple_tests.sh diff --git a/kokoro/runtime_tests.cfg b/kokoro/runtime_tests.cfg new file mode 100644 index 000000000..7d56d5aca --- /dev/null +++ b/kokoro/runtime_tests.cfg @@ -0,0 +1 @@ +build_file: "repo/scripts/runtime_tests.sh" diff --git a/kokoro/swgso_tests.cfg b/kokoro/swgso_tests.cfg new file mode 100644 index 000000000..101a9c607 --- /dev/null +++ b/kokoro/swgso_tests.cfg @@ -0,0 +1,9 @@ +build_file: "repo/scripts/swgso_tests.sh" + +action { + define_artifacts { + regex: "**/sponge_log.xml" + regex: "**/sponge_log.log" + regex: "**/outputs.zip" + } +} diff --git a/kokoro/syscall_kvm_tests.cfg b/kokoro/syscall_kvm_tests.cfg new file mode 100644 index 000000000..3b99e9c13 --- /dev/null +++ b/kokoro/syscall_kvm_tests.cfg @@ -0,0 +1,9 @@ +build_file: "repo/scripts/syscall_kvm_tests.sh" + +action { + define_artifacts { + regex: "**/sponge_log.xml" + regex: "**/sponge_log.log" + regex: "**/outputs.zip" + } +} diff --git a/kokoro/ubuntu1604/10_core.sh b/kokoro/ubuntu1604/10_core.sh index e87a6eee8..46dda6bb1 100755 --- a/kokoro/ubuntu1604/10_core.sh +++ b/kokoro/ubuntu1604/10_core.sh @@ -21,8 +21,8 @@ apt-get update && apt-get -y install make git-core build-essential linux-headers # Install a recent go toolchain. if ! [[ -d /usr/local/go ]]; then - wget https://dl.google.com/go/go1.12.linux-amd64.tar.gz - tar -xvf go1.12.linux-amd64.tar.gz + wget https://dl.google.com/go/go1.13.5.linux-amd64.tar.gz + tar -xvf go1.13.5.linux-amd64.tar.gz mv go /usr/local fi diff --git a/kokoro/ubuntu1604/20_bazel.sh b/kokoro/ubuntu1604/20_bazel.sh index 74b4b8be2..b9a894024 100755 --- a/kokoro/ubuntu1604/20_bazel.sh +++ b/kokoro/ubuntu1604/20_bazel.sh @@ -16,9 +16,7 @@ set -xeo pipefail -# We need to install a specific version of bazel due to a bug with the RBE -# environment not respecting the dockerPrivileged configuration. -declare -r BAZEL_VERSION=0.28.1 +declare -r BAZEL_VERSION=0.29.1 # Install bazel dependencies. apt-get update && apt-get install -y openjdk-8-jdk-headless unzip diff --git a/kokoro/ubuntu1604/40_kokoro.sh b/kokoro/ubuntu1604/40_kokoro.sh index 64772d74d..3f50929d5 100755 --- a/kokoro/ubuntu1604/40_kokoro.sh +++ b/kokoro/ubuntu1604/40_kokoro.sh @@ -23,7 +23,10 @@ declare -r ssh_public_keys=( ) # Install dependencies. -apt-get update && apt-get install -y rsync coreutils python-psutil qemu-kvm +apt-get update && apt-get install -y rsync coreutils python-psutil qemu-kvm python-pip zip + +# junitparser is used to merge junit xml files. +pip install junitparser # We need a kbuilder user. if useradd -c "kbuilder user" -m -s /bin/bash kbuilder; then diff --git a/kokoro/ubuntu1604/README.md b/kokoro/ubuntu1604/README.md new file mode 100644 index 000000000..64f913b9a --- /dev/null +++ b/kokoro/ubuntu1604/README.md @@ -0,0 +1,34 @@ +## Image Update + +After making changes to files in the directory, you must run the following +commands to update the image Kokoro uses: + +```shell +gcloud config set project gvisor-kokoro-testing +third_party/gvisor/kokoro/ubuntu1604/build.sh +third_party/gvisor/kokoro/ubuntu1804/build.sh +``` + +Note: the command above will change your default project for `gcloud`. Run +`gcloud config set project` again to revert back to your default project. + +Note: Files in `third_party/gvisor/kokoro/ubuntu1804/` as symlinks to +`ubuntu1604`, therefore both images must be updated. + +After the script finishes, the last few lines of the output will container the +image name. If the output was lost, you can run `build.sh` again to print the +image name. + +``` +NAME PROJECT FAMILY DEPRECATED STATUS +image-6777fa4666a968c8 gvisor-kokoro-testing READY ++ cleanup ++ gcloud compute instances delete --quiet build-tlfrdv +Deleted [https://www.googleapis.com/compute/v1/projects/gvisor-kokoro-testing/zones/us-central1-f/instances/build-tlfrdv]. +``` + +To setup Kokoro to use the new image, copy the image names to their +corresponding file below: + +* //devtools/kokoro/config/gcp/gvisor/ubuntu1604.gcl +* //devtools/kokoro/config/gcp/gvisor/ubuntu1804.gcl |