postal/.circleci/config.yml
2018-07-29 16:18:39 -04:00

76 lines
1.8 KiB
YAML

version: 2
jobs:
build-alpine:
machine: true
working_directory: ~/repo/alpine
steps:
- checkout:
path: ~/repo
- run:
name: Build Postal Docker Container
command: docker build -t catdeployed/postal:latest -t catdeployed/postal:alpine .
build-ubuntu:
machine: true
working_directory: ~/repo/ubuntu
steps:
- checkout:
path: ~/repo
- run:
name: Build Postal Docker Container
command: docker build -t catdeployed/postal:ubuntu .
deploy:
machine: true
working_directory: ~/repo/ubuntu
steps:
- run:
name: Login to Docker Hub
command: docker login -u $DOCKER_USER -p $DOCKER_PASS
- run:
name: Push to Docker Hub
command: docker push catdeployed/postal:ubuntu
- run:
name: Push to Docker Hub
command: docker push catdeployed/postal:alpine
- run:
name: Login to Docker Hub
command: docker push catdeployed/postal:ubuntu
workflows:
version: 2
nightly:
triggers:
- schedule:
cron: "0 * * * *"
filters:
branches:
only:
- master
- dev
jobs:
- build-alpine
- build-ubuntu
- deploy:
requires:
- build-alpine
- build-ubuntu
filters:
branches:
only:
- master
- dev
commit:
jobs:
- build-alpine
- build-ubuntu
- deploy:
requires:
- build-alpine
- build-ubuntu
filters:
branches:
only:
- master
- dev
notify:
webhooks:
- url: https://hooks.microbadger.com/images/catdeployed/postal/K0vCLtQnFFKukT-LuAEBmGD0cHs=