Skip to content

Commit 17a9e13

Browse files
committed
⚡️(circleci) use base python docker img to push pkgs
Similarily to previous improvement, publishing a package to PyPI only requires twine and configured environment variables. Let's make things faster and simpler for such a simple task.
1 parent 3815465 commit 17a9e13

File tree

2 files changed

+7
-20
lines changed

2 files changed

+7
-20
lines changed

.circleci/config.yml

Lines changed: 6 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -454,37 +454,23 @@ jobs:
454454
# * you have define both the TWINE_USERNAME & TWINE_PASSWORD secret
455455
# environment variables in CircleCI UI (with your PyPI credentials)
456456
pypi:
457-
machine: true
457+
docker:
458+
- image: circleci/python:3.7-stretch
458459
working_directory: ~/fun
459460
steps:
460461
- checkout
461-
- restore_cache:
462-
keys:
463-
- docker-debian-images-ci-{{ .Revision }}
464-
- run:
465-
name: Load images to docker engine
466-
command: |
467-
docker load < docker/images/dev/richie.tar
468462
# Restore built python packages
469463
- attach_workspace:
470464
at: ~/fun
471465
- run:
472466
name: List built packages
473467
command: ls dist/*
468+
- run:
469+
name: Install base requirements (twine)
470+
command: pip install .[ci]
474471
- run:
475472
name: Upload built packages to PyPI
476-
command: |
477-
docker-compose \
478-
-p richie-ci \
479-
-f docker/compose/ci/postgresql/docker-compose.yml \
480-
--project-directory . \
481-
run --rm --no-deps \
482-
--user="$(id -u)" \
483-
--volume="$PWD:/app" \
484-
-e TWINE_USERNAME \
485-
-e TWINE_PASSWORD \
486-
app \
487-
twine upload dist/*
473+
command: twine upload dist/*
488474

489475
# ---- DockerHub publication job ----
490476
hub:

setup.cfg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ dev =
5656
pytest-cov==2.6.1
5757
pytest-django==3.4.8
5858
responses==0.10.6
59+
ci =
5960
twine==1.13.0
6061
sandbox =
6162
django-configurations==2.1

0 commit comments

Comments
 (0)