-
Notifications
You must be signed in to change notification settings - Fork 32
/
.travis.yml
36 lines (31 loc) · 1.01 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
before_install:
- curl -sf https://test.docker.com | sh
- docker --version
dist: bionic
language: bash
env:
global:
- DOCKER_CLI_EXPERIMENTAL=enabled
- PLATFORMS=linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64
matrix:
- VARIANT=alpine
- VARIANT=debian
stages:
- name: test
if: tag IS present OR branch = master
- name: push
if: tag IS present OR branch = master
script:
- echo "$DOCKER_PASSWORD" | docker login -u nunofgs --password-stdin
- docker run --privileged linuxkit/binfmt:v0.7
- docker buildx create --use
- docker buildx build
--platform $PLATFORMS
--build-arg "VERSION=$TRAVIS_BRANCH"
--file "$VARIANT/Dockerfile"
--tag nunofgs/octoprint:$TRAVIS_BRANCH-$VARIANT
`if [ -n "$TRAVIS_TAG" ]; then echo "--tag nunofgs/octoprint:$VARIANT"; fi`
`if [ -n "$TRAVIS_TAG" ] && [ "$VARIANT" = "debian" ]; then echo "--tag nunofgs/octoprint:latest"; fi`
`if [ "$VARIANT" = "debian" ]; then echo "--tag nunofgs/octoprint:$TRAVIS_BRANCH"; fi`
--push
.