-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
28 lines (28 loc) · 951 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
sudo: required
conditions: v1
language: rust
cache: cargo
services:
- docker
before_script:
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
jobs:
include:
# deploy only if on one of the main branches
# - master is the latest public/live/production version
# - staging is the next stable public/live/production version
# - develop is the rolling development release version
- stage: deploy-branch
name: deploy-branch
if: branch IN (master, staging, develop)
script:
- docker build -t temp .
- docker tag temp "southclaws/tw-timerunner:$TRAVIS_BRANCH"
- docker push "southclaws/tw-timerunner:$TRAVIS_BRANCH"
- stage: deploy-tag
name: deploy-tag
if: tag IS present
script:
- docker build -t temp .
- docker tag temp "southclaws/tw-timerunner:$TRAVIS_TAG"
- docker push "southclaws/tw-timerunner:$TRAVIS_TAG"