Configure sudoers at the beginning of the script 31/39131/2
authorThanh Ha <thanh.ha@linuxfoundation.org>
Thu, 19 May 2016 20:32:06 +0000 (16:32 -0400)
committerThanh Ha <thanh.ha@linuxfoundation.org>
Thu, 19 May 2016 20:33:10 +0000 (16:33 -0400)
The docker commands could take a long time to finish and we need sudoers
setup early.

Change-Id: Iad1ddd27e6256d2d0ad950256f033eed7e4a5ca3
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
jenkins-scripts/ubuntu-docker-ovs.sh

index 87380cefd472fdab0e0dad090026cc5397b40bff..b4e0207e4566f91830e52d9b9d60f574cb41b294 100755 (executable)
@@ -1,5 +1,11 @@
 #!/bin/bash
 
+# make sure we don't require tty for sudo operations
+cat <<EOF >/etc/sudoers.d/89-jenkins-user-defaults
+Defaults:jenkins !requiretty
+jenkins     ALL = NOPASSWD: ALL
+EOF
+
 # Do the final install of OVS that the has to be done at boot time for
 # some reason due to how the snapshots keep behaving.
 dpkg --install /root/openvswitch-datapath-dkms* && \
@@ -11,12 +17,4 @@ dpkg --install /root/openvswitch-{common,switch}*
 # pull docker images
 docker pull alagalah/odlpoc_ovs230
 
-
-# make sure we don't require tty for sudo operations
-cat <<EOF >/etc/sudoers.d/89-jenkins-user-defaults
-Defaults:jenkins !requiretty
-jenkins     ALL = NOPASSWD: ALL
-EOF
-
 # vim: sw=2 ts=2 sts=2 et :
-