stages: - build - test - testall build: stage: build image: debian:unstable script: - apt-get -y update - bash -c 'mkdir -p /usr/share/man/man{0..10}' - apt-get -y install build-essential devscripts fakeroot dh-exec jdupes doxygen graphviz php-cli - mv debian/changelog debian/changelog.old - > cat <(echo "davical ($(cat VERSION)-99~git$(date +"%Y%m%d")-$(git rev-parse --short $CI_COMMIT_SHA)) unstable; urgency=medium") <(echo "") <(echo " * Build on CI") <(echo "") <(echo " -- ${GITLAB_USER_NAME} <${GITLAB_USER_EMAIL}> $(date -R)") <(echo "") debian/changelog.old >debian/changelog - rm debian/changelog.old - debuild -us -uc -b -d - 'mv ../davical_*_all.deb ./davical.deb' artifacts: paths: - '*.deb' test: stage: test image: debian:unstable artifacts: paths: - testing/report.xml - apache2_log/* reports: junit: testing/report.xml when: always script: - apt-get -y update - bash -c 'mkdir -p /usr/share/man/man{0..10}' - apt-get -y install locales - echo "en_NZ.UTF-8 UTF-8" >> /etc/locale.gen - locale-gen - echo "LANG=en_NZ.UTF-8" > /etc/default/locale - apt-get -y install libdbd-pg-perl libyaml-perl php php-cli php-pgsql php-xml postgresql-client postgresql libapache2-mod-php curl xmlstarlet - curl 'https://gitlab.com/davical-project/awl/-/archive/master/awl-master.tar.gz' | tar zxf - - mv awl-master /usr/share/awl/ - chown -R www-data /usr/share/awl/ - dpkg --ignore-depends=libawl-php -i *.deb - echo '127.0.1.1 regression mycaldav myempty' >> /etc/hosts - rm /etc/apache2/ports.conf /etc/apache2/sites-enabled/000-default.conf && touch /etc/apache2/ports.conf - cp testing/apache-site.conf.example /etc/apache2/sites-enabled/davical-regression.conf - sed -i 's/\/path\/to/\/usr\/share/g' /etc/apache2/sites-enabled/davical-regression.conf - mkdir /usr/share/davical/testing/ - cp testing/*.php /usr/share/davical/testing/ - rm /etc/davical/config.php - cp testing/regression-conf.php.example /etc/davical/regression-conf.php - ln -s /etc/davical/regression-conf.php /etc/davical/mycaldav-conf.php - ln -s /etc/davical/regression-conf.php /etc/davical/myempty-conf.php - sed -i '/peer/d' /etc/postgresql/13/main/pg_hba.conf - echo 'local all all trust' >> /etc/postgresql/13/main/pg_hba.conf - pg_ctlcluster 13 main start - su postgres -c 'createuser davical_dba --createdb --createrole --superuser' - su postgres -c 'createuser davical_app --superuser' - su postgres -c 'createuser testrunner --superuser' - pg_ctlcluster 13 main restart - a2enmod rewrite - apache2ctl start - useradd testrunner - cd testing && su testrunner -c 'IS_CI=yes ALLSUITES="regression-suite binding carddav scheduling" ./run_regressions.sh all x' after_script: - mkdir -p apache2_log - cp -r /var/log/apache2 apache2_log/test test_bullseye: stage: testall image: debian:bullseye artifacts: paths: - testing/report.xml - apache2_log/* reports: junit: testing/report.xml when: always script: - apt-get -y update - bash -c 'mkdir -p /usr/share/man/man{0..10}' - apt-get -y install locales - echo "en_NZ.UTF-8 UTF-8" >> /etc/locale.gen - locale-gen - echo "LANG=en_NZ.UTF-8" > /etc/default/locale - apt-get -y install libdbd-pg-perl libyaml-perl php php-cli php-pgsql php-xml postgresql-client postgresql libapache2-mod-php curl xmlstarlet - curl 'https://gitlab.com/davical-project/awl/-/archive/master/awl-master.tar.gz' | tar zxf - - mv awl-master /usr/share/awl/ - chown -R www-data /usr/share/awl/ - dpkg --ignore-depends=libawl-php -i *.deb - echo '127.0.1.1 regression mycaldav myempty' >> /etc/hosts - rm /etc/apache2/ports.conf /etc/apache2/sites-enabled/000-default.conf && touch /etc/apache2/ports.conf - cp testing/apache-site.conf.example /etc/apache2/sites-enabled/davical-regression.conf - sed -i 's/\/path\/to/\/usr\/share/g' /etc/apache2/sites-enabled/davical-regression.conf - mkdir /usr/share/davical/testing/ - cp testing/*.php /usr/share/davical/testing/ - rm /etc/davical/config.php - cp testing/regression-conf.php.example /etc/davical/regression-conf.php - ln -s /etc/davical/regression-conf.php /etc/davical/mycaldav-conf.php - ln -s /etc/davical/regression-conf.php /etc/davical/myempty-conf.php - sed -i '/peer/d' /etc/postgresql/13/main/pg_hba.conf - echo 'local all all trust' >> /etc/postgresql/13/main/pg_hba.conf - pg_ctlcluster 13 main start - su postgres -c 'createuser davical_dba --createdb --createrole --superuser' - su postgres -c 'createuser davical_app --superuser' - su postgres -c 'createuser testrunner --superuser' - pg_ctlcluster 13 main restart - a2enmod rewrite - apache2ctl start - useradd testrunner - cd testing && su testrunner -c 'IS_CI=yes ALLSUITES="regression-suite binding carddav scheduling" ./run_regressions.sh all x' after_script: - mkdir -p apache2_log - cp -r /var/log/apache2 apache2_log/test_bullseye build_buster_latestphp: stage: testall image: php:apache-buster script: - apt-get -y update - bash -c 'mkdir -p /usr/share/man/man{0..10}' - apt-get -y install build-essential devscripts fakeroot dh-exec jdupes doxygen graphviz - mv debian/changelog debian/changelog.old - > cat <(echo "davical ($(cat VERSION)-99~git$(date +"%Y%m%d")-$(git rev-parse --short $CI_COMMIT_SHA)) unstable; urgency=medium") <(echo "") <(echo " * Build on CI") <(echo "") <(echo " -- ${GITLAB_USER_NAME} <${GITLAB_USER_EMAIL}> $(date -R)") <(echo "") debian/changelog.old >debian/changelog - rm debian/changelog.old - debuild --prepend-path=/usr/local/bin -us -uc -b -d - 'mv ../davical_*_all.deb ./davical.deb' artifacts: paths: - '*.deb' test_buster_latestphp: stage: testall image: php:apache-buster artifacts: paths: - testing/report.xml - apache2_log/* reports: junit: testing/report.xml when: always script: - apt-get -y update - bash -c 'mkdir -p /usr/share/man/man{0..10}' - apt-get -y install locales - echo "en_NZ.UTF-8 UTF-8" >> /etc/locale.gen - locale-gen - echo "LANG=en_NZ.UTF-8" > /etc/default/locale - apt-get -y install libdbd-pg-perl libyaml-perl perl postgresql postgresql-client libpq-dev xmlstarlet - curl 'https://gitlab.com/davical-project/awl/-/archive/master/awl-master.tar.gz' | tar zxf - - mv awl-master /usr/share/awl/ - chown -R www-data /usr/share/awl/ - dpkg --ignore-depends=php,php-pgsql,php-xml,libawl-php,php-cli -i *.deb - docker-php-ext-install -j$(nproc) pgsql - docker-php-ext-install -j$(nproc) pdo_pgsql - docker-php-ext-install -j$(nproc) calendar - echo '127.0.1.1 regression mycaldav myempty' >> /etc/hosts - rm /etc/apache2/ports.conf /etc/apache2/sites-enabled/000-default.conf && touch /etc/apache2/ports.conf - cp testing/apache-site.conf.example /etc/apache2/sites-enabled/davical-regression.conf - sed -i 's/\/path\/to/\/usr\/share/g' /etc/apache2/sites-enabled/davical-regression.conf - mkdir /usr/share/davical/testing/ - cp testing/*.php /usr/share/davical/testing/ - rm /etc/davical/config.php - cp testing/regression-conf.php.example /etc/davical/regression-conf.php - ln -s /etc/davical/regression-conf.php /etc/davical/mycaldav-conf.php - ln -s /etc/davical/regression-conf.php /etc/davical/myempty-conf.php - sed -i '/peer/d' /etc/postgresql/11/main/pg_hba.conf - echo 'local all all trust' >> /etc/postgresql/11/main/pg_hba.conf - pg_ctlcluster 11 main start - su postgres -c 'createuser davical_dba --createdb --createrole --superuser' - su postgres -c 'createuser davical_app --superuser' - su postgres -c 'createuser testrunner --superuser' - pg_ctlcluster 11 main restart - a2enmod rewrite - apache2ctl start - useradd testrunner - cd testing && su testrunner -c 'IS_CI=yes ALLSUITES="regression-suite binding carddav scheduling" ./run_regressions.sh all x' after_script: - mkdir -p apache2_log - cp -r /var/log/apache2 apache2_log/test_buster_latestphp test_stretch_latestphp: stage: testall image: php:apache-stretch artifacts: paths: - testing/report.xml - apache2_log/* reports: junit: testing/report.xml when: always script: - apt-get -y update - bash -c 'mkdir -p /usr/share/man/man{0..10}' - apt-get -y install locales - echo "en_NZ.UTF-8 UTF-8" >> /etc/locale.gen - locale-gen - echo "LANG=en_NZ.UTF-8" > /etc/default/locale - apt-get -y install libdbd-pg-perl libyaml-perl perl postgresql postgresql-client libpq-dev xmlstarlet - curl 'https://gitlab.com/davical-project/awl/-/archive/master/awl-master.tar.gz' | tar zxf - - mv awl-master /usr/share/awl/ - chown -R www-data /usr/share/awl/ - dpkg --ignore-depends=php,php-pgsql,php-xml,libawl-php,php-cli -i *.deb - docker-php-ext-install -j$(nproc) pgsql - docker-php-ext-install -j$(nproc) pdo_pgsql - docker-php-ext-install -j$(nproc) calendar - echo '127.0.1.1 regression mycaldav myempty' >> /etc/hosts - cp testing/apache-site.conf.example /etc/apache2/sites-enabled/davical-regression.conf - sed -i 's/\/path\/to/\/usr\/share/g' /etc/apache2/sites-enabled/davical-regression.conf - mkdir /usr/share/davical/testing/ - cp testing/*.php /usr/share/davical/testing/ - rm /etc/davical/config.php - cp testing/regression-conf.php.example /etc/davical/regression-conf.php - ln -s /etc/davical/regression-conf.php /etc/davical/mycaldav-conf.php - ln -s /etc/davical/regression-conf.php /etc/davical/myempty-conf.php - sed -i '/peer/d' /etc/postgresql/9.6/main/pg_hba.conf - echo 'local all all trust' >> /etc/postgresql/9.6/main/pg_hba.conf - pg_ctlcluster 9.6 main start - su postgres -c 'createuser davical_dba --createdb --createrole --superuser' - su postgres -c 'createuser davical_app --superuser' - su postgres -c 'createuser testrunner --superuser' - pg_ctlcluster 9.6 main restart - a2enmod rewrite - apache2ctl start - useradd testrunner - cd testing && su testrunner -c 'IS_CI=yes ALLSUITES="regression-suite binding carddav scheduling" ./run_regressions.sh all x' after_script: - mkdir -p apache2_log - cp -r /var/log/apache2 apache2_log/test_stretch_latestphp