forked from madslundt/docker-cloud-media-scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
40 lines (34 loc) · 1.24 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
sudo: required
services:
- docker
language: bash
script:
# Build image
- docker build -t yaoa/cloud-media-scripts:dev -f ./Dockerfile .
before_deploy:
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
deploy:
- provider: script
script: docker tag yaoa/cloud-media-scripts:dev yaoa/cloud-media-scripts:latest && docker push yaoa/cloud-media-scripts:latest
on:
branch: master
condition: $TRAVIS_PULL_REQUEST = false
- provider: script
script: docker tag yaoa/cloud-media-scripts:dev yaoa/cloud-media-scripts:$TRAVIS_COMMIT && docker push yaoa/cloud-media-scripts:$TRAVIS_COMMIT
on:
all_branches: true
condition: $TRAVIS_PULL_REQUEST = false
- provider: script
script: docker tag yaoa/cloud-media-scripts:dev yaoa/cloud-media-scripts:$TRAVIS_BRANCH && docker push yaoa/cloud-media-scripts:$TRAVIS_BRANCH
on:
all_branches: true
condition: $TRAVIS_PULL_REQUEST = false
- provider: script
script: docker tag yaoa/cloud-media-scripts:dev yaoa/cloud-media-scripts:$TRAVIS_TAG && docker push yaoa/cloud-media-scripts:$TRAVIS_TAG
on:
tags: true
condition: $TRAVIS_PULL_REQUEST = false
notifications:
email:
on_success: always
on_failure: always