Skip to content

Commit

Permalink
Separate build-image job to build-image and push-image
Browse files Browse the repository at this point in the history
Execute build-image every commit
  • Loading branch information
dulltz committed Apr 10, 2019
1 parent d9eafeb commit b18bd4d
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,22 @@ jobs:
name: Build image
command: |
docker build -t quay.io/cybozu/sabakan:latest ./docker
- run:
name: Save image
command: |
mkdir -p /tmp/docker
docker save -o /tmp/docker/image
- persist_to_workspace:
root: /tmp/docker
paths:
- image
push-image:
docker:
steps:
- attach_workspace:
at: /tmp/docker
- setup_remote_docker
- run: docker load -i /tmp/docker/image
- run:
name: Push docker image to Quay.io
command: |
Expand Down Expand Up @@ -72,6 +88,9 @@ workflows:
main:
jobs:
- build
- build-image:
requires:
- build
- mtest
release:
jobs:
Expand All @@ -89,3 +108,11 @@ workflows:
ignore: /.*/
tags:
only: /^v.*/
- push-image:
requires:
- build-image
filters:
branches:
ignore: /.*/
tags:
only: /^v.*/

0 comments on commit b18bd4d

Please sign in to comment.