-
Notifications
You must be signed in to change notification settings - Fork 42
/
.travis.yml
48 lines (43 loc) · 1.52 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
dist: focal
language: go
go:
- 1.x
jobs:
include:
- stage: test
services: docker
env:
- MINIO_ENDPOINT_URL=http://127.0.0.1:19000
- CLICKHOUSE_DSN='tcp://127.0.0.1:29000'
- GCS_EMULATOR_ENDPOINT_URL=http://127.0.0.1:4443
install:
- docker-compose up -d --renew-anon-volumes --remove-orphans minio clickhouse fake-gcs-server
script: make test TESTFLAGS=-v
- stage: code check
if: type = pull_request
install: make bootstrap
script: make staticcheck
- stage: deploy docker
if: type != pull_request
services: docker
env:
- GITSHA=$TRAVIS_COMMIT
- PLATFORMS="linux/amd64,linux/arm64,linux/arm/v7"
install:
- docker container run --rm --privileged multiarch/qemu-user-static --reset -p yes
- docker container run -d --rm --name buildkitd --privileged moby/buildkit:latest
- sudo docker container cp buildkitd:/usr/bin/buildctl /usr/local/bin/
- export BUILDKIT_HOST="docker-container://buildkitd"
script:
- export VERSION=git-$(echo $GITSHA | cut -c 1-7)
before_deploy:
- echo "$DOCKER_PASSWORD" | docker login --username "$DOCKER_USERNAME" --password-stdin
deploy:
- provider: script
script: bash ./scripts/ci_build_image.sh --push $TRAVIS_REPO_SLUG $VERSION latest
on:
repo: profefe/profefe
branch: master
after_failure:
- buildctl debug workers ls
- docker container logs buildkitd