This repository was archived by the owner on May 2, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy path.travis.yml
More file actions
38 lines (33 loc) · 1.35 KB
/
.travis.yml
File metadata and controls
38 lines (33 loc) · 1.35 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
29
30
31
32
33
34
35
36
37
38
language: minimal
env:
global:
- REPO_NAME=virb3/devpost-api
- DOCKER_CLI_EXPERIMENTAL=enabled
stages:
- name: test
- name: deploy
if: type != cron AND tag
before_script:
- set -e
jobs:
include:
- stage: test
script:
- docker build --target test -t $REPO_NAME:test .
- docker run $REPO_NAME:test
- stage: deploy
before_script:
# need Docker > 19.03 for buildx
- 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
script:
# https://community.arm.com/developer/tools-software/tools/b/tools-software-ides-blog/posts/getting-started-with-docker-for-arm-on-linux
- docker run --rm --privileged docker/binfmt:820fdd95a9972a5308930a2bdfb8573dd4447ad3
- docker buildx create --name mybuilder
- docker buildx use mybuilder
- docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD
- docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6 --push -t $REPO_NAME:$TRAVIS_TAG .
# tag as latest
- docker buildx imagetools create $REPO_NAME:$TRAVIS_TAG -t $REPO_NAME