Skip to content

Commit

Permalink
Merge pull request activeloopai#170 from sudiptog81/feat/add-dockerhu…
Browse files Browse the repository at this point in the history
…b-deployment

feat: add docker hub deployment
  • Loading branch information
davidbuniat authored Nov 2, 2020
2 parents 2f2f613 + c070126 commit 9c20be5
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ workflows:
branches:
ignore: /.*/
- deploy:
context: pypi
context:
- pypi
- snark-docker
requires:
- test
filters:
Expand Down Expand Up @@ -68,6 +70,8 @@ jobs:
deploy:
docker:
- image: circleci/python:3.8
environment:
IMAGE_NAME: snarkai/hub
steps:
- checkout
- run:
Expand All @@ -89,6 +93,18 @@ jobs:
name: "Upload dist to PyPi"
command: |
twine upload dist/*
- run:
name: "Build Docker Hub Image"
command: |
docker build -t $IMAGE_NAME:latest .
- run:
name: "Deploy to Docker Hub"
command: |
echo "$DOCKER_HUB_PASSWORD" | docker login -u "$DOCKER_HUB_USERNAME" --password-stdin
IMAGE_TAG=${CIRCLE_TAG}
docker tag $IMAGE_NAME:latest $IMAGE_NAME:$IMAGE_TAG
docker push $IMAGE_NAME:latest
docker push $IMAGE_NAME:$IMAGE_TAG
- slack/status:
fail_only: true
webhook: $SLACK_WEBHOOK
Expand Down

0 comments on commit 9c20be5

Please sign in to comment.