add 17.05.x to deb_dpdk CI builds
[ci-management.git] / jenkins-scripts / basic_settings.sh
index 412dfff..0cebb2b 100755 (executable)
 
 case "$(facter operatingsystem)" in
   Ubuntu)
-    apt-get update
     # make sure that the ca-certs are properly updated
     /usr/sbin/update-ca-certificates
 
     # attach to the fd.io.dev apt repo
-    echo 'deb http://nexus.fd.io/content/repositories/fd.io.dev/ ./' >> /etc/apt/sources.list
+#    echo 'deb http://nexus.fd.io/content/repositories/fd.io.dev/ ./' >> /etc/apt/sources.list
+
+    # Configure Ubuntu mirror
+    perl -pi -e 'unless(m{(security|fd\.io)}){ s{://[^/]+/}{://ca.archive.ubuntu.com/} }' /etc/apt/sources.list
     ;;
   *)
     # Do nothing on other distros for now
@@ -35,6 +37,11 @@ jenkins         soft    nofile          16000
 jenkins         hard    nofile          16000
 EOF
 
+cat <<EOJENKINS_SUDO >/etc/sudoers.d/89-jenkins-user-defaults
+Defaults:jenkins !requiretty
+jenkins     ALL = NOPASSWD: ALL
+EOJENKINS_SUDO
+
 cat <<EOSSH >> /etc/ssh/ssh_config
 Host *
   ServerAliveInterval 60