-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
37 lines (33 loc) · 1.1 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: required
dist: trusty
# https://github.com/travis-ci/docs-travis-ci-com/issues/910#issuecomment-356915625
language: minimal
branches:
only:
- master
- /^v\d+\.\d+(\.\d+)?(-\S*)?$/
jobs:
include:
- stage: build
script:
- docker build -t dynalite .
- docker images
- stage: deploy master
if: branch = master AND type IN (push)
script:
- docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD"
- docker build -t dynalite .
- docker tag dynalite vitarn/dynalite:next
- docker push vitarn/dynalite:next
- stage: deploy tag
if: tag IS present
script:
- docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD"
- docker build -t dynalite .
- docker tag dynalite vitarn/dynalite
- docker push vitarn/dynalite
# parameter expansion https://stackoverflow.com/questions/19482123/extract-part-of-a-string-using-bash-cut-split/19482947#19482947
- docker tag dynalite vitarn/dynalite:${TRAVIS_TAG#v}
- docker push vitarn/dynalite:${TRAVIS_TAG#v}
notifications:
email: false