Skip to content
Snippets Groups Projects
Commit 9dca6a3e authored by Piotr Gawron's avatar Piotr Gawron
Browse files

ci debian build job

parent c707e515
No related branches found
No related tags found
1 merge request!264Resolve "prepare installable debian package"
Pipeline #33804 passed
...@@ -6,12 +6,16 @@ variables: ...@@ -6,12 +6,16 @@ variables:
POSTGRES_USER: runner POSTGRES_USER: runner
POSTGRES_PASSWORD: password POSTGRES_PASSWORD: password
before_script:
- apt-get update && apt-get install -y --allow-unauthenticated libsasl2-dev libssl-dev locales locales-all .test_template: &test_definition
- pip install -r requirements.txt --default-timeout=180 -i https://pypi.lcsb.uni.lu/simple/ stage: test
- pip install -r requirements-dev.txt --default-timeout=180 -i https://pypi.lcsb.uni.lu/simple/ before_script:
- apt-get update && apt-get install -y --allow-unauthenticated libsasl2-dev libssl-dev locales locales-all
- pip install -r requirements.txt --default-timeout=180 -i https://pypi.lcsb.uni.lu/simple/
- pip install -r requirements-dev.txt --default-timeout=180 -i https://pypi.lcsb.uni.lu/simple/
test_postgres: test_postgres:
<<: *test_definition
services: services:
- postgres:latest - postgres:latest
script: script:
...@@ -22,13 +26,16 @@ test_postgres: ...@@ -22,13 +26,16 @@ test_postgres:
- coverage report -m --omit="*/test*,*/migrations*,*debug_utils*" - coverage report -m --omit="*/test*,*/migrations*,*debug_utils*"
test_sqlite: test_sqlite:
<<: *test_definition
script: script:
- cp "local_settings_ci_sqlite.py" "smash/smash/local_settings.py" - cp "local_settings_ci_sqlite.py" "smash/smash/local_settings.py"
- cd smash - cd smash
- python manage.py makemigrations web && python manage.py migrate - python manage.py makemigrations web && python manage.py migrate
- coverage run --source web manage.py test -v3 - coverage run --source web manage.py test -v3
- coverage report -m --omit="*/test*,*/migrations*,*debug_utils*" - coverage report -m --omit="*/test*,*/migrations*,*debug_utils*"
test_python_3.7: test_python_3.7:
<<: *test_definition
image: python:3.7 image: python:3.7
script: script:
- cp "local_settings_ci_sqlite.py" "smash/smash/local_settings.py" - cp "local_settings_ci_sqlite.py" "smash/smash/local_settings.py"
...@@ -36,7 +43,9 @@ test_python_3.7: ...@@ -36,7 +43,9 @@ test_python_3.7:
- python manage.py makemigrations web && python manage.py migrate - python manage.py makemigrations web && python manage.py migrate
- coverage run --source web manage.py test -v3 - coverage run --source web manage.py test -v3
- coverage report -m --omit="*/test*,*/migrations*,*debug_utils*" - coverage report -m --omit="*/test*,*/migrations*,*debug_utils*"
test_python_3.8: test_python_3.8:
<<: *test_definition
image: python:3.8 image: python:3.8
script: script:
- cp "local_settings_ci_sqlite.py" "smash/smash/local_settings.py" - cp "local_settings_ci_sqlite.py" "smash/smash/local_settings.py"
...@@ -44,7 +53,9 @@ test_python_3.8: ...@@ -44,7 +53,9 @@ test_python_3.8:
- python manage.py makemigrations web && python manage.py migrate - python manage.py makemigrations web && python manage.py migrate
- coverage run --source web manage.py test -v3 - coverage run --source web manage.py test -v3
- coverage report -m --omit="*/test*,*/migrations*,*debug_utils*" - coverage report -m --omit="*/test*,*/migrations*,*debug_utils*"
test_python_latest: test_python_latest:
<<: *test_definition
image: python:latest image: python:latest
script: script:
- cp "local_settings_ci_sqlite.py" "smash/smash/local_settings.py" - cp "local_settings_ci_sqlite.py" "smash/smash/local_settings.py"
...@@ -52,3 +63,20 @@ test_python_latest: ...@@ -52,3 +63,20 @@ test_python_latest:
- python manage.py makemigrations web && python manage.py migrate - python manage.py makemigrations web && python manage.py migrate
- coverage run --source web manage.py test -v3 - coverage run --source web manage.py test -v3
- coverage report -m --omit="*/test*,*/migrations*,*debug_utils*" - coverage report -m --omit="*/test*,*/migrations*,*debug_utils*"
build_debian:
image: debian
stage: build
artifacts:
# you cannot enforce never here yet
# expire_in: 1000 yrs
paths:
- "*.deb"
script:
- apt-get update
- DEBIAN_FRONTEND=noninteractive apt-get install -y dh-make build-essential lintian devscripts xsltproc fakeroot xsltproc docbook-xsl
- export DEBFULLNAME="Piotr Gawron"
- export DEBEMAIL="piotr.gawron@uni.lu"
- chmod 0755 build_deb.sh
- ./build_deb.sh
smasch (1.0.0~alpha.0) unstable; urgency=low smasch (1.0.0~alpha.0-0) unstable; urgency=low
* backward incompatible: smasch is using python3 (#337) * backward incompatible: smasch is using python3 (#337)
* improvement: docker script is available (#338) * improvement: docker script is available (#338)
......
...@@ -17,7 +17,7 @@ cp CHANGELOG debian/debian-template/changelog ...@@ -17,7 +17,7 @@ cp CHANGELOG debian/debian-template/changelog
rm debian/smash/smash/local_settings.py rm debian/smash/smash/local_settings.py
cp -r debian-files debian/debian-files cp -r debian-files debian/debian-files
CURRENT_VERSION=`cat CHANGELOG |grep smasch |head -1 | cut -f2 -d'(' | cut -f1 -d')'` CURRENT_VERSION=`cat CHANGELOG |grep smasch |head -1 | cut -f2 -d'(' | cut -f1 -d')' | cut -f1 -d'-' `
cd debian cd debian
dh_make -p smasch_$CURRENT_VERSION -s --createorig -e piotr.gawron@uni.lu -y -t $ROOT/debian/debian-template dh_make -p smasch_$CURRENT_VERSION -s --createorig -e piotr.gawron@uni.lu -y -t $ROOT/debian/debian-template
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment