-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.travis.yml
More file actions
28 lines (26 loc) · 1.02 KB
/
.travis.yml
File metadata and controls
28 lines (26 loc) · 1.02 KB
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: go
go: 1.x
env:
global:
- CXX=g++-4.8
- QEMU_VER=v2.9.1
- DOCKER_REPO=maartje/wwg-welcome
matrix:
- ARCH=amd64 GO_ARCH=amd64 QEMU_ARCH=x86_64
- ARCH=armhf GO_ARCH=arm QEMU_ARCH=arm
- ARCH=arm64 GO_ARCH=arm64 QEMU_ARCH=aarch64
before_install:
- curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
- sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
- sudo apt-get update
- sudo apt-get -y install docker-ce
before_script:
- sudo apt-get -y install qemu-user-static
- docker run --rm --privileged multiarch/qemu-user-static:register
script:
- docker build -t $DOCKER_REPO:$ARCH-latest --build-arg GO_ARCH="$GO_ARCH" ./
after_success:
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
- if [ "$TRAVIS_BRANCH" == "master" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then docker push $DOCKER_REPO:$ARCH-latest ; fi