Skip to content

Commit d9bd6af

Browse files
committed
Use circle-ci to publish docker images.
1 parent 1be0569 commit d9bd6af

File tree

3 files changed

+29
-1
lines changed

3 files changed

+29
-1
lines changed

.circleci/config.yml

+27
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,24 @@ jobs:
122122
name: Release to PyPI
123123
command: tox -e release
124124

125+
publish_docker:
126+
working_directory: ~/project
127+
machine:
128+
image: ubuntu-2004:202111-02
129+
steps:
130+
- checkout
131+
- run:
132+
name: Build girder_worker docker
133+
command: docker build --force-rm -t girder/girder_worker .
134+
- run:
135+
name: Publish images to Docker Hub
136+
command: |
137+
echo "$DOCKERHUB_PASS" | docker login -u "$DOCKERHUB_USERNAME" --password-stdin
138+
docker push girder/girder_worker:latest
139+
if [[ $CIRCLE_TAG =~ ^v.*$ ]]; then
140+
docker tag girder/girder_worker:latest "girder/girder_worker:$CIRCLE_TAG"
141+
docker push "girder/girder_worker:$CIRCLE_TAG"
142+
fi
125143
126144
workflows:
127145
version: 2
@@ -146,3 +164,12 @@ workflows:
146164
branches:
147165
only:
148166
- master
167+
- publish_docker:
168+
requires:
169+
- release
170+
filters:
171+
tags:
172+
only: /^v.*/
173+
branches:
174+
only:
175+
- master

.dockerignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
env

Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -qy tzdata
1515
libpython3-dev && \
1616
apt-get clean && rm -rf /var/lib/apt/lists/*
1717

18-
RUN wget https://bootstrap.pypa.io/get-pip.py && python3 get-pip.py
18+
RUN wget https://bootstrap.pypa.io/pip/3.6/get-pip.py && python3 get-pip.py
1919

2020

2121
FROM base as build

0 commit comments

Comments
 (0)