From ac1637f281d320ef727c23eef135d332ee6eb8cd Mon Sep 17 00:00:00 2001 From: Dave Page Date: Fri, 31 Mar 2017 12:17:34 -0400 Subject: [PATCH] Make sure each build/test starts in the correct directory. --- ci/build_docs.sh | 3 ++- ci/build_pip_wheel.sh | 3 ++- ci/build_runtime_qt4.sh | 1 + ci/build_runtime_qt5.sh | 1 + ci/build_tarballs.sh | 2 ++ ci/ci_runner.sh | 17 ----------------- ci/create_config.sh | 2 ++ ci/run_jasmine_tests.sh | 1 + ci/run_python_tests.sh | 2 ++ ci/update_messages.sh | 3 ++- 10 files changed, 15 insertions(+), 20 deletions(-) diff --git a/ci/build_docs.sh b/ci/build_docs.sh index 20a39bb7f..6b5ff8327 100755 --- a/ci/build_docs.sh +++ b/ci/build_docs.sh @@ -5,6 +5,8 @@ echo "Building docs..." echo "################################################################################" echo +cd $WORKSPACE + . $WORKSPACE/pgadmin-venv/bin/activate SPHINX_VER="" @@ -14,5 +16,4 @@ fi $WORKSPACE/pgadmin-venv/bin/pip install Sphinx$SPHINX_VER -cd $WORKSPACE/ make docs diff --git a/ci/build_pip_wheel.sh b/ci/build_pip_wheel.sh index 207695bb6..3bf6b8603 100755 --- a/ci/build_pip_wheel.sh +++ b/ci/build_pip_wheel.sh @@ -5,6 +5,8 @@ echo "Building PIP wheel..." echo "################################################################################" echo +cd $WORKSPACE + . $WORKSPACE/pgadmin-venv/bin/activate SPHINX_VER="" @@ -14,5 +16,4 @@ fi $WORKSPACE/pgadmin-venv/bin/pip install Sphinx$SPHINX_VER -cd $WORKSPACE/ make pip \ No newline at end of file diff --git a/ci/build_runtime_qt4.sh b/ci/build_runtime_qt4.sh index 7f3134bda..12eeef513 100755 --- a/ci/build_runtime_qt4.sh +++ b/ci/build_runtime_qt4.sh @@ -6,6 +6,7 @@ echo "########################################################################## echo cd $WORKSPACE/runtime + make clean PATH=/usr/local/python-$PYTHON_VERSION/bin:$PATH /bin/qmake-qt4 make all diff --git a/ci/build_runtime_qt5.sh b/ci/build_runtime_qt5.sh index d907ae5b7..d7856515b 100755 --- a/ci/build_runtime_qt5.sh +++ b/ci/build_runtime_qt5.sh @@ -6,6 +6,7 @@ echo "########################################################################## echo cd $WORKSPACE/runtime + make clean PATH=/usr/local/python-$PYTHON_VERSION/bin:$PATH /bin/qmake-qt5 DEFINES+=PGADMIN4_USE_WEBKIT make all diff --git a/ci/build_tarballs.sh b/ci/build_tarballs.sh index 5ef49cf7b..3115f66ca 100755 --- a/ci/build_tarballs.sh +++ b/ci/build_tarballs.sh @@ -5,6 +5,8 @@ echo "Building Tarballs..." echo "################################################################################" echo +cd $WORKSPACE + . $WORKSPACE/pgadmin-venv/bin/activate SPHINX_VER="" diff --git a/ci/ci_runner.sh b/ci/ci_runner.sh index a434fbe87..9558aa62f 100755 --- a/ci/ci_runner.sh +++ b/ci/ci_runner.sh @@ -1,27 +1,10 @@ #!/bin/sh -WD=${CWD} - $WORKSPACE/ci/create_config.sh || { echo 'Failed to create the configuration.' ; exit 1; } -cd $WD - $WORKSPACE/ci/run_python_tests.sh || { echo 'Error detected when running the Python tests.' ; exit 1; } -cd $WD - $WORKSPACE/ci/run_jasmine_tests.sh || { echo 'Error detected when running the Jasmine tests.' ; exit 1; } -cd $WD - $WORKSPACE/ci/build_docs.sh || { echo 'Failed to build the documentation.' ; exit 1; } -cd $WD - $WORKSPACE/ci/build_runtime_qt4.sh || { echo 'Failed to build the QT4 runtime.' ; exit 1; } -cd $WD - $WORKSPACE/ci/build_runtime_qt5.sh || { echo 'Failed to build the QT5 runtime.' ; exit 1; } -cd $WD - $WORKSPACE/ci/build_pip_wheel.sh || { echo 'Failed to build the PIP wheel.' ; exit 1; } -cd $WD - $WORKSPACE/ci/build_tarballs.sh || { echo 'Failed to build the tarballs.' ; exit 1; } -cd $WD \ No newline at end of file diff --git a/ci/create_config.sh b/ci/create_config.sh index 6ece7c2ae..14d4004e0 100755 --- a/ci/create_config.sh +++ b/ci/create_config.sh @@ -5,6 +5,8 @@ echo "Creating pgAdmin configuration..." echo "################################################################################" echo +cd $WORKSPACE + 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 diff --git a/ci/run_jasmine_tests.sh b/ci/run_jasmine_tests.sh index ac334e631..973fa36f1 100755 --- a/ci/run_jasmine_tests.sh +++ b/ci/run_jasmine_tests.sh @@ -6,5 +6,6 @@ echo "########################################################################## echo cd $WORKSPACE/web/ + /bin/npm install ./node_modules/.bin/karma start --single-run diff --git a/ci/run_python_tests.sh b/ci/run_python_tests.sh index 007fa9402..12cabc7fa 100755 --- a/ci/run_python_tests.sh +++ b/ci/run_python_tests.sh @@ -14,6 +14,8 @@ echo "Creating Python ${PYTHON_VERSION} virtual environment..." echo "################################################################################" echo +cd $WORKSPACE/ + PYTHON_SUFFIX="" if [[ "$PYTHON_VERSION" == 3* ]]; then diff --git a/ci/update_messages.sh b/ci/update_messages.sh index 539b71ded..8bccabe53 100755 --- a/ci/update_messages.sh +++ b/ci/update_messages.sh @@ -5,9 +5,10 @@ echo "Extracting, merging and compiling strings..." echo "################################################################################" echo -. $WORKSPACE/pgadmin-venv/bin/activate cd $WORKSPACE/web +. $WORKSPACE/pgadmin-venv/bin/activate + pybabel extract -F babel.cfg -o pgadmin/messages.pot pgadmin || { echo 'Failed to extract messages from the source code.' ; exit 1; } pybabel update -i pgadmin/messages.pot -d pgadmin/translations || { echo 'Failed to update message catalogs from the template.' ; exit 1; }