diff --git a/ci/crosvm_test_vm/Dockerfile b/ci/crosvm_test_vm/Dockerfile index 9974052147..97be9825e4 100644 --- a/ci/crosvm_test_vm/Dockerfile +++ b/ci/crosvm_test_vm/Dockerfile @@ -24,7 +24,7 @@ RUN apt-get update && apt-get install --yes \ WORKDIR /workspace/vm RUN curl -sSfL -o rootfs.qcow2 \ - "https://cdimage.debian.org/cdimage/cloud/buster/20201214-484/debian-10-generic-${VM_ARCH}-20201214-484.qcow2" + "http://cloud.debian.org/images/cloud/bullseye/daily/20210208-542/debian-11-generic-${VM_ARCH}-daily-20210208-542.qcow2" # Package `cloud_init_data.yaml` to be loaded during `first_boot.expect` COPY build/cloud_init_data.yaml ./ diff --git a/ci/crosvm_test_vm/build/cloud_init_data.yaml b/ci/crosvm_test_vm/build/cloud_init_data.yaml index 5544d5f2e4..63dac25b47 100644 --- a/ci/crosvm_test_vm/build/cloud_init_data.yaml +++ b/ci/crosvm_test_vm/build/cloud_init_data.yaml @@ -12,12 +12,6 @@ users: crosvm@localhost groups: kvm, disk, tty -apt: - sources: - testing: - source: "deb $MIRROR bullseye main" - conf: APT::Default-Release "stable"; - # Store working data on tmpfs to reduce unnecessary disk IO mounts: - [swap, null] @@ -37,18 +31,6 @@ packages: - rsync runcmd: - # Install testing (debian bullseye) versions of some libraries. - - [ - apt-get, - install, - --yes, - -t, - testing, - --no-install-recommends, - libdrm2, - libepoxy0, - ] - # Trim some fat - [apt-get, remove, --yes, vim-runtime, iso-codes, perl, grub-common] - [apt-get, autoremove, --yes] diff --git a/ci/image_tag b/ci/image_tag index 75d30fb532..9742708e66 100644 --- a/ci/image_tag +++ b/ci/image_tag @@ -1 +1 @@ -r0001 +r0002 diff --git a/ci/kokoro/common.sh b/ci/kokoro/common.sh index 54aba174f1..744517d4f4 100755 --- a/ci/kokoro/common.sh +++ b/ci/kokoro/common.sh @@ -5,6 +5,19 @@ crosvm_root="${KOKORO_ARTIFACTS_DIR}"/git/crosvm +# Enable SSH access to the kokoro builder. +# Use the fusion2/ UI to trigger a build and set the DEBUG_SSH_KEY environment +# variable to your public key, that will allow you to connect to the builder +# via SSH. +# Note: Access is restricted to the google corporate network. +# Details: https://yaqs.corp.google.com/eng/q/6628551334035456 +if [[ ! -z "${DEBUG_SSH_KEY}" ]]; then + echo "${DEBUG_SSH_KEY}" >> ~/.ssh/authorized_keys + external_ip=$(curl -s -H "Metadata-Flavor: Google" + http://metadata/computeMetadata/v1/instance/network-interfaces/0/access-configs/0/external-ip) + echo "SSH Debug enabled. Connect to: kbuilder@${external_ip}" +fi + setup_source() { if [ -z "${KOKORO_ARTIFACTS_DIR}" ]; then echo "This script must be run in kokoro" @@ -45,6 +58,12 @@ setup_source() { } cleanup() { + # Sleep after the build to allow for SSH debugging to continue. + if [[ ! -z "${DEBUG_SSH_KEY}" ]]; then + echo "Build done. Blocking for SSH debugging." + sleep 1h + fi + if command -v bindfs >/dev/null; then fusermount -uz "${KOKORO_ARTIFACTS_DIR}/cros/src/platform/crosvm" else