add docker travis deploy

This commit is contained in:
Casper da Costa-Luis 2019-03-02 21:43:13 +00:00
parent 4c22a386a3
commit 0e48c1f575
No known key found for this signature in database
GPG Key ID: 986B408043AE090D
4 changed files with 36 additions and 3 deletions

1
.gitignore vendored
View File

@ -9,6 +9,7 @@ build/
dist/
snapcraft.yaml
tqdm_*_amd64.snap
.dockerignore
# Unit test / coverage reports
.tox/

View File

@ -12,10 +12,17 @@ matrix:
- python: 3.6
env: TOXENV=py36
- python: 3.7
dist: xenial
sudo: true # required for py37
env: TOXENV=py37
dist: xenial
sudo: true # required for py37, docker
services:
- docker
before_deploy:
- echo "$DOCKER_PWD" | docker login -u $DOCKER_USR --password-stdin
- make -B docker
- |
if [[ -n "$TRAVIS_TAG" ]]; then
docker tag tqdm/tqdm:latest tqdm/tqdm:$TRAVIS_TAG ; fi
- pip install .[dev]
- make build
#- make submodules
@ -39,6 +46,14 @@ matrix:
name: tqdm v$TRAVIS_TAG stable
on:
tags: true
- provider: script
script: docker push tqdm/tqdm:latest
on:
tags: true
- provider: script
script: docker push tqdm/tqdm:$TRAVIS_TAG
on:
tags: true
- python: pypy2.7-5.10.0
env: TOXENV=pypy
- python: pypy3.5-5.10.0

7
Dockerfile Normal file
View File

@ -0,0 +1,7 @@
FROM python:3.7-alpine
COPY setup.py tqdm/
COPY requirements-dev.txt tqdm/
COPY README.rst tqdm/
COPY tqdm tqdm/tqdm
RUN pip install -U ./tqdm
ENTRYPOINT ["tqdm"]

View File

@ -24,6 +24,7 @@
buildupload
pypi
snap
docker
help
none
@ -99,6 +100,11 @@ snapcraft.yaml: .snapcraft.yml
-e 's/{source}/./g' -e 's/{icon}/logo.png/g' \
-e 's/{description}/https:\/\/tqdm.github.io/g' > "$@"
.dockerignore: .gitignore
cat $^ > "$@"
echo -e ".git" > "$@"
git clean -xdn | sed -nr 's/^Would remove (.*)$$/\1/p' >> "$@"
distclean:
@+make coverclean
@+make prebuildclean
@ -148,6 +154,10 @@ buildupload:
snap:
@make snapcraft.yaml
snapcraft
docker:
@make .dockerignore
@make coverclean
@make clean
docker build . -t tqdm/tqdm
none:
# used for unit testing