mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Add basic CI runner scripts for Jenkins
This commit is contained in:
11
ci/build_docs.sh
Normal file
11
ci/build_docs.sh
Normal file
@@ -0,0 +1,11 @@
|
||||
#!/bin/sh
|
||||
|
||||
echo "################################################################################"
|
||||
echo "Building docs..."
|
||||
echo "################################################################################"
|
||||
echo
|
||||
|
||||
. $WORKSPACE/pgadmin-venv/bin/activate
|
||||
$WORKSPACE/pgadmin-venv/bin/pip install Sphinx==1.4.9
|
||||
cd $WORKSPACE/
|
||||
make docs
|
||||
11
ci/build_runtime_qt4.sh
Normal file
11
ci/build_runtime_qt4.sh
Normal file
@@ -0,0 +1,11 @@
|
||||
#!/bin/sh
|
||||
|
||||
echo "################################################################################"
|
||||
echo "Building runtime - QT4..."
|
||||
echo "################################################################################"
|
||||
echo
|
||||
|
||||
cd $WORKSPACE/runtime
|
||||
make clean
|
||||
PATH=/usr/local/python-$PYTHON_VERSION/bin:$PATH /bin/qmake-qt4
|
||||
make all
|
||||
11
ci/build_runtime_qt5.sh
Normal file
11
ci/build_runtime_qt5.sh
Normal file
@@ -0,0 +1,11 @@
|
||||
#!/bin/sh
|
||||
|
||||
echo "################################################################################"
|
||||
echo "Building runtime - QT5..."
|
||||
echo "################################################################################"
|
||||
echo
|
||||
|
||||
make clean
|
||||
cd $WORKSPACE/runtime
|
||||
PATH=/usr/local/python-$PYTHON_VERSION/bin:$PATH /bin/qmake-qt5 DEFINES+=PGADMIN4_USE_WEBKIT
|
||||
make all
|
||||
15
ci/create_config.sh
Normal file
15
ci/create_config.sh
Normal file
@@ -0,0 +1,15 @@
|
||||
#!/bin/sh
|
||||
|
||||
echo "################################################################################"
|
||||
echo "Creating pgAdmin configuration..."
|
||||
echo "################################################################################"
|
||||
echo
|
||||
|
||||
cp $JENKINS_HOME/pgadmin-configs/config_local.py $WORKSPACE/web/config_local.py
|
||||
echo LOG_FILE = \"$WORKSPACE/var/pgadmin4.log\" >> $WORKSPACE/web/config_local.py
|
||||
echo SESSION_DB_PATH = \"$WORKSPACE/var/sessions\" >> $WORKSPACE/web/config_local.py
|
||||
echo STORAGE_DIR = \"$WORKSPACE/var/storage\" >> $WORKSPACE/web/config_local.py
|
||||
echo SQLITE_PATH = \"$WORKSPACE/var/pgadmin4.db\" >> $WORKSPACE/web/config_local.py
|
||||
echo TEST_SQLITE_PATH = \"$WORKSPACE/var/pgadmin4.db\" >> $WORKSPACE/web/config_local.py
|
||||
|
||||
cp $JENKINS_HOME/pgadmin-configs/test_config.json $WORKSPACE/web/regression/test_config.json
|
||||
10
ci/run_jasmine_tests.sh
Normal file
10
ci/run_jasmine_tests.sh
Normal file
@@ -0,0 +1,10 @@
|
||||
#!/bin/sh
|
||||
|
||||
echo "################################################################################"
|
||||
echo "Executing jasmine tests..."
|
||||
echo "################################################################################"
|
||||
echo
|
||||
|
||||
cd $WORKSPACE/web/
|
||||
/bin/npm install
|
||||
./node_modules/.bin/karma start --single-run
|
||||
34
ci/run_python_tests.sh
Normal file
34
ci/run_python_tests.sh
Normal file
@@ -0,0 +1,34 @@
|
||||
#!/bin/sh
|
||||
|
||||
echo "################################################################################"
|
||||
echo "Starting virtual frame buffer..."
|
||||
echo "################################################################################"
|
||||
echo
|
||||
|
||||
Xvfb -ac :99 -screen 0 1280x1024x16 &
|
||||
FB_PID=$!
|
||||
export DISPLAY=:99
|
||||
|
||||
echo "################################################################################"
|
||||
echo "Creating Python ${PYTHON_VERSION} virtual environment..."
|
||||
echo "################################################################################"
|
||||
echo
|
||||
|
||||
/usr/bin/virtualenv -p /usr/local/python-$PYTHON_VERSION/bin/python $WORKSPACE/pgadmin-venv
|
||||
. $WORKSPACE/pgadmin-venv/bin/activate
|
||||
$WORKSPACE/pgadmin-venv/bin/pip install -r requirements.txt
|
||||
$WORKSPACE/pgadmin-venv/bin/pip install -r web/regression/requirements.txt
|
||||
|
||||
echo "################################################################################"
|
||||
echo "Executing regression tests..."
|
||||
echo "################################################################################"
|
||||
echo
|
||||
|
||||
$WORKSPACE/pgadmin-venv/bin/python $WORKSPACE/web/regression/runtests.py --exclude feature_tests
|
||||
|
||||
echo "################################################################################"
|
||||
echo "Cleaning up..."
|
||||
echo "################################################################################"
|
||||
echo
|
||||
|
||||
kill $FB_PID
|
||||
Reference in New Issue
Block a user