Merge pull request #1608 from ldez/feat-semaphoreci
SemaphoreCI on 1.3 branch
This commit is contained in:
commit
ac0e48b48c
9 changed files with 49 additions and 31 deletions
|
@ -1,7 +1,11 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
sudo -E apt-get -yq update
|
||||||
|
sudo -E apt-get -yq --no-install-suggests --no-install-recommends --force-yes install docker-engine=${DOCKER_VERSION}*
|
||||||
|
docker version
|
||||||
|
|
||||||
pip install --user -r requirements.txt
|
pip install --user -r requirements.txt
|
||||||
|
|
||||||
make pull-images
|
make pull-images
|
||||||
make validate
|
ci_retry make validate
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
make test-unit && make test-integration
|
make test-unit
|
||||||
|
ci_retry make test-integration
|
||||||
make -j${N_MAKE_JOBS} crossbinary-default-parallel
|
make -j${N_MAKE_JOBS} crossbinary-default-parallel
|
||||||
|
|
|
@ -5,6 +5,8 @@ export secure='btt4r13t09gQlHb6gYrvGC2yGCMMHfnp1Mz1RQedc4Mpf/FfT8aE6xmK2a2i9CCvs
|
||||||
|
|
||||||
export REPO='containous/traefik'
|
export REPO='containous/traefik'
|
||||||
|
|
||||||
|
export DOCKER_VERSION=1.12.6
|
||||||
|
|
||||||
if VERSION=$(git describe --exact-match --abbrev=0 --tags);
|
if VERSION=$(git describe --exact-match --abbrev=0 --tags);
|
||||||
then
|
then
|
||||||
export VERSION
|
export VERSION
|
||||||
|
@ -15,3 +17,25 @@ fi
|
||||||
export CODENAME=raclette
|
export CODENAME=raclette
|
||||||
|
|
||||||
export N_MAKE_JOBS=2
|
export N_MAKE_JOBS=2
|
||||||
|
|
||||||
|
|
||||||
|
function ci_retry {
|
||||||
|
|
||||||
|
local NRETRY=3
|
||||||
|
local NSLEEP=5
|
||||||
|
local n=0
|
||||||
|
|
||||||
|
until [ $n -ge $NRETRY ]
|
||||||
|
do
|
||||||
|
"$@" && break
|
||||||
|
n=$[$n+1]
|
||||||
|
echo "$@ failed, attempt ${n}/${NRETRY}"
|
||||||
|
sleep $NSLEEP
|
||||||
|
done
|
||||||
|
|
||||||
|
[ $n -lt $NRETRY ]
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
export -f ci_retry
|
||||||
|
|
||||||
|
|
28
.travis.yml
28
.travis.yml
|
@ -11,32 +11,20 @@ env:
|
||||||
- VERSION: $TRAVIS_TAG
|
- VERSION: $TRAVIS_TAG
|
||||||
- CODENAME: raclette
|
- CODENAME: raclette
|
||||||
- N_MAKE_JOBS: 2
|
- N_MAKE_JOBS: 2
|
||||||
|
- DOCKER_VERSION: 1.12.6
|
||||||
|
|
||||||
matrix:
|
|
||||||
fast_finish: true
|
|
||||||
include:
|
|
||||||
- env: DOCKER_VERSION=1.10.3
|
|
||||||
- env: DOCKER_VERSION=1.12.6
|
|
||||||
|
|
||||||
before_install:
|
|
||||||
- sudo -E apt-get -yq update
|
|
||||||
- sudo -E apt-get -yq --no-install-suggests --no-install-recommends --force-yes install docker-engine=${DOCKER_VERSION}*
|
|
||||||
install:
|
|
||||||
- docker version
|
|
||||||
- pip install --user -r requirements.txt
|
|
||||||
- make pull-images
|
|
||||||
before_script:
|
|
||||||
- make validate
|
|
||||||
script:
|
script:
|
||||||
- make test-unit && travis_retry make test-integration
|
- echo "Skipping tests... (Tests are executed on SemaphoreCI)"
|
||||||
- make -j${N_MAKE_JOBS} crossbinary-default-parallel
|
|
||||||
after_failure:
|
|
||||||
- docker ps
|
|
||||||
before_deploy:
|
before_deploy:
|
||||||
- >
|
- >
|
||||||
if ! [ "$BEFORE_DEPLOY_RUN" ]; then
|
if ! [ "$BEFORE_DEPLOY_RUN" ]; then
|
||||||
export BEFORE_DEPLOY_RUN=1;
|
export BEFORE_DEPLOY_RUN=1;
|
||||||
make -j${N_MAKE_JOBS} crossbinary-others-parallel;
|
sudo -E apt-get -yq update;
|
||||||
|
sudo -E apt-get -yq --no-install-suggests --no-install-recommends --force-yes install docker-engine=${DOCKER_VERSION}*;
|
||||||
|
docker version;
|
||||||
|
pip install --user -r requirements.txt;
|
||||||
|
make -j${N_MAKE_JOBS} crossbinary-parallel;
|
||||||
make image;
|
make image;
|
||||||
mkdocs build --clean;
|
mkdocs build --clean;
|
||||||
tar cfz dist/traefik-${VERSION}.src.tar.gz --exclude-vcs --exclude dist .;
|
tar cfz dist/traefik-${VERSION}.src.tar.gz --exclude-vcs --exclude dist .;
|
||||||
|
|
|
@ -39,6 +39,6 @@ bmysql:
|
||||||
MYSQL_ALLOW_EMPTY_PASSWORD: "yes"
|
MYSQL_ALLOW_EMPTY_PASSWORD: "yes"
|
||||||
log_driver: none
|
log_driver: none
|
||||||
brabbitmq:
|
brabbitmq:
|
||||||
image: rabbitmq:3
|
image: rabbitmq:3-alpine
|
||||||
environment:
|
environment:
|
||||||
RABBITMQ_NODE_IP_ADDRESS: "0.0.0.0"
|
RABBITMQ_NODE_IP_ADDRESS: "0.0.0.0"
|
||||||
|
|
|
@ -12,6 +12,6 @@ consul:
|
||||||
- "8302"
|
- "8302"
|
||||||
- "8302/udp"
|
- "8302/udp"
|
||||||
nginx:
|
nginx:
|
||||||
image: nginx
|
image: nginx:alpine
|
||||||
ports:
|
ports:
|
||||||
- "8881:80"
|
- "8881:80"
|
||||||
|
|
|
@ -12,6 +12,6 @@ consul:
|
||||||
- "8302"
|
- "8302"
|
||||||
- "8302/udp"
|
- "8302/udp"
|
||||||
nginx:
|
nginx:
|
||||||
image: nginx
|
image: nginx:alpine
|
||||||
ports:
|
ports:
|
||||||
- "8881:80"
|
- "8881:80"
|
||||||
|
|
|
@ -1,20 +1,20 @@
|
||||||
nginx1:
|
nginx1:
|
||||||
image: nginx
|
image: nginx:alpine
|
||||||
ports:
|
ports:
|
||||||
- "8881:80"
|
- "8881:80"
|
||||||
nginx2:
|
nginx2:
|
||||||
image: nginx
|
image: nginx:alpine
|
||||||
ports:
|
ports:
|
||||||
- "8882:80"
|
- "8882:80"
|
||||||
nginx3:
|
nginx3:
|
||||||
image: nginx
|
image: nginx:alpine
|
||||||
ports:
|
ports:
|
||||||
- "8883:80"
|
- "8883:80"
|
||||||
nginx4:
|
nginx4:
|
||||||
image: nginx
|
image: nginx:alpine
|
||||||
ports:
|
ports:
|
||||||
- "8884:80"
|
- "8884:80"
|
||||||
nginx5:
|
nginx5:
|
||||||
image: nginx
|
image: nginx:alpine
|
||||||
ports:
|
ports:
|
||||||
- "8885:80"
|
- "8885:80"
|
||||||
|
|
|
@ -7,7 +7,8 @@ RUN apt-get -yq update \
|
||||||
&& apt-get -yq --no-install-suggests --no-install-recommends --force-yes install apt-transport-https \
|
&& apt-get -yq --no-install-suggests --no-install-recommends --force-yes install apt-transport-https \
|
||||||
&& curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \
|
&& curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \
|
||||||
&& echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list \
|
&& echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list \
|
||||||
&& apt-get -yq update && apt-get -yq --no-install-suggests --no-install-recommends --force-yes install yarn
|
&& apt-get -yq update && apt-get -yq --no-install-suggests --no-install-recommends --force-yes install yarn \
|
||||||
|
&& rm -fr /var/lib/apt/lists/
|
||||||
|
|
||||||
COPY package.json $WEBUI_DIR/
|
COPY package.json $WEBUI_DIR/
|
||||||
COPY yarn.lock $WEBUI_DIR/
|
COPY yarn.lock $WEBUI_DIR/
|
||||||
|
|
Loading…
Add table
Reference in a new issue