Skip to content

Commit c5badc1

Browse files
committed
2 parents 56da906 + b8a6c82 commit c5badc1

File tree

1 file changed

+42
-2
lines changed

1 file changed

+42
-2
lines changed

.circleci/config.yml

Lines changed: 42 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,46 @@ jobs:
3434
command: |
3535
apk add --no-cache jq py-pip sudo
3636
sudo pip install awscli --upgrade
37-
37+
3838
- deploy:
3939
command: ./deploy.sh DEV $CIRCLE_SHA1
40-
40+
41+
"build-prod":
42+
docker:
43+
- image: docker:17.06.1-ce-git
44+
steps:
45+
# Initialization.
46+
- checkout
47+
- setup_remote_docker
48+
- run:
49+
name: Installation of build dependencies.
50+
command: apk add --no-cache bash
51+
52+
# Restoration of node_modules from cache.
53+
- restore_cache:
54+
key: docker-tc-notify-{{ checksum "package-lock.json" }}
55+
56+
# Build of Docker image.
57+
- run:
58+
name: Build of Docker image
59+
command: ./build.sh PROD
60+
61+
# Caching node modules.
62+
- save_cache:
63+
key: docker-tc-notify-{{ checksum "package-lock.json" }}
64+
paths:
65+
- node_modules
66+
67+
# Deployment.
68+
- run:
69+
name: Installing AWS client
70+
command: |
71+
apk add --no-cache jq py-pip sudo
72+
sudo pip install awscli --upgrade
73+
74+
- deploy:
75+
command: ./deploy.sh PROD $CIRCLE_SHA1
76+
4177
workflows:
4278
version: 2
4379
build:
@@ -47,3 +83,7 @@ workflows:
4783
filters:
4884
branches:
4985
only: dev
86+
- "build-prod":
87+
filters:
88+
branches:
89+
only: master

0 commit comments

Comments
 (0)