Skip to content
Snippets Groups Projects
Commit 02faafc4 authored by Patrick Barroca's avatar Patrick Barroca :grin:
Browse files

dev #53508 try to run ci in docker

parent 8ab70994
Branches
Tags
4 merge requests!2080Sandbox detach zf from storm,!2061Master,!1997Dev#53508 ci with docker,!1917[WIP] Hotline#50082 mixed records links in loans list
Pipeline #201 failed with stage
in 2 minutes and 59 seconds
variables:
DBNAME: "bokeh_build_${CI_BUILD_REF}"
DBUSER: root
DBPASS: root
MYSQL_DATABASE: "bokeh_build_${CI_BUILD_REF}"
MYSQL_ROOT_PASSWORD: root
test:
before_script:
- bash scripts/docker_install.sh $MYSQL_DATABASE
test:php5_latest:
image: php:5
script:
- wget http://sandbox.afi-sa.net/databases/default-ci-dump.sql.gz -O default-ci-dump.sql.gz
- mysql -u$DBUSER -p$DBPASS -e "drop schema if exists ${DBNAME}; create schema ${DBNAME}"
- zcat default-ci-dump.sql.gz | mysql -u$DBUSER -p$DBPASS $DBNAME
- mysql -u$DBUSER -p$DBPASS -e "drop trigger if exists ${DBNAME}.datemaj_notices_update;update mysql.proc set definer='${DBUSER}@localhost' where db='${DBNAME}'"
- nice -n 15 bash build.sh $DBNAME $DBUSER $DBPASS
- mysql -u$DBUSER -p$DBPASS -e "drop schema if exists ${DBNAME}"
\ No newline at end of file
- bash build.sh $MYSQL_DATABASE root root
except:
- tags
tags:
- docker
\ No newline at end of file
#!/bin/bash
# We need to install dependencies only for Docker
[[ ! -e /.dockerenv ]] && exit 0
set -xe
# Install phpunit, the tool that we will use for testing
curl --location --output /usr/local/bin/phpunit https://phar.phpunit.de/phpunit.phar
chmod +x /usr/local/bin/phpunit
# required php extensions not included in base php image
docker-php-ext-install mysqli
docker-php-ext-install mcrypt
docker-php-ext-install libxml
docker-php-ext-install dom
docker-php-ext-install gettext
# data preparation
wget http://sandbox.afi-sa.net/databases/default-ci-dump.sql.gz -O default-ci-dump.sql.gz
mysql -h mysql -uroot -proot -e "drop schema if exists $1; create schema $1"
zcat default-ci-dump.sql.gz | mysql -h mysql -uroot -proot $1
mysql -h mysql -uroot -proot -e "drop trigger if exists $1.datemaj_notices_update;update mysql.proc set definer='root@localhost' where db='$1'"
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