Skip to content

Commit 9a3d64c

Browse files
authored
Merge pull request #152 from snyk/feat/egg_auto_deploy_prod
feat: auto deploy snyk-monitor to prod
2 parents a4d5f23 + 23cd87c commit 9a3d64c

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

.circleci/config.yml

+23
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,22 @@ jobs:
118118
./scripts/publish-gh-pages.sh ${LATEST_TAG} ||
119119
( ./scripts/slack-notify-failure.sh master && false )
120120
121+
deploy_prod:
122+
working_directory: ~/kubernetes-monitor
123+
docker:
124+
- image: circleci/node:10
125+
steps:
126+
- checkout
127+
- run:
128+
name: DEPLOY PROD
129+
command: |
130+
LATEST_TAG_WITH_V=`git describe --abbrev=0 --tags ${CIRCLE_SHA1}` &&
131+
LATEST_TAG=${LATEST_TAG_WITH_V:1} &&
132+
./scripts/slack-notify-deploy.sh $LATEST_TAG prod &&
133+
curl -i -H "Accept: application/json" -H "Content-Type: application/json" \
134+
-X POST -d "{}" \
135+
https://my.prod.snyk.io/${PROD_DEPLOY_TOKEN}
136+
121137
#######################################################################
122138

123139
workflows:
@@ -168,6 +184,13 @@ workflows:
168184
branches:
169185
only:
170186
- master
187+
- deploy_prod:
188+
requires:
189+
- publish
190+
filters:
191+
branches:
192+
only:
193+
- master
171194

172195
general:
173196
branches:

0 commit comments

Comments
 (0)