diff --git a/the_social_network/.gilab-ci.yml b/the_social_network/.gilab-ci.yml new file mode 100644 index 0000000000000000000000000000000000000000..1d8eaf7335cf4818af970e788a0126000ace4f6d --- /dev/null +++ b/the_social_network/.gilab-ci.yml @@ -0,0 +1,49 @@ +image: docker + +services: + - docker:dind + +stages: + - build + - test + - deploy + +before_script: + - docker version + - apk add --no-cache docker-compose + - docker-compose version + - docker login -u gitlab-ci-token -p $REGISTRY_TOKEN $REGISTRY + +after_script: + - docker-compose -f docker-compose.ci.yml down + - docker-compose -f docker-compose.ci.yml ps + + +build: + stage: build + script: + - echo "Building ..." + - docker-compose -f docker-compose.ci.yml build + - docker-compose -f docker-compose.ci.yml push + +test: + stage: test + needs: + - build + script: + - echo "Testing ..." + - docker-compose -f docker-compose.ci.yml pull + - docker-compose -f docker-compose.ci.yml run web sh -c "pipenv run python manage.py makemigrations && pipenv run python manage.py migrate && pipenv run python manage.py test core -v 2" + +deploy: + stage: deploy + needs: + - test + script: + - echo "Deploying ..." + - pip install poetry + - mw /the_social_network /not_needed + - mw /core /the_social_network + - poetry --version + - poetry config pypi-token.pypi $POETRY_PYPI_TOKEN_PYPI + - poetry publish \ No newline at end of file diff --git a/the_social_network/MANIFEST.in b/the_social_network/MANIFEST.in deleted file mode 100644 index 5b2510b6010be4f476ed78cd097bcce3a73f8b1c..0000000000000000000000000000000000000000 --- a/the_social_network/MANIFEST.in +++ /dev/null @@ -1,7 +0,0 @@ -include LICENSE -include README.rst -include core/* -exclude the_social_network/* -exclude setup.cfg -exclude MANIFEST.in -exclude manage.py \ No newline at end of file diff --git a/the_social_network/pyproject.toml b/the_social_network/pyproject.toml new file mode 100644 index 0000000000000000000000000000000000000000..9aaa0f88dd8af97125aea0275fbbc44c9b1b99c6 --- /dev/null +++ b/the_social_network/pyproject.toml @@ -0,0 +1,23 @@ +[tool.poetry] +name = "the-social-network" +version = "0.0.1" +description = "Basic social network core." +authors = ["Marc Feger <marc.feger@hhu.de>"] +license = "BSD-4" +exclude = ["core"] + + +[tool.poetry.dependencies] +python = "^3.8" +Django = "^3.2.9" +djangorestframework = "^3.12.4" +Pillow = "^8.4.0" +django-cors-headers = "^3.10.0" +django-dotenv = "^1.4.2" +uWSGI = "^2.0.20" + +[tool.poetry.dev-dependencies] + +[build-system] +requires = ["poetry-core>=1.0.0"] +build-backend = "poetry.core.masonry.api" diff --git a/the_social_network/setup.cfg b/the_social_network/setup.cfg deleted file mode 100644 index 578367de7957cc06cbb540eee07d20479c8de21e..0000000000000000000000000000000000000000 --- a/the_social_network/setup.cfg +++ /dev/null @@ -1,24 +0,0 @@ -[metadata] -name = the-social-network -version = 0.1 -description = Basic core of all social network backends -long_description = file: README.rst -url = https://www.example.com/ -author = Marc Feger -author_email = marc.feger@uni-duesseldorf.de -license = BSD-4-Clause -classifiers = - Environment :: Web Environment - Framework :: Django - Framework :: Django :: 3.1.2 # Replace "X.Y" as appropriate - Intended Audience :: Developers - License :: OSI Approved :: BSD License - Operating System :: OS Independent - Programming Language :: Python - Programming Language :: Python :: 3.9 - Topic :: Internet :: WWW/HTTP - Topic :: Internet :: WWW/HTTP :: Dynamic Content - -[options] -include_package_data = true -packages = find: \ No newline at end of file diff --git a/the_social_network/setup.py b/the_social_network/setup.py deleted file mode 100644 index fc1f76c84d17b458f7090667d495592c9abda034..0000000000000000000000000000000000000000 --- a/the_social_network/setup.py +++ /dev/null @@ -1,3 +0,0 @@ -from setuptools import setup - -setup() \ No newline at end of file