forked from richrarobi/periBlink
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
37 lines (31 loc) · 1.17 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
sudo: true
language: go
go:
- "1.15.x"
service:
- docker
env:
- GO111MODULE=on
install: true
jobs:
include:
- stage: build docker image
script:
- export DHUBREPO=$DOCKER_NAMESPACE/kubesim_blinkt-arm32v7
- export VERSION=0.1.0
- GOOS=linux GOARM=7 GOARCH=arm CGO_ENABLED=0 go build -o build/_output/arm32v7/blinkt5 -tags=v1 -installsuffix cgo ./cmd/...
- docker run --rm --privileged multiarch/qemu-user-static:register --reset
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
- docker build -t $DHUBREPO:$VERSION -f build/Dockerfile.arm32v7 .
- docker images
- docker tag $DHUBREPO:$VERSION $DHUBREPO:latest
- docker tag $DHUBREPO:$VERSION $DHUBREPO:travis-$TRAVIS_BUILD_NUMBER
- docker push $DHUBREPO
- stage: test
script:
- export DHUBREPO=$DOCKER_NAMESPACE/kubesim_blinkt-arm32v7
- export VERSION=0.1.0
- docker run --rm --privileged multiarch/qemu-user-static:register --reset
- docker run -d -p 127.0.0.1:8080:80 --name hello $DHUBREPO:$VERSION
- docker ps | grep -q hello
# - curl -vsf 'http://127.0.0.1:8080/index.html' &> /dev/stdout