forked from UniversityOfHelsinkiCS/oodikone
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
20 lines (18 loc) · 894 Bytes
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
sudo: required
cache:
npm: true
directories:
- node_modules
- ~/.cache
services:
- docker
jobs:
include:
- stage: build & deploy
script:
- "if [[ $TRAVIS_BRANCH =~ (^master) ]]; then docker build --build-arg BASE_PATH=/staging/ -t toska/oodikone2-frontend:staging . ; else :;fi"
- "if [[ $TRAVIS_BRANCH =~ (^master) ]]; then docker login -u $DOCKER_USER -p $DOCKER_PASS ; else :;fi"
- "if [[ $TRAVIS_BRANCH =~ (^master) ]]; then docker push toska/oodikone2-frontend:staging ; else :;fi"
- "if [[ $TRAVIS_TAG =~ ([0-1].+) ]]; then docker build --build-arg BASE_PATH=/ -t toska/oodikone2-frontend:latest . ; else :;fi"
- "if [[ $TRAVIS_TAG =~ ([0-1].+) ]]; then docker login -u $DOCKER_USER -p $DOCKER_PASS ; else :;fi"
- "if [[ $TRAVIS_TAG =~ ([0-1].+) ]]; then docker push toska/oodikone2-frontend:latest ; else :;fi"