2018-05-27 01:42:52 +02:00
|
|
|
version: 2
|
|
|
|
jobs:
|
2018-05-27 02:03:02 +02:00
|
|
|
build:
|
|
|
|
machine: true
|
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
- run:
|
2018-05-27 02:06:08 +02:00
|
|
|
name: Build Postal Docker Container
|
2018-05-27 23:22:58 +02:00
|
|
|
command: docker build -t catdeployed/postal:dev .
|
2018-05-27 02:10:07 +02:00
|
|
|
- run:
|
|
|
|
name: Skip this job for Pull Requests
|
2018-05-27 02:30:47 +02:00
|
|
|
command: '[[ -v CIRCLE_PR_NUMBER ]] && circleci step halt || true'
|
2018-05-27 23:22:58 +02:00
|
|
|
- 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:dev
|
|
|
|
|
2018-05-27 01:42:52 +02:00
|
|
|
workflows:
|
|
|
|
version: 2
|
|
|
|
nightly:
|
|
|
|
triggers:
|
|
|
|
- schedule:
|
|
|
|
cron: "0 * * * *"
|
|
|
|
filters:
|
|
|
|
branches:
|
|
|
|
only:
|
|
|
|
- master
|
|
|
|
jobs:
|
|
|
|
- build
|
|
|
|
commit:
|
|
|
|
jobs:
|
2018-05-27 23:30:04 +02:00
|
|
|
- build:
|
2018-05-27 23:28:21 +02:00
|
|
|
context: Docker Hub
|