diff --git a/bitbucket-pipelines.yml b/bitbucket-pipelines.yml index dcda4e7..5416aac 100644 --- a/bitbucket-pipelines.yml +++ b/bitbucket-pipelines.yml @@ -3,10 +3,26 @@ # Only use spaces to indent your .yml configuration. # ----- # You can specify a custom docker image from Docker Hub as your build environment. -# image: docker-image:tag +image: sutoj/builder:xenial +clone: + depth: 20 pipelines: default: - step: script: - - echo "Everything is awesome!" \ No newline at end of file + - echo "Everything is awesome!" + + branches: + bbpl: + - step: + script: + - service mysql start + - ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --with-database=mariadb --enable-tcpwrappers + - make clean all install + - echo "create database piler character set 'utf8mb4'" | mysql + - echo "grant all privileges on piler.* to piler@localhost identified by 'piler123'" | mysql + - echo "flush privileges" | mysql + - mysql -u piler -ppiler123 piler < /usr/share/piler/db-mysql.sql + - cd unit_tests + - ./run.sh diff --git a/unit_tests/run.sh b/unit_tests/run.sh index 79e09c5..1510a3b 100755 --- a/unit_tests/run.sh +++ b/unit_tests/run.sh @@ -1,5 +1,10 @@ #!/bin/bash +set -o errexit +set -o pipefail +set -o nounset +set -x + LD_LIBRARY_PATH=../src ./check_parser_utils LD_LIBRARY_PATH=../src ./check_parser LD_LIBRARY_PATH=../src ./check_rules diff --git a/unit_tests/test.conf b/unit_tests/test.conf index aeb275d..690d049 100644 --- a/unit_tests/test.conf +++ b/unit_tests/test.conf @@ -23,7 +23,7 @@ mysql_connect_timeout=2 mysqldb=piler mysqlpwd=piler123 -mysqlsocket=/var/run/mysql/mysql.sock +mysqlsocket=/var/run/mysqld/mysqld.sock mysqluser=piler number_of_worker_processes=10 pemfile=/usr/local/etc/piler.pem