traefik/.semaphoreci/setup.sh

17 lines
680 B
Bash
Raw Normal View History

2017-05-04 13:23:04 +00:00
#!/usr/bin/env bash
set -e
export DOCKER_VERSION=17.03.1
2017-05-09 08:34:30 +00:00
source .semaphoreci/vars
2017-05-04 13:23:04 +00:00
if [ -z "${PULL_REQUEST_NUMBER}" ]; then SHOULD_TEST="-*-"; else TEMP_STORAGE=$(curl --silent https://patch-diff.githubusercontent.com/raw/containous/traefik/pull/${PULL_REQUEST_NUMBER}.diff | patch --dry-run -p1 -R); fi
2018-05-23 14:12:05 +00:00
if [ -n "$TEMP_STORAGE" ]; then SHOULD_TEST=$(echo "$TEMP_STORAGE" | grep -Ev '(.md|.yaml|.yml)' || :); fi
if [ -n "$SHOULD_TEST" ]; then sudo -E apt-get -yq update; fi
if [ -n "$SHOULD_TEST" ]; then sudo -E apt-get -yq --no-install-suggests --no-install-recommends --force-yes install docker-ce=${DOCKER_VERSION}*; fi
2018-05-23 14:12:05 +00:00
if [ -n "$SHOULD_TEST" ]; then docker version; fi