Browse Source

Trying to fix the testrunner+sudo issue

msmith-techempower 10 years ago
parent
commit
7b61520622
1 changed files with 4 additions and 4 deletions
  1. 4 4
      toolset/run-ci.py

+ 4 - 4
toolset/run-ci.py

@@ -389,13 +389,13 @@ class CIRunnner:
     sudo sed -i 's|travis:x:\(.*\):|travis:x:\1:testrunner|g' /etc/group
     # Maybe unneeded - add the travis user to the testrunner group
     sudo sed -i 's|testrunner:x:\(.*\):|testrunner:x:\1:travis|g' /etc/group
+    # Need to add testrunner to the sudoers group AND default him to a sudoers
+    # because the travis user isn't in the sudo group - he's a sudoer.
+    sudo sed -i 's|sudo:x:\(.*\):\(.*\)|sudo:x:\1:\2,testrunner|g' /etc/group
+    echo "testrunner ALL=(ALL:ALL) NOPASSWD: ALL" | sudo tee -a /etc/sudoers
     # Set the default shell for testrunner to /bin/bash
     sudo sed -i 's|/home/testrunner:/bin/sh|/home/testrunner:/bin/bash|g' /etc/passwd
 
-    # TEST
-    sudo cat /etc/group | grep testrunner
-    sudo cat /etc/passwd | grep testrunner
-
     # =============Setup Databases===========================
     # NOTE: Do not run `--install database` in travis-ci! 
     #       It changes DB configuration files and will break everything