Skip to content

Commit 299766f

Browse files
committed
add dockerhub deployment to CI
1 parent 861571d commit 299766f

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

.circleci/config.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,37 @@ jobs:
2626
resources/enable_profiling.py &&
2727
pytest --tb=short &&
2828
resources/profile_queries.py
29+
deploy:
30+
docker:
31+
- image: circleci/buildpack-deps:stretch
32+
environment:
33+
IMAGE_NAME: icecube/file-catalog
34+
steps:
35+
- checkout
36+
- setup_remote_docker
37+
- run: |
38+
echo 'export TAG="${CIRCLE_TAG:=latest}"' >> $BASH_ENV
39+
- run: |
40+
docker build -t $IMAGE_NAME:$TAG .
41+
- run: |
42+
echo "$DOCKERHUB_PASS" | docker login -u "$DOCKERHUB_USER" --password-stdin
43+
docker push $IMAGE_NAME:$TAG
2944
workflows:
3045
version: 2
3146
build_and_test:
3247
jobs:
3348
- test
49+
- deploy:
50+
context: docker
51+
filters:
52+
branches:
53+
only: master
54+
release:
55+
jobs:
56+
- deploy:
57+
context: docker
58+
filters:
59+
branches:
60+
ignore: /.*/
61+
tags:
62+
only: /^v?\d+\.\d+\.\d+$/

0 commit comments

Comments
 (0)