Skip to content

Commit

Permalink
Fixed travis build
Browse files Browse the repository at this point in the history
  • Loading branch information
aacebedo committed Sep 4, 2016
1 parent e2dc742 commit 0e7df50
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
16 changes: 8 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
sudo: required
language: go
go: 1.6
language: generic

services:
- docker

Expand All @@ -15,8 +15,12 @@ script:
- if git describe --contains ${TRAVIS_COMMIT} &>/dev/null; then export VERSIONARGS="-var DOCKERIMAGE_VERSION=`git describe --contains ${TRAVIS_COMMIT}`"; else unset VERSIONARGS; fi
- rocker build --no-cache ${VERSIONARGS} -var GIT_COMMIT=${TRAVIS_COMMIT} -var OUTPUT_DIR=/build/amd64 -var ARCH=amd64 .
- rocker build --no-cache ${VERSIONARGS} -var GIT_COMMIT=${TRAVIS_COMMIT} -var OUTPUT_DIR=/build/arm -var ARCH=arm .

after_success:
- sudo mv /build/amd64/dnsdock /build/dnsdock.amd64
- sudo mv /build/arm/dnsdock /build/dnsdock.arm
- sudo chmod -R a+rw /build
- sudo chmod a+rx ./deploy_containers.sh

deploy:
- provider: releases
Expand All @@ -34,10 +38,6 @@ deploy:
on:
tags: true
- provider: script
script: rocker build --auth $DOCKER_USER:$DOCKER_PASSWORD --push rocker build -var Arch=arm -var ${VERSIONARGS} .
on:
tags: true
- provider: script
script: rocker build --auth $DOCKER_USER:$DOCKER_PASSWORD --push rocker build -var Arch=amd64 -var ${VERSIONARGS} .
script: ./deploy_containers.sh
on:
tags: true
tags: true
4 changes: 4 additions & 0 deletions deploy_containers.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env bash
rocker build --auth $DOCKER_USER:$DOCKER_PASSWORD --push -var GIT_COMMIT=${TRAVIS_COMMIT} -var ARCH=amd64 -var ${VERSIONARGS} .
rocker build --auth $DOCKER_USER:$DOCKER_PASSWORD --push -var GIT_COMMIT=${TRAVIS_COMMIT} -var ARCH=arm ${VERSIONARGS} .

0 comments on commit 0e7df50

Please sign in to comment.