diff options
author | Adin Scannell <ascannell@google.com> | 2019-08-28 22:06:09 -0700 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2019-08-28 22:07:12 -0700 |
commit | 06ae36185ec0a68b4d191ba1c86d4dc250ac2b38 (patch) | |
tree | ac6b64e5b60bffdb48f1953a17aa6b476ebb6c4f /kokoro | |
parent | 24ecce5dbf7673ab09669aae06d78d455862d47a (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')
-rwxr-xr-x | kokoro/ubuntu1604/40_kokoro.sh | 7 |
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 |