-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathconfig.yml
50 lines (47 loc) · 1.25 KB
/
config.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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
version: 2
jobs:
build:
working_directory: /src
docker:
- image: docker:stable
steps:
- setup_remote_docker:
docker_layer_caching: true
- checkout
- restore_cache:
keys:
- docker-build-v1
paths:
- /caches/app.tar
- run:
name: Load Docker image layer cache
command: |
set +o pipefail
docker load -i /caches/.tar | true
- run:
command: |
docker build --cache-from=einstore/einstore-admin -t einstore/einstore-admin:${CIRCLE_SHA1} .
- run:
command: docker login -u $DOCKER_USER -p $DOCKER_PASS
- run:
command: docker push einstore/einstore-admin:${CIRCLE_SHA1}
- run:
name: docker tag and push
command: /src/.circleci/tag-and-push.sh ${CIRCLE_SHA1}
- run:
name: Save Docker image layer cache
command: |
mkdir -p /caches
docker save -o /caches/app.tar einstore/einstore-admin
- save_cache:
key: docker-build-v1
paths:
- /caches/app.tar
workflows:
version: 2
build-publish:
jobs:
- build:
filters:
tags:
only: /.*/