summaryrefslogtreecommitdiffhomepage
path: root/kokoro/ubuntu1604/40_kokoro.sh
diff options
context:
space:
mode:
authorAdin Scannell <ascannell@google.com>2019-08-28 22:06:09 -0700
committergVisor bot <gvisor-bot@google.com>2019-08-28 22:07:12 -0700
commit06ae36185ec0a68b4d191ba1c86d4dc250ac2b38 (patch)
treeac6b64e5b60bffdb48f1953a17aa6b476ebb6c4f /kokoro/ubuntu1604/40_kokoro.sh
parent24ecce5dbf7673ab09669aae06d78d455862d47a (diff)
Fix kokoro image build scripts
The /tmpfs directory needs to be writable, and kokoro needs passwordless sudo access to execute the test scripts. PiperOrigin-RevId: 266063723
Diffstat (limited to 'kokoro/ubuntu1604/40_kokoro.sh')
-rwxr-xr-xkokoro/ubuntu1604/40_kokoro.sh7
1 files changed, 6 insertions, 1 deletions
diff --git a/kokoro/ubuntu1604/40_kokoro.sh b/kokoro/ubuntu1604/40_kokoro.sh
index a49d75936..27366e83d 100755
--- a/kokoro/ubuntu1604/40_kokoro.sh
+++ b/kokoro/ubuntu1604/40_kokoro.sh
@@ -33,10 +33,15 @@ if useradd -c "kbuilder user" -m -s /bin/bash kbuilder; then
chmod 0600 ~kbuilder/.ssh/authorized_keys
fi
+# Give passwordless sudo access.
+cat > /etc/sudoers.d/kokoro <<EOF
+kbuilder ALL=(ALL) NOPASSWD:ALL
+EOF
+
# Ensure that /tmpfs exists and is writable by kokoro.
#
# Note that kokoro will typically attach a second disk (sdb) to the instance
# that is used for the /tmpfs volume. In the future we could setup an init
# script that formats and mounts this here; however, we don't expect our build
# artifacts to be that large.
-mkdir -p /tmpfs && chmod 0755 /tmpfs && touch /tmpfs/READY
+mkdir -p /tmpfs && chmod 0777 /tmpfs && touch /tmpfs/READY