This repository has been archived by the owner on Oct 30, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
66 lines (59 loc) · 2.46 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
sudo: required
language: node
services:
- docker
branches:
only:
- master
- develop
- staging
- QA
jobs:
include:
- stage: metalsmith-jobqueue
script:
- 'if [ ${TRAVIS_BRANCH} = "master" ]; then
docker login -u="$DOCKER_USERNAME_FLOWZ" -p="$DOCKER_PASSWORD_FLOWZ";
docker build -t metalsmith_jobqueue_flowz:latest .;
docker images;
docker tag metalsmith_jobqueue_flowz:latest $DOCKER_USERNAME_FLOWZ/metalsmith_jobqueue_flowz:latest;
docker push $DOCKER_USERNAME_FLOWZ/metalsmith_jobqueue_flowz:latest;
elif [ ${TRAVIS_BRANCH} = "develop" ]; then
docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD";
docker build -t metalsmith_jobqueue_flowz:dev .;
docker images;
docker tag metalsmith_jobqueue_flowz:dev $DOCKER_USERNAME/metalsmith_jobqueue_flowz:dev;
docker push $DOCKER_USERNAME/metalsmith_jobqueue_flowz:dev;
elif [ ${TRAVIS_BRANCH} = "staging" ]; then
docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD";
docker build -t metalsmith_jobqueue_flowz:$TRAVIS_BRANCH-$TRAVIS_BUILD_NUMBER .;
docker tag metalsmith_jobqueue_flowz:$TRAVIS_BRANCH-$TRAVIS_BUILD_NUMBER $DOCKER_USERNAME/metalsmith_jobqueue_flowz:$TRAVIS_BRANCH-$TRAVIS_BUILD_NUMBER;
docker tag metalsmith_jobqueue_flowz:$TRAVIS_BRANCH-$TRAVIS_BUILD_NUMBER $DOCKER_USERNAME/metalsmith_jobqueue_flowz:staging;
docker images;
docker push $DOCKER_USERNAME/metalsmith_jobqueue_flowz:$TRAVIS_BRANCH-$TRAVIS_BUILD_NUMBER;
docker push $DOCKER_USERNAME/metalsmith_jobqueue_flowz:staging;
else
docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD";
docker build -t metalsmith_jobqueue_flowz:qa .;
docker images;
docker tag metalsmith_jobqueue_flowz:qa $DOCKER_USERNAME/metalsmith_jobqueue_flowz:qa;
docker push $DOCKER_USERNAME/metalsmith_jobqueue_flowz:qa;
fi'
- stage: Upgrade Rancher Service
script:
- bash ./upgrade.sh
- stage: Finish Rancher Service
script:
- bash ./finish.sh
notifications:
email:
recipients:
- arpitap@officebeacon.com
- kaushalm@officebrain.com
- anuj@officebrain.com
- naveeng@officebrain.com
- chirag@officebrain.com
- fsaiyed@officebrain.com
- gkumar@officebrain.com
on_success: always
on_failure: always