78b27e3e60
1. Move setup_docker.sh to tools directory 2. Make a setup_gate.sh that installs necessary packages including docker and starts docker. 3. Add logging output. 4. Add default test timeout of 2 hours. 5. Add user to the docker group before running test cases. 6. Run image build as dockerroot group. This patch has to be one commit to fix the gate in one go. Co-Authored-By: Steven Dake <stdake@cisco.com> Change-Id: I83f3cdb1dabf0dfface589c581cb22c155467acc
15 lines
399 B
Bash
Executable File
15 lines
399 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
sudo yum install -y libffi-devel openssl-devel docker
|
|
sudo /usr/sbin/usermod -a -G dockerroot ${SUDO_USER:-$USER}
|
|
sudo systemctl start docker
|
|
sleep 1
|
|
|
|
group_str="jenkins ALL=(:dockerroot) 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
|
|
|
|
echo "Completed $0."
|