Skip to content

Commit

Permalink
Codeship CI/CD for python client (#98)
Browse files Browse the repository at this point in the history
Use versioneer to auto increment version based on tag and deploy to pypi / run  tests and deploy using codeship
  • Loading branch information
goatrocks authored Mar 1, 2021
1 parent 8321f13 commit 75ff4c7
Show file tree
Hide file tree
Showing 15 changed files with 2,471 additions and 28 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
indico/_version.py export-subst
14 changes: 4 additions & 10 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
FROM indicoio/numpy as numpy-base
FROM indicoio/alpine:3.7.3
FROM python:3.8

ENV INDICO_HOST="app.indico.io"
ENV INDICO_HOST="dev.indico.io"

RUN apk add --no-cache libjpeg jpeg-dev zlib-dev
COPY README.rst README.rst

COPY . /indicoio
WORKDIR /indicoio

RUN python3 setup.py test
COPY . /indico-client
WORKDIR /indico-client
2 changes: 2 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
include versioneer.py
include indico/_version.py
29 changes: 23 additions & 6 deletions codeship-services.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,24 @@
python3:
container_name: indico-ipa
default_cache_branch: "development"
cached: true
encrypted_env_file: codeship.env
indico-client-test:
build:
dockerfile: tox.Dockerfile
container_name: indico-client-test
environment:
- INDICO_HOST=dev.indico.io
- TOX_PARALLEL_NO_SPINNER=true
encrypted_env_file:
- env.encrypted
volumes:
- .:/indico-ipa
- .:/indico-client
indico-client-deploy:
build:
dockerfile: Dockerfile
container_name: indico-client-deploy
environment:
- TWINE_USERNAME=__token__
#- TWINE_REPOSITORY=testpypi #uncomment to test CD against test.pypi.org
- TWINE_NON_INTERACTIVE=true
encrypted_env_file:
- env.encrypted
volumes:
- .:/indico-client

15 changes: 7 additions & 8 deletions codeship-steps.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
- type: parallel
steps:
- name: Python 2 Tests
service: python2
command: nosetests -sv .
- name: Python 3 Tests
service: python3
command: nosetests -sv .
- name: test
service: indico-client-test
command: /indico-client/scripts/test.sh
- name: deploy
tag: ^([0-9]+)\.([0-9]+)\.([0-9]+)?
service: indico-client-deploy
command: /indico-client/scripts/deploy.sh
2 changes: 2 additions & 0 deletions env.encrypted
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
codeship:v2
cUmokWCGPIhy7nZA9PEtFzIFs85ieKWWnS5tRQ3ioPdd3fdySsxLt9zK6/dk2pv5f9JU0hys726XUGr7kVP84AWyjalZ40/ckljQb8i3FyLLpCwVnrVwvSGJVDvtvNH/jKHQkOHrOUsu0lREADWJ44QCwnFa2rDOsf3yWqVcUU6C1XhjKt2KXdK5bPqcz0Fz/M5mc7ft9IgZHktTSJF5os6nndOPIpWYzIpz6RWeqvYPW7f1RTR9rWcm9AoPv7GjxES+lH1oWiWL1cKiTTLrSYffFqAtpxYhf0mC0/hJ7SpLiFKHYYaJKg7MxOsSWS9vuOUeJzn1UTrOdtMsRBiMkZUFV2mmixV3nlE4Eq4iyowAtYhSobTwtfSoL3t/pKo9h4kbP42AHyHJX44cz3sGmYhxTtN0a/DSAM22z9Zfz1ZIxrFrKLkQHNp6zieMK/X3tKmSEQHH79utyyZaYLEJzjhe3l4wwt6qlBXP9d9W5ikJPJNGEzDYOhk0RUqhGPO0EicK1lx/5y9iUk9+os8TyVrg6Tv2iIwo+ylxMsbyjN+yjR1HT+iFb07eQ/qyWzGNaGa77xgagHzp0uGxbGcctP27qFCCv9GareZ8Y4z+GSnLxJ4KeV9Tg+xGhjRl01NId3WXzyoLjOTK+Zcv/1+MY1aUjDM8/AQUSKloXiZKNWyBoHqfna60s1Y=
5 changes: 2 additions & 3 deletions indico/__init__.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import logging
from indico._version import get_version
from indico._version import get_versions

logging.basicConfig()
Version = version = __version__ = VERSION = get_version()
Version = version = __version__ = VERSION = get_versions()['version']

from indico.client import *
from indico.client.request import *

Loading

0 comments on commit 75ff4c7

Please sign in to comment.