Commit 7ef07cb8 authored by Eugene's avatar Eugene

jenkins: cleanup and updates for new cloud Jenkins instance :)

parent e46c2dc4
<?php
$JOBNAME = basename(dirname(dirname(__DIR__)));
$JOBNAME = getenv('JOB_NAME');
$cfg = new stdClass();
......@@ -11,9 +11,9 @@ $cfg->dbtype = 'postgres';
$cfg->dbhost = 'localhost';
$cfg->dbuser = 'jenkins';
$cfg->dbname = $JOBNAME;
$cfg->dbpass = 'huds13!';
$cfg->dbpass = 'Sei2ZaRi';
$cfg->dataroot = "/var/lib/jenkins/sitedata/{$JOBNAME}";
$cfg->dataroot = "/var/lib/jenkins/mahara/sitedata/{$JOBNAME}";
$cfg->sendemail = true;
$cfg->sendallemailto = 'never@example.com';
......@@ -23,9 +23,8 @@ $cfg->perftofoot = true;
// Behat config
$cfg->dbprefix = ''; // Behat complains without this
$cfg->wwwroot = "http://127.0.0.1/{$JOBNAME}";
$cfg->wwwroot = "http://127.0.0.1";
$cfg->behat_dbprefix = 'behat_'; // must not empty
$cfg->behat_dataroot = "/var/lib/jenkins/sitedata/behat_{$JOBNAME}";
$cfg->behat_wwwroot = "http://{$JOBNAME}.localhost:8000";
$cfg->behat_dataroot = "/var/lib/jenkins/mahara/sitedata/behat_{$JOBNAME}";
$cfg->behat_wwwroot = "http://localhost:8000";
unset($JOBNAME);
......@@ -23,12 +23,12 @@ echo ""
echo "########## Run install"
echo ""
dropdb $JOB_NAME
rm -Rf $HOME/elearning/sitedata/$JOB_NAME/*
rm -Rf $HOME/elearning/sitedata/behat_$JOB_NAME/*
rm -Rf $HOME/mahara/sitedata/$JOB_NAME/*
rm -Rf $HOME/mahara/sitedata/behat_$JOB_NAME/*
createdb -O jenkins -E utf8 $JOB_NAME
cd htdocs
cp /home/catadmin/mahara_config.php config.php
cp $HOME/mahara/mahara_config.php config.php
php admin/cli/install.php --adminpassword='password' --adminemail=never@example.com
cd ..
......@@ -49,14 +49,5 @@ echo ""
echo "########## Run Behat"
echo ""
# ensure selenium server is running
if ! [[ `ps aux | grep "[s]elenium-server-standalone"` ]]
then
currentdisplay=$DISPLAY
export DISPLAY=:10
# we want to run selenium headless on a different display - this allows for that ;)
echo "Starting Xvfb ..."
Xvfb :10 -ac > /dev/null 2>&1 & echo "PID [$!]"
fi
test/behat/mahara_behat.sh run
Markdown is supported
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