46 lines
1.7 KiB
YAML
46 lines
1.7 KiB
YAML
language: minimal
|
|
os: linux
|
|
dist: focal
|
|
services:
|
|
- docker
|
|
env:
|
|
- PROGRAM=frontend IMAGE_NAME=bird-lg-go IMAGE_ARCH=i386
|
|
- PROGRAM=frontend IMAGE_NAME=bird-lg-go IMAGE_ARCH=amd64
|
|
- PROGRAM=frontend IMAGE_NAME=bird-lg-go IMAGE_ARCH=arm32v7
|
|
- PROGRAM=frontend IMAGE_NAME=bird-lg-go IMAGE_ARCH=arm64v8
|
|
- PROGRAM=frontend IMAGE_NAME=bird-lg-go IMAGE_ARCH=ppc64le
|
|
- PROGRAM=frontend IMAGE_NAME=bird-lg-go IMAGE_ARCH=s390x
|
|
- PROGRAM=proxy IMAGE_NAME=bird-lgproxy-go IMAGE_ARCH=i386
|
|
- PROGRAM=proxy IMAGE_NAME=bird-lgproxy-go IMAGE_ARCH=amd64
|
|
- PROGRAM=proxy IMAGE_NAME=bird-lgproxy-go IMAGE_ARCH=arm32v7
|
|
- PROGRAM=proxy IMAGE_NAME=bird-lgproxy-go IMAGE_ARCH=arm64v8
|
|
- PROGRAM=proxy IMAGE_NAME=bird-lgproxy-go IMAGE_ARCH=ppc64le
|
|
- PROGRAM=proxy IMAGE_NAME=bird-lgproxy-go IMAGE_ARCH=s390x
|
|
|
|
addons:
|
|
apt:
|
|
update: true
|
|
packages:
|
|
- qemu-user-static
|
|
- binfmt-support
|
|
|
|
install:
|
|
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
|
|
|
|
script:
|
|
- |
|
|
# Build image
|
|
docker build \
|
|
-t $DOCKER_USERNAME/$IMAGE_NAME:$IMAGE_ARCH \
|
|
-f $PROGRAM/Dockerfile.$IMAGE_ARCH \
|
|
$PROGRAM
|
|
|
|
# Tag image :{arch} and :{arch}-build{build number}
|
|
docker tag $DOCKER_USERNAME/$IMAGE_NAME:$IMAGE_ARCH $DOCKER_USERNAME/$IMAGE_NAME:$IMAGE_ARCH-build$TRAVIS_BUILD_NUMBER
|
|
if [ "$IMAGE_ARCH" = "amd64" ]; then
|
|
# Tag as latest for amd64 images
|
|
docker tag $DOCKER_USERNAME/$IMAGE_NAME:$IMAGE_ARCH $DOCKER_USERNAME/$IMAGE_NAME:latest
|
|
docker tag $DOCKER_USERNAME/$IMAGE_NAME:$IMAGE_ARCH $DOCKER_USERNAME/$IMAGE_NAME:build$TRAVIS_BUILD_NUMBER
|
|
fi
|
|
- docker push $DOCKER_USERNAME/$IMAGE_NAME
|