Commit f35c2695 authored by Dom31's avatar Dom31
Browse files

gitlab ci

parent 83c6c59f
Loading
Loading
Loading
Loading
Loading
+2 −56
Original line number Diff line number Diff line
variables:
    TWINE_USERNAME: SECURE
    TWINE_PASSWORD: SECURE
    TWINE_REPOSITORY_URL: https://upload.pypi.org/legacy/
    ANACONDA_USERNAME: SECURE
    ANACONDA_TOKEN: SECURE
    DOCKER_PASSWORD: SECURE
    DOCKER_USERNAME: SECURE

stages:
  - test
  - deploy
  - docs

test:
  image: python:3.6
  image: python:3.7
  stage: test
  script:
    - pip install .
    - python setup.py test --addopts "--cov=pypkgtemp"

deploy_pypi:
  image: python:3.6
  stage: deploy
  script:
    - pip install -U twine setuptools
    - python setup.py sdist bdist_wheel
    - twine upload dist/*.tar.gz
    - twine upload dist/*.whl
  only:
    - /^v\d+\.\d+\.\d+([abc]\d*)?$/  # PEP-440 compliant version (tags)


deploy_conda:
  image: continuumio/miniconda3:latest
  stage: deploy
  script:
    - conda install anaconda-client setuptools conda-build -y
    - python setup.py bdist_conda
    - anaconda -t $ANACONDA_TOKEN upload -u $ANACONDA_USERNAME /opt/conda/conda-bld/linux-64/pypkgtemp*.tar.bz2
  only:
    - /^v\d+\.\d+\.\d+([abc]\d*)?$/  # PEP-440 compliant version (tags)


deploy_docker:
  image: docker:git
  stage: deploy
  services:
    - docker:dind
  script:
    - docker build -t python-package-template:$CI_COMMIT_TAG --build-arg VERSION=$CI_COMMIT_TAG .
    # push to dockerhub
    - docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD
    - docker tag python-package-template:$CI_COMMIT_TAG costrouc/python-package-template:$CI_COMMIT_TAG
    - docker tag python-package-template:$CI_COMMIT_TAG costrouc/python-package-template:latest
    - docker push costrouc/python-package-template:$CI_COMMIT_TAG
    - docker push costrouc/python-package-template:latest
    # push to gitlab registry
    - docker login -u gitlab-ci-token -p $CI_JOB_TOKEN registry.gitlab.com
    - docker tag python-package-template:$CI_COMMIT_TAG registry.gitlab.com/costrouc/python-package-template:$CI_COMMIT_TAG
    - docker tag python-package-template:$CI_COMMIT_TAG registry.gitlab.com/costrouc/python-package-template:latest
    - docker push registry.gitlab.com/costrouc/python-package-template:$CI_COMMIT_TAG
    - docker push registry.gitlab.com/costrouc/python-package-template:latest
  only:
    - /^v\d+\.\d+\.\d+([abc]\d*)?$/  # PEP-440 compliant version (tags)

pages:
  image: python:3.6
  image: python:3.7
  stage: docs
  script:
    - pip install sphinx sphinx_rtd_theme
+1 −1
Original line number Diff line number Diff line
@@ -2,5 +2,5 @@ build:
  image: latest

python:
  version: 3.6
  version: 3.7
  setup_py_install: true
+1 −0
Original line number Diff line number Diff line
@@ -15,6 +15,7 @@ help:
apidocs:
	sphinx-apidoc -o source/ ../pypkgtemp
	sphinx-apidoc -o source/ ../people
	sphinx-apidoc -o source/ ../peopleGUI


.PHONY: help Makefile
+1 −0
Original line number Diff line number Diff line
@@ -36,6 +36,7 @@ REM %SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
:apidocs
echo "Making project documentation"
sphinx-apidoc -o source/ ../people
sphinx-apidoc -o source/ ../peopleGUI
sphinx-apidoc -o source/ ../pypkgtemp
goto end

docs/source/modules.rst

deleted100644 → 0
+0 −7
Original line number Diff line number Diff line
people
======

.. toctree::
   :maxdepth: 4

   people
Loading