Skip to content

Commit bbbc85c

Browse files
committed
Add deployment option to CI workflow
1 parent 822496c commit bbbc85c

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

.circleci/config.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,21 @@ jobs:
302302
executor: docker_machine
303303
steps:
304304
- docker_cache
305+
deploy-to-production:
306+
docker:
307+
- image: curlimages/curl:7.65.3
308+
steps:
309+
- run:
310+
name: Deploy Image
311+
command: |
312+
curl --request POST \
313+
--url https://deployment-api.lbogdan.ro/image \
314+
--header 'Accept: */*' \
315+
--header 'Authorization: Bearer '$DEPLOY_TOKEN'' \
316+
--header 'Content-Type: application/json' \
317+
--header 'Postman-Token: e9e28b11-1889-488e-92c8-d8e41ef24e75' \
318+
--header 'cache-control: no-cache' \
319+
--data '{\n "env": "production",\n "image": "client",\n "tag": "'${CIRCLE_SHA1:0:7}'",\n "deploy": true\n}'
305320
306321
################################
307322
# Workflows
@@ -334,3 +349,10 @@ workflows:
334349
- typecheck
335350
# - test-integrations
336351
- test-jest
352+
- deploy-production-approval:
353+
type: approval
354+
requires:
355+
- create-docker-image
356+
- deploy-to-production:
357+
requires:
358+
- deploy-production-approval

0 commit comments

Comments
 (0)