-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
51 lines (43 loc) · 1.92 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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
dist: xenial
language: generic
sudo: required
services:
- docker
env:
global:
- QEMUVER=3.1.0-3
before_script:
- 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 -o Dpkg::Options::="--force-confnew" install docker-ce
- docker -v
- docker pull arm32v7/alpine:edge
# - docker run --rm --privileged multiarch/qemu-user-static:register --reset
# - docker ps -a
- sudo docker run --privileged linuxkit/binfmt:v0.6
- sudo docker run -d --privileged -p 1234:1234 --name buildkit moby/buildkit:latest --addr tcp://0.0.0.0:1234 --oci-worker-platform linux/amd64 --oci-worker-platform linux/armhf
- sudo docker cp buildkit:/usr/bin/buildctl /usr/bin/
- export BUILDKIT_HOST=tcp://0.0.0.0:1234
script:
# get qemu-arm-static binary
# - >
# mkdir tmp &&
# pushd tmp > /dev/null &&
# curl -L -o qemu-arm-static.tar.gz https://github.com/multiarch/qemu-user-static/releases/download/v${QEMUVER}/qemu-arm-static.tar.gz &&
# tar xzf qemu-arm-static.tar.gz &&
# pwd && ls -alh &&
# popd > /dev/null &&
# pwd && ls -alh
# --output type=docker,name="rpix"
- buildctl build --frontend dockerfile.v0 --opt platform=linux/armhf --opt filename=./Dockerfile --output type=image,push=false --local dockerfile=. --local context=. --progress=plain
# - DOCKER_BUILDKIT=1 docker build --progress=plain -t rpix .
# - docker build -t rpix .
after_success:
# - docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS
# - export REPO=
# - export TAG=`if [ "$TRAVIS_BRANCH" == "master" ]; then echo "latest"; else echo $TRAVIS_BRANCH ; fi`
# - docker build -f Dockerfile -t $REPO:$COMMIT .
# - docker tag $REPO:$COMMIT $REPO:$TAG
# - docker tag $REPO:$COMMIT $REPO:travis-$TRAVIS_BUILD_NUMBER
# - docker push $REPO