-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
47 lines (37 loc) · 1.26 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
sudo: required
language: dart
dart:
# Install the latest stable release
- stable
env:
global:
- CURRENT=$(pwd)
- DOCKER_REPOSITORY=rushioconsulting/coverage_service
- GITHUB_REPOSITORY=github.com/rushio-consulting/coverage_service.git
# build version - also used to tag github repo and docker hub image
- VERSION=0.1.0-dev #FIXME : how to manage version with the one in pubspec.yaml
services:
- docker
before_install:
# Check current docker engine version
- docker --version
# set env vars in the build settings to interact with repositories
# see https://docs.travis-ci.com/user/environment-variables/#Defining-Variables-in-Repository-Settings
- echo "Testing Docker Hub credentials"
- docker login -u=$DOCKER_USERNAME -p=$DOCKER_PASSWORD
install:
- docker pull ${DOCKER_REPOSITORY}:latest || true
- docker build -t ${DOCKER_REPOSITORY} --pull=true --build-arg version=${VERSION} .
- docker build -t ${DOCKER_REPOSITORY}:${VERSION} --build-arg version=${VERSION} .
before_deploy:
# CREATE CODECOV
- /bin/bash ./ci/codecov.sh
# CREATE GIT TAG
- /bin/bash ./ci/github.sh
deploy:
# Deploy to docker hub
provider: script
script: /bin/bash ./ci/dockerhub.sh
skip_cleanup: true
on:
branch: master