Merge pull request #1637 from aledbf/jobs

Split travis jobs to avoid timeouts
This commit is contained in:
Manuel Alejandro de Brito Fontes 2017-11-01 20:08:45 -03:00 committed by GitHub
commit a4631804b6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 40 additions and 13 deletions

View file

@ -1,3 +1,5 @@
dist: trusty
sudo: required sudo: required
services: services:
@ -6,7 +8,9 @@ services:
language: go language: go
notifications: notifications:
email: true email:
on_failure: always
on_success: never
go: go:
- 1.9.2 - 1.9.2
@ -43,6 +47,20 @@ jobs:
- test/e2e/up.sh - test/e2e/up.sh
script: script:
- make e2e-test - make e2e-test
- stage: publish # split builds to avoid job timeouts
- stage: publish amd64
if: type = api AND branch = master AND repo = kubernetes/ingress-nginx
script: script:
- .travis/publish.sh - ARCH=amd64 .travis/publish.sh
- stage: publish arm
if: type = api AND branch = master AND repo = kubernetes/ingress-nginx
script:
- ARCH=arm .travis/publish.sh
- stage: publish arm64
if: type = api AND branch = master AND repo = kubernetes/ingress-nginx
script:
- ARCH=arm64 .travis/publish.sh
- stage: publish ppc64le
if: type = api AND branch = master AND repo = kubernetes/ingress-nginx
script:
- ARCH=ppc64le .travis/publish.sh

View file

@ -18,7 +18,13 @@ if ! [ -z $DEBUG ]; then
set -x set -x
fi fi
if [ -z $ARCH ]; then
echo "Environment variable ARCH is not defined. Aborting.";
exit 0;
fi
echo "COMPONENT: $COMPONENT" echo "COMPONENT: $COMPONENT"
echo "PLATFORM: $ARCH"
echo "TRAVIS_REPO_SLUG: $TRAVIS_REPO_SLUG" echo "TRAVIS_REPO_SLUG: $TRAVIS_REPO_SLUG"
echo "TRAVIS_PULL_REQUEST: $TRAVIS_PULL_REQUEST" echo "TRAVIS_PULL_REQUEST: $TRAVIS_PULL_REQUEST"
echo "TRAVIS_EVENT_TYPE: $TRAVIS_EVENT_TYPE" echo "TRAVIS_EVENT_TYPE: $TRAVIS_EVENT_TYPE"
@ -75,7 +81,7 @@ fi
function docker_tag_exists() { function docker_tag_exists() {
TAG=${2//\"/} TAG=${2//\"/}
IMAGES=$(curl -s -H "Authorization: Bearer ${QUAY_PASSWORD}" https://quay.io/api/v1/repository/$1/image/ | jq '.images | sort_by(.sort_index) | .[] .tags | select(.[] !=null) | .[0]' | sed s/\"//g) IMAGES=$(curl -s -H "Authorization: Bearer ${QUAY_PASSWORD}" https://quay.io/api/v1/repository/$1-$3/image/ | jq '.images | sort_by(.sort_index) | .[] .tags | select(.[] !=null) | .[0]' | sed s/\"//g)
if echo "$IMAGES" | grep -q "$TAG" ; then if echo "$IMAGES" | grep -q "$TAG" ; then
return 0 return 0
fi fi

View file

@ -20,10 +20,11 @@ source $DIR/common.sh
IMAGE=$(make -s -C $DIR/../ image-info) IMAGE=$(make -s -C $DIR/../ image-info)
if docker_tag_exists "kubernetes-ingress-controller/nginx-ingress-controller" $(echo $IMAGE | jq .tag); then if docker_tag_exists "kubernetes-ingress-controller/nginx-ingress-controller" $(echo $IMAGE | jq .tag) "$ARCH"; then
echo "Image already published" echo "Image already published"
exit 0 exit 0
fi fi
echo "building kubernetes-ingress-controller/nginx-ingress-controller image..." echo "building nginx-ingress-controller-$ARCH image..."
make -C $DIR/../ release make -C $DIR/../ sub-container-$ARCH
make -C $DIR/../ sub-push-$ARCH

View file

@ -20,10 +20,11 @@ source $DIR/common.sh
IMAGE=$(make -s -C $DIR/../images/nginx-slim image-info) IMAGE=$(make -s -C $DIR/../images/nginx-slim image-info)
if docker_tag_exists "kubernetes-ingress-controller/nginx-slim" $(echo $IMAGE | jq .tag); then if docker_tag_exists "kubernetes-ingress-controller/nginx-slim" $(echo $IMAGE | jq .tag) "$ARCH"; then
echo "Image already published" echo "Image already published"
exit 0 exit 0
fi fi
echo "building nginx-slim image..." echo "building nginx-slim-$ARCH image..."
make -C $DIR/../images/nginx-slim release make -C $DIR/../images/nginx-slim sub-container-$ARCH
make -C $DIR/../images/nginx-slim sub-push-$ARCH

View file

@ -20,10 +20,11 @@ source $DIR/common.sh
IMAGE=$(make -s -C $DIR/../images/ubuntu-slim image-info) IMAGE=$(make -s -C $DIR/../images/ubuntu-slim image-info)
if docker_tag_exists "kubernetes-ingress-controller/ubuntu-slim" $(echo $IMAGE | jq .tag); then if docker_tag_exists "kubernetes-ingress-controller/ubuntu-slim" $(echo $IMAGE | jq .tag) "$ARCH"; then
echo "Image already published" echo "Image already published"
exit 0 exit 0
fi fi
echo "building ubuntu-slim image..." echo "building ubuntu-slim-$ARCH image..."
make -C $DIR/../images/ubuntu-slim release make -C $DIR/../images/ubuntu-slim sub-container-$ARCH
make -C $DIR/../images/ubuntu-slim sub-push-$ARCH