-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
28 lines (28 loc) · 1.14 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
sudo: required
services:
- docker
language: bash
script:
# prepare qemu
- docker run --rm --privileged multiarch/qemu-user-static:register --reset
# get qemu-arm-static binary
- mkdir tmp
- >
pushd tmp &&
curl -L -o qemu-arm-static.tar.gz https://github.com/multiarch/qemu-user-static/releases/download/v2.6.0/qemu-arm-static.tar.gz &&
tar xzf qemu-arm-static.tar.gz &&
popd
# build image
- docker build -t offtechnologies/docker-arm32v6-base-image-alpine-qemu:build .
# test image
- docker run offtechnologies/docker-arm32v6-base-image-alpine-qemu:build uname -a
# push image
- >
if [ "$TRAVIS_BRANCH" == "master" ]; then
docker login -u="$DOCKER_USER" -p="$DOCKER_PASS"
TAG=$(grep "FROM " Dockerfile | sed 's/.*://')
docker tag offtechnologies/docker-arm32v6-base-image-alpine-qemu:build offtechnologies/docker-arm32v6-base-image-alpine-qemu:$TAG
docker tag offtechnologies/docker-arm32v6-base-image-alpine-qemu:build offtechnologies/docker-arm32v6-base-image-alpine-qemu:latest
docker push offtechnologies/docker-arm32v6-base-image-alpine-qemu:$TAG
docker push offtechnologies/docker-arm32v6-base-image-alpine-qemu:latest
fi