forked from elixir-cloud-aai/proTES
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
30 lines (26 loc) · 959 Bytes
/
.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
sudo: required
dist: xenial
service:
- docker
stages:
- if: branch = master
name: master build
- if: branch = dev
name: dev build
- name: branch build
jobs:
include:
- stage: master build
script:
- version=0.1
- docker build -t weselixir/proTES:"$version" -t weselixir/proTES:master .
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
- if [ "$TRAVIS_PULL_REQUEST" = false ]; then docker push "$DOCKER_REPO_NAME":"$version"; fi
- stage: dev build
script:
- docker build -t weselixir/proTES:dev -t weselixir/proTES:build-"$TRAVIS_BUILD_NUMBER" .
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
- if [ "$TRAVIS_PULL_REQUEST" = false ]; then docker push "$DOCKER_REPO_NAME":build-"$TRAVIS_BUILD_NUMBER"; fi
- stage: branch build
script:
- docker build -t weselixir/proTES-branched:build-"$TRAVIS_BUILD_NUMBER" .