8e1b0f817a
Split the gate into two specific scripts to support multiple distros Add ubuntu script. Co-Authored-By: Steven Dake <stdake@cisco.com> Change-Id: I23b9dee409b9e678422cd58525e1836541eb64da Partially-Implements: blueprint gate-source-builds
23 lines
579 B
Bash
Executable File
23 lines
579 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -o xtrace
|
|
set -o errexit
|
|
|
|
export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
|
|
|
|
# TODO(SamYaple): This check could be much better, but should work for now
|
|
if [[ $(hostname | grep rax) ]]; then
|
|
export DEV="xvde"
|
|
else
|
|
echo "Assuming this is an hpcloud box"
|
|
export DEV="vdb"
|
|
fi
|
|
|
|
# Just for mandre :)
|
|
if [[ ! -f /etc/sudoers.d/jenkins ]]; then
|
|
echo "jenkins ALL=(:docker) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/jenkins
|
|
fi
|
|
|
|
distro=$(awk -F'[="]'+ '/^ID/ {print tolower($2); exit}' /etc/*-release)
|
|
exec tests/setup_${distro}.sh
|