Skip to content
This repository has been archived by the owner on Dec 16, 2024. It is now read-only.

Commit

Permalink
Build ecommerce images as part of CI
Browse files Browse the repository at this point in the history
  • Loading branch information
regisb committed Jul 11, 2019
1 parent 5fdf566 commit 6694ae4
Show file tree
Hide file tree
Showing 6 changed files with 44 additions and 6 deletions.
34 changes: 32 additions & 2 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,35 @@
deploy:
build:ecommerce-images:
script:
- apk add --no-cache docker
- python setup.py install
- tutor plugins enable ecommerce
- tutor config save
- tutor images build ecommerce
- tutor images build ecommerce_worker
only:
refs:
- master
tags:
- private
stage: build

deploy:images:
script:
- apk add --no-cache docker
- python setup.py install
- tutor plugins enable ecommerce
- tutor config save
- tutor images push ecommerce
- tutor images push ecommerce_worker
only:
refs:
- master
tags:
- private
stage: deploy

deploy:pypi:
script:
- apk add --no-cache make
- pip3 install -U setuptools twine
- python3 setup.py sdist
- twine upload --skip-existing dist/tutor-ecommerce*.tar.gz
Expand All @@ -9,3 +38,4 @@ deploy:
- master
tags:
- private
stage: deploy
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
recursive-include tutorecommerce/patches *
recursive-include tutorecommerce/templates *
7 changes: 5 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,18 @@
with io.open(os.path.join(here, "README.rst"), "rt", encoding="utf8") as f:
readme = f.read()

about = {}
with io.open(os.path.join(here, "tutorecommerce", "__about__.py"), "rt", encoding="utf-8") as f:
exec(f.read(), about)

setup(
name="tutor-ecommerce",
version="0.1.1",
version=about["__version__"],
url="https://docs.tutor.overhang.io/",
project_urls={
"Documentation": "https://docs.tutor.overhang.io/",
"Code": "https://github.com/overhangio/tutor-ecommerce",
"Issue tracker": "https://github.com/overhangio/tutor/issues",
"Issue tracker": "https://github.com/overhangio/tutor-ecommerce/issues",
"Community": "https://discuss.overhang.io",
},
license="AGPLv3",
Expand Down
1 change: 1 addition & 0 deletions tutorecommerce/__about__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__version__ = "0.1.2"
Empty file added tutorecommerce/__init__.py
Empty file.
7 changes: 5 additions & 2 deletions tutorecommerce/plugin.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
from glob import glob
import os

from .__about__ import __version__

HERE = os.path.abspath(os.path.dirname(__file__))

templates = os.path.join(HERE, "templates")
Expand Down Expand Up @@ -42,8 +44,9 @@
"EXTRA_PAYMENT_PROCESSOR_CLASSES": [],
},
"defaults": {
"DOCKER_IMAGE": "overhangio/openedx-ecommerce:{{ TUTOR_VERSION }}",
"WORKER_DOCKER_IMAGE": "overhangio/openedx-ecommerce-worker:{{ TUTOR_VERSION }}",
"VERSION": __version__,
"DOCKER_IMAGE": "overhangio/openedx-ecommerce:{{ ECOMMERCE_VERSION }}",
"WORKER_DOCKER_IMAGE": "overhangio/openedx-ecommerce-worker:{{ ECOMMERCE_VERSION }}",
"HOST": "ecommerce.{{ LMS_HOST }}",
"MYSQL_DATABASE": "ecommerce",
"MYSQL_USERNAME": "ecommerce",
Expand Down

0 comments on commit 6694ae4

Please sign in to comment.