This repository has been archived by the owner on Jun 14, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 57
/
.travis.yml
32 lines (32 loc) · 1.28 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
sudo: required
services:
- docker
language: bash
script:
- |
echo "Updating Docker to have docker manifest command"
curl https://get.docker.com | sh
echo "Enabling docker client experimental features"
mkdir -p ~/.docker
echo '{ "experimental": "enabled" }' > ~/.docker/config.json
docker version
# prepare qemu
- docker run --rm --privileged multiarch/qemu-user-static:register --reset
# build image
- docker build --build-arg distro=wheezy -t rpi-mysql .
# test image
- docker run rpi-mysql mysql --version
# push image
- >
if [ "$TRAVIS_BRANCH" == "master" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
docker login -u="$DOCKER_USER" -p="$DOCKER_PASS"
TAG=$(grep "ENV MYSQL_VERSION" Dockerfile | awk 'NF>1{print $NF}')
docker tag rpi-mysql hypriot/rpi-mysql:arm-$TAG
docker push hypriot/rpi-mysql:arm-$TAG
docker manifest create hypriot/rpi-mysql:$TAG hypriot/rpi-mysql:arm-$TAG
docker manifest annotate hypriot/rpi-mysql:$TAG hypriot/rpi-mysql:arm-$TAG --os linux --arch arm --variant v6
docker manifest push hypriot/rpi-mysql:$TAG
docker manifest create hypriot/rpi-mysql hypriot/rpi-mysql:arm-$TAG
docker manifest annotate hypriot/rpi-mysql hypriot/rpi-mysql:arm-$TAG --os linux --arch arm --variant v6
docker manifest push hypriot/rpi-mysql
fi