forked from aacebedo/dnsdock
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
47 lines (42 loc) · 1.64 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
sudo: required
language: c
services:
- docker
before_install:
- sudo apt-get update
- sudo apt-get install -qy docker-engine
- wget https://github.com/grammarly/rocker/releases/download/1.3.0/rocker_linux_amd64.tar.gz -O /tmp/rocker.tar.gz
- sudo tar -xvzf /tmp/rocker.tar.gz -C /usr/local/bin && sudo chmod +x /usr/local/bin/rocker
- sudo mkdir -m 777 -p /build/amd64 /build/arm
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
skip_cleanup: true
api-key:
secure: $GITHUB_TOKEN
file: /build/dnsdock.amd64
on:
tags: true
- provider: releases
skip_cleanup: true
api-key:
secure: $GITHUB_TOKEN
file: /build/dnsdock.arm
on:
tags: true
- provider: script
script: rocker build --auth $DOCKER_USER:$DOCKER_PASSWORD --push -var GIT_COMMIT=${TRAVIS_COMMIT} ${VERSIONARGS} -var ARCH=amd64 .
on:
tags: true
- provider: script
script: rocker build --auth $DOCKER_USER:$DOCKER_PASSWORD --push -var GIT_COMMIT=${TRAVIS_COMMIT} ${VERSIONARGS} -var ARCH=arm .
on:
tags: true