aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/.travis.yml
blob: 61555a5cb85de70dadd967a0a543be575eefd21a (plain) (blame)
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
# I used this guide to set up multiarch builds:
# https://mirailabs.io/blog/multiarch-docker-with-buildx/
# I don't understand it completely at the moment, but whatever.

# TODO: Docker Hub automated builds instead of Travis?
# TODO: docker-compose instead of docker buildx?

language: minimal
os: linux
dist: bionic

services:
  - docker

addons:
  apt:
    update: true
    # Newer docker for buildx support:
    sources:
      - key_url: 'https://download.docker.com/linux/ubuntu/gpg'
        sourceline: 'deb https://download.docker.com/linux/ubuntu "$(lsb_release -cs)" stable'
    packages:
      - docker-ce

env:
  # Enable experimental buildx support
  DOCKER_CLI_EXPERIMENTAL: enabled
  platforms: linux/i386,linux/amd64,linux/armhf

script:
  - docker run --rm --privileged docker/binfmt:66f9012c56a8316f9244ffd7622d7c21c1f6f28d
  - docker buildx create --use
  - docker buildx build --platform "$platforms" dump1090/
  - docker buildx build --platform "$platforms" fr24feed/
  - |-
    if [ "$TRAVIS_BRANCH" = master ]; then
    echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
    docker buildx build --platform "$platforms" -t "$DOCKER_USERNAME/dump1090" --push dump1090/
    docker buildx build --platform "$platforms" -t "$DOCKER_USERNAME/fr24feed" --push fr24feed/
    fi