-
Notifications
You must be signed in to change notification settings - Fork 6
/
circle.yml
29 lines (29 loc) · 997 Bytes
/
circle.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
version: 2
jobs:
build:
working_directory: /app
docker:
- image: docker:18.05.0-ce-git
steps:
- checkout
- setup_remote_docker
- run:
name: Pulling docker image
command: |
docker pull decidim/decidim-monitor || true
- run:
name: Build image
command: |
docker build -t registry.heroku.com/decidim-monitor/web -t decidim/decidim-monitor:latest --cache-from decidim/decidim-monitor .
- run:
name: Run tests
command: |
docker build -t decidim-monitor:ci -f Dockerfile.ci --build-arg FROM=decidim/decidim-monitor:latest .
docker run -it decidim-monitor:ci
- run:
name: Push docker hub image
command: |
if [ "${CIRCLE_BRANCH}" == "master" ]; then
echo $DOCKER_PASS | docker login --username=$DOCKER_USER --password-stdin
docker push decidim/decidim-monitor:latest
fi