Commit 440cd2b9 authored by Steven Murray's avatar Steven Murray
Browse files

Added CI job dbunittests_mysql to .gitlab-ci.yml

parent b6bd1515
......@@ -163,6 +163,40 @@ dbunittests_postgresql:
tags:
- docker
dbunittests_mysql:
except:
- tags
stage: test
variables:
CTAREPODIR: /tmp/repo
image: gitlab-registry.cern.ch/linuxsupport/cc7-base
script:
- cp -f continuousintegration/docker/ctafrontend/cc7/etc/yum.repos.d/* /etc/yum.repos.d/
- yum -y install yum-plugin-priorities createrepo
- cp -f continuousintegration/docker/ctafrontend/cc7/etc/yum/pluginconf.d/versionlock.list /etc/yum/pluginconf.d/
- mkdir -p ${CTAREPODIR}; cp -r build_rpm/RPM ${CTAREPODIR}
- createrepo ${CTAREPODIR}; echo -e "[cta-artifacts]\nname=CTA artifacts\nbaseurl=file://${CTAREPODIR}\ngpgcheck=0\nenabled=1\npriority=2" > /etc/yum.repos.d/cta-artifacts.repo
- yum -y --nogpgcheck install cta-systemtests cta-debuginfo sqlite-debuginfo --enablerepo=debug
- yum -y install cta-catalogueutils
- yum -y install lsof mariadb-server
- echo '[mariadb]' > /etc/my.cnf.d/cta_server_listen.cnf
- echo 'bind-address=localhost' >> /etc/my.cnf.d/cta_server_listen.cnf
- mysql_install_db --user=mysql
- /usr/bin/mysqld_safe > /dev/null 2>&1 < /dev/null &
- sleep 5
- echo 'create database cta;' | mysql
- echo 'create user cta;' | mysql
- echo 'grant all privileges on *.* to cta@localhost' | mysql
- CTA_CATALOGUE_CONF=/etc/cta/cta-catalogue.conf
- echo CTA_CATALOGUE_CONF=${CTA_CATALOGUE_CONF}
- echo 'mysql://cta@localhost:3306/cta' > ${CTA_CATALOGUE_CONF}
- /usr/bin/cta-catalogue-schema-create ${CTA_CATALOGUE_CONF}
- /usr/bin/cta-rdbmsUnitTests ${CTA_CATALOGUE_CONF}
- kill `ps -ef | egrep '^mysql.*/usr/libexec/mysqld' | awk '{print $2;}'`
tags:
- docker
ctageneric_docker:
except:
- tags
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment