forked from Unee-T-INS/bugzilla-customisation
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
62 lines (57 loc) · 1.6 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
sudo: required
language: generic
services:
- docker
env:
global:
- IMAGE_TAG=${TRAVIS_COMMIT::7}
- IMAGE_REPO_NAME=uneet/bugzilla-customisation
before_install:
- pip install --user awscli
- export PATH=$PATH:$HOME/.local/bin
- curl -o $HOME/.local/bin/ecs-cli
https://s3.amazonaws.com/amazon-ecs-cli/ecs-cli-linux-amd64-latest &&
chmod +x $HOME/.local/bin/ecs-cli
install:
- docker build -t $IMAGE_REPO_NAME .
after_success:
- docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD";
- docker build -t $IMAGE_REPO_NAME:latest .
- docker tag $IMAGE_REPO_NAME:latest $IMAGE_REPO_NAME:$IMAGE_TAG
- docker push $IMAGE_REPO_NAME:latest
- docker push $IMAGE_REPO_NAME:$IMAGE_TAG
matrix:
include:
- env: DEPLOY=dev
if: branch = master
deploy:
provider: script
skip_cleanup: true
script:
- AWS_ACCESS_KEY_ID=$AWS_812644853088_ID
AWS_SECRET_ACCESS_KEY=$AWS_812644853088_SECRET
./deploy.sh
on:
branch: master
- env: DEPLOY=demo
if: tag IS present
deploy:
provider: script
skip_cleanup: true
script:
- AWS_ACCESS_KEY_ID=$AWS_915001051872_ID
AWS_SECRET_ACCESS_KEY=$AWS_915001051872_SECRET
./deploy.sh -d
on:
tags: true
- env: DEPLOY=prod
if: tag IS present
deploy:
provider: script
skip_cleanup: true
script:
- AWS_ACCESS_KEY_ID=$AWS_192458993663_ID
AWS_SECRET_ACCESS_KEY=$AWS_192458993663_SECRET
./deploy.sh -p
on:
tags: true