From 4d85d9d0161620c462f9541ba7005b911fbb9566 Mon Sep 17 00:00:00 2001 From: Steven Dake Date: Mon, 10 Aug 2015 05:15:58 -0700 Subject: [PATCH] Use docker-engine in setup_gate The fedora version of docker is hacked by Red Hat to have specific features which we don't want in the gating. Use the pristine upstream version from Docker Inc. Change-Id: Ied219bc3868176f541083e9d42cde7d6cdeeb71d Partially-Implements: blueprint gate-source-builds --- tests/setup_gate.sh | 7 +++---- tox.ini | 5 ++++- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/tests/setup_gate.sh b/tests/setup_gate.sh index 9bb7b5f95e..c42095aeff 100755 --- a/tests/setup_gate.sh +++ b/tests/setup_gate.sh @@ -2,14 +2,13 @@ set -e -sudo yum install -y libffi-devel openssl-devel docker -sudo /usr/sbin/usermod -a -G dockerroot ${SUDO_USER:-$USER} +sudo yum install -y libffi-devel openssl-devel +sudo yum install -y http://yum.dockerproject.org/repo/main/fedora/21/Packages/docker-engine-1.7.1-1.fc21.x86_64.rpm sudo systemctl start docker sleep 1 -group_str="jenkins ALL=(:dockerroot) NOPASSWD: ALL" +group_str="jenkins ALL=(:docker) NOPASSWD: ALL" sudo grep -x "$group_str" /etc/sudoers > /dev/null || sudo bash -c "echo \"$group_str\" >> /etc/sudoers" -sudo chown root:dockerroot /var/run/docker.sock # disable ipv6 until we're sure routes to fedora mirrors work properly sudo sh -c 'echo "net.ipv6.conf.all.disable_ipv6 = 1" >> /etc/sysctl.conf' diff --git a/tox.ini b/tox.ini index c08f36888f..797b24a4a0 100644 --- a/tox.ini +++ b/tox.ini @@ -35,9 +35,12 @@ whitelist_externals = find bash sudo commands = + bash -c "if [ -f .buildconf ]; then mv .buildconf buildconf.bak; fi" + bash -c "echo PREFIX=centos-rdo- > .buildconf" find . -type f -name "*.pyc" -delete bash -c "if [ ! -d .testrepository ]; then testr init; fi" - sudo -g dockerroot testr run ^(test_images).* + sudo -g docker testr run ^(test_images).* + bash -c "if [ -f buildconf.bak ]; then mv buildconf.bak .buildconf; fi" [testenv:startenv] whitelist_externals = bash