2018-05-27 01:42:52 +02:00
|
|
|
version: 2
|
|
|
|
jobs:
|
2018-07-24 00:22:42 +02:00
|
|
|
build-alpine:
|
2018-05-27 02:03:02 +02:00
|
|
|
machine: true
|
2018-07-24 00:22:42 +02:00
|
|
|
working_directory: ~/repo/alpine
|
2018-05-27 02:03:02 +02:00
|
|
|
steps:
|
2018-07-24 00:22:42 +02:00
|
|
|
- checkout:
|
|
|
|
path: ~/repo
|
2018-05-27 02:03:02 +02:00
|
|
|
- run:
|
2018-05-27 02:06:08 +02:00
|
|
|
name: Build Postal Docker Container
|
2018-07-24 00:24:09 +02:00
|
|
|
command: docker build -t catdeployed/postal:latest -t catdeployed/postal:alpine .
|
2018-07-24 00:30:08 +02:00
|
|
|
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 .
|
2018-07-29 22:04:06 +02:00
|
|
|
deploy:
|
|
|
|
machine: true
|
|
|
|
working_directory: ~/repo/ubuntu
|
|
|
|
steps:
|
2018-07-24 00:30:08 +02:00
|
|
|
- run:
|
|
|
|
name: Login to Docker Hub
|
|
|
|
command: docker login -u $DOCKER_USER -p $DOCKER_PASS
|
|
|
|
- run:
|
|
|
|
name: Push to Docker Hub
|
2018-07-24 00:33:14 +02:00
|
|
|
command: docker push catdeployed/postal:ubuntu
|
2018-07-29 22:04:06 +02:00
|
|
|
- run:
|
|
|
|
name: Push to Docker Hub
|
|
|
|
command: docker push catdeployed/postal:alpine
|
|
|
|
- run:
|
|
|
|
name: Login to Docker Hub
|
|
|
|
command: docker push catdeployed/postal:ubuntu
|
2018-05-27 01:42:52 +02:00
|
|
|
workflows:
|
|
|
|
version: 2
|
|
|
|
nightly:
|
|
|
|
triggers:
|
|
|
|
- schedule:
|
|
|
|
cron: "0 * * * *"
|
|
|
|
filters:
|
|
|
|
branches:
|
|
|
|
only:
|
|
|
|
- master
|
2018-07-29 22:04:06 +02:00
|
|
|
- dev
|
2018-05-27 01:42:52 +02:00
|
|
|
jobs:
|
2018-07-24 00:22:42 +02:00
|
|
|
- build-alpine
|
2018-07-24 00:30:08 +02:00
|
|
|
- build-ubuntu
|
2018-07-29 22:04:06 +02:00
|
|
|
- deploy:
|
|
|
|
requires:
|
|
|
|
- build-alpine
|
|
|
|
- build-ubuntu
|
|
|
|
filters:
|
|
|
|
branches:
|
|
|
|
only:
|
|
|
|
- master
|
|
|
|
- dev
|
2018-05-27 01:42:52 +02:00
|
|
|
commit:
|
|
|
|
jobs:
|
2018-07-24 00:22:42 +02:00
|
|
|
- build-alpine
|
2018-07-24 00:30:08 +02:00
|
|
|
- build-ubuntu
|
2018-07-24 08:10:05 +02:00
|
|
|
notify:
|
|
|
|
webhooks:
|
|
|
|
- url: https://hooks.microbadger.com/images/catdeployed/postal/K0vCLtQnFFKukT-LuAEBmGD0cHs=
|