mirror of
https://github.com/cytopia/devilbox.git
synced 2024-12-22 06:07:48 +00:00
Simplify travis configuration
This commit is contained in:
parent
eff72f41a9
commit
a237ce85d0
34
.travis.yml
34
.travis.yml
@ -124,19 +124,22 @@ env:
|
|||||||
### Installation
|
### Installation
|
||||||
###
|
###
|
||||||
install:
|
install:
|
||||||
|
# Update Debian/Ubuntu package index
|
||||||
|
- if [ "${S1}" != "DOCUMENTATION" ]; then
|
||||||
|
until sudo apt-get update -qq; do sleep 1; done
|
||||||
|
fi
|
||||||
|
|
||||||
# Install dependencies for documentation
|
# Install dependencies for documentation
|
||||||
- if [ "${S1}" = "DOCUMENTATION" ]; then
|
- if [ "${S1}" = "DOCUMENTATION" ]; then
|
||||||
max=100; i=0; while [ $i -lt $max ]; do if pip install sphinx; then break; else i=$((i+1)); fi done;
|
until pip install sphinx; do sleep 1; done;
|
||||||
max=100; i=0; while [ $i -lt $max ]; do if pip install sphinx-autobuild; then break; else i=$((i+1)); fi done;
|
until pip install sphinx-autobuild; do sleep 1; done;
|
||||||
max=100; i=0; while [ $i -lt $max ]; do if pip install recommonmark; then break; else i=$((i+1)); fi done;
|
until pip install recommonmark; do sleep 1; done;
|
||||||
max=100; i=0; while [ $i -lt $max ]; do if pip install sphinx_rtd_theme; then break; else i=$((i+1)); fi done;
|
until pip install sphinx_rtd_theme; do sleep 1; done;
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Determine latest Docker version in apt
|
# Determine latest Docker version in apt
|
||||||
- set -e;
|
- DOCKER_APT="";
|
||||||
DOCKER_APT="";
|
|
||||||
if [ "${S1}" = "DOCKER" ]; then
|
if [ "${S1}" = "DOCKER" ]; then
|
||||||
max=100; i=0; while [ $i -lt $max ]; do if sudo apt-get update -qq; then break; else i=$((i+1)); fi; done;
|
|
||||||
DOCKER_APT="$( curl -sS https://raw.githubusercontent.com/cytopia/tools/master/docker-apt-versions | sh -s "${V1}" )";
|
DOCKER_APT="$( curl -sS https://raw.githubusercontent.com/cytopia/tools/master/docker-apt-versions | sh -s "${V1}" )";
|
||||||
fi;
|
fi;
|
||||||
if [ -n "${DOCKER_APT}" ]; then
|
if [ -n "${DOCKER_APT}" ]; then
|
||||||
@ -145,8 +148,7 @@ install:
|
|||||||
echo "${DOCKER_APT}";
|
echo "${DOCKER_APT}";
|
||||||
|
|
||||||
# Determine latest Docker Compose version
|
# Determine latest Docker Compose version
|
||||||
- set -e;
|
- if [ "${S2}" = "COMPOSE" ]; then
|
||||||
if [ "${S2}" = "COMPOSE" ]; then
|
|
||||||
COMPOSE_VERSION="$( curl -sS https://raw.githubusercontent.com/cytopia/tools/master/docker-compose-versions | sh -s "${V2}" )";
|
COMPOSE_VERSION="$( curl -sS https://raw.githubusercontent.com/cytopia/tools/master/docker-compose-versions | sh -s "${V2}" )";
|
||||||
else
|
else
|
||||||
COMPOSE_VERSION="$( curl -sS https://raw.githubusercontent.com/cytopia/tools/master/docker-compose-versions | sh -s 1 )";
|
COMPOSE_VERSION="$( curl -sS https://raw.githubusercontent.com/cytopia/tools/master/docker-compose-versions | sh -s 1 )";
|
||||||
@ -154,17 +156,9 @@ install:
|
|||||||
echo "${COMPOSE_VERSION}";
|
echo "${COMPOSE_VERSION}";
|
||||||
|
|
||||||
# Install Docker and Docker Compose
|
# Install Docker and Docker Compose
|
||||||
- set -e;
|
- if [ "${S1}" != "DOCUMENTATION" ]; then
|
||||||
if [ "${S1}" != "DOCUMENTATION" ]; then
|
until sudo apt-get -y -qq -o Dpkg::Options::="--force-confnew" install docker-ce${DOCKER_APT}; do sleep 1; done;
|
||||||
max=100; i=0; while [ $i -lt $max ]; do
|
until curl -L -sS --retry 100 --retry-max-time 0 https://github.com/docker/compose/releases/download/${COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > docker-compose; do sleep 1; done;
|
||||||
if sudo apt-get update -qq; then break; else i=$((i+1)); fi;
|
|
||||||
done;
|
|
||||||
max=100; i=0; while [ $i -lt $max ]; do
|
|
||||||
if sudo apt-get -y -qq -o Dpkg::Options::="--force-confnew" install docker-ce${DOCKER_APT}; then break; else i=$((i+1)); fi;
|
|
||||||
done;
|
|
||||||
max=100; i=0; while [ $i -lt $max ]; do
|
|
||||||
if curl -L --retry 100 --retry-max-time 0 https://github.com/docker/compose/releases/download/${COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > docker-compose; then break; else i=$((i+1)); fi;
|
|
||||||
done;
|
|
||||||
chmod +x docker-compose;
|
chmod +x docker-compose;
|
||||||
sudo mv -f docker-compose /usr/local/bin;
|
sudo mv -f docker-compose /usr/local/bin;
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user