diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 06df119..907773c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -4,6 +4,7 @@ variables: stages: - test +- build - docker - deploy - release @@ -33,6 +34,29 @@ tests: matrix: - QGIS_FLAVOR: ['ltr', 'release', '3.28'] +#--------------- +# Build +#--------------- + +build: + image: ${REGISTRY_URL}/factory-ci-runner:python + stage: build + script: + - source ~/.bashrc + - make dist deliver + environment: + name: snap + tags: + - infrav3-plain + only: + refs: + - tags + - master + except: + - schedules + - triggers + + # Docker build include: '/docker/.gitlab-ci.yml' diff --git a/Makefile b/Makefile index 3d46878..e35dba3 100644 --- a/Makefile +++ b/Makefile @@ -4,8 +4,7 @@ DEPTH=. include $(DEPTH)/config.mk -BUILDDIR:=build -DIST:=${BUILDDIR}/dist +DIST:=dist MANIFEST=pyqgisserver/build.manifest @@ -13,6 +12,8 @@ PYTHON_PKG=pyqgisserver pyqgisservercontrib TESTDIR=tests/unittests +PYPISERVER:=storage + # This is necessary with pytest as long it is not fixed # see also https://github.com/qgis/QGIS/pull/5337 export QGIS_DISABLE_MESSAGE_HOOKS := 1 @@ -33,14 +34,14 @@ manifest: version echo commitid=$(COMMITID) >> $(MANIFEST) deliver: - twine upload -r storage $(DIST)/* + twine upload $(TWINE_OPTIONS) -r $(PYPISERVER) $(DIST)/* dist: dirs configure rm -rf *.egg-info $(PYTHON) setup.py sdist --dist-dir=$(DIST) clean: - rm -rf $(BUILDDIR) + rm -rf $(DIST) test: lint make -C tests test PYTEST_ADDOPTS=$(PYTEST_ADDOPTS)