forked from carlmartus/signalbroker-server
-
Notifications
You must be signed in to change notification settings - Fork 5
/
.travis.yml
33 lines (27 loc) · 1.14 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
arch:
- arm64
# - arm32 https://travis-ci.community/t/erlang-otp-21-1-4-is-missing-but-only-for-arm-64/6438/3
- amd64
language: elixir
elixir:
- 1.8.1
otp_release:
- 22.0.5
services:
- docker
before_install:
- mix local.hex --force
- mix local.rebar --force
- mix deps.get
- mix test --exclude ignore --exclude socketcan
- mix clean
- docker build -t signalbroker-server:latest -f ./docker/Dockerfile .
# - echo "testing inside docker container..."
# - docker run -d -p 127.0.0.1:80:4567 carlad/sinatra /bin/sh -c "cd /root/sinatra; bundle exec foreman start;"
# - docker ps -a
# - docker run carlad/sinatra /bin/sh -c "cd /root/sinatra; bundle exec rake test"
script:
- if [[ "$TRAVIS_BRANCH" == "master" && "$TRAVIS_EVENT_TYPE" == "push" ]]; then echo -e "Upload Container to DockerHub"; else travis_terminate 0; fi
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
- docker tag signalbroker-server:latest "$DOCKER_USERNAME"/signalbroker-server:travis-$TRAVIS_BUILD_NUMBER-$TRAVIS_CPU_ARCH
- docker push "$DOCKER_USERNAME"/signalbroker-server:travis-$TRAVIS_BUILD_NUMBER-$TRAVIS_CPU_ARCH