Skip to content
Permalink
master
Switch branches/tags
Go to file
 
 
Cannot retrieve contributors at this time
62 lines (57 sloc) 1.6 KB
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