Skip to content

Commit

Permalink
Merge branch 'refs/heads/master' into stable
Browse files Browse the repository at this point in the history
# Conflicts:
#	modules/plugins/fbplugin-impl/pom.xml
#	modules/plugins/fbplugin-impl5/pom.xml
#	modules/plugins/fbplugin/pom.xml
#	modules/plugins/procedure-parser/pom.xml
#	modules/plugins/sql-parser/pom.xml
#	modules/plugins/sqlLexer/pom.xml
#	modules/plugins/trace-parser/pom.xml
#	modules/redexpert/pom.xml
#	pom.xml
#	src/org/executequery/eq.system.properties
#	src/org/executequery/release_notes_en.html
#	src/org/executequery/release_notes_ru.html
  • Loading branch information
aleksey.kozlov committed Jul 23, 2024
2 parents 5f295b1 + e636a01 commit f449a64
Show file tree
Hide file tree
Showing 1,249 changed files with 21,390 additions and 67,953 deletions.
59 changes: 45 additions & 14 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ build_docs:

build:linux:
extends: .build_template
image: ${BUILD_IMAGE}
image: oraclelinux:7
tags:
- docker
- builder
Expand All @@ -123,6 +123,7 @@ build:linux:
MAVEN_VERSION: 3.9.3
M2_HOME: /opt/apache-maven-${MAVEN_VERSION}/
QMAKE: qmake-qt4
ARCH: x86_64
DIST: ${CI_PROJECT_DIR}/dist/linux-${ARCH}
before_script:
- yum -y update
Expand Down Expand Up @@ -154,12 +155,6 @@ build:linux:
- mv modules/redexpert/target/red_expert.png "${DIST}"
- mv modules/redexpert/target/RedExpert.jar "${DIST}"
- ./ci/build_installer.sh
parallel:
matrix:
- BUILD_IMAGE: oraclelinux:7
ARCH: x86_64
- BUILD_IMAGE: i386/centos:7
ARCH: x86

build:windows:
extends: .build_template
Expand Down Expand Up @@ -232,7 +227,7 @@ test:windows:
DIST: ${CI_PROJECT_DIR}\dist\windows-${ARCH}
PYTHON: c:\Python38\python.exe
WORKSPACE: ${CI_PROJECT_DIR}
DISTRO: red-expert-tests
DISTRO: windows-lackey
parallel:
matrix:
- TEST_TYPE: core
Expand All @@ -243,8 +238,7 @@ test:windows:
- cd $TEST_DIR
- unzip -q ${CI_PROJECT_DIR}\dist-src\RedExpert-$env:VERSION-src.zip
- cd $TEST_DIR\RedExpert-$env:VERSION\ci
- start-process "${PYTHON}" "-m pip install beautifulsoup4" -wait -nonewwindow
- start-process "${PYTHON}" ".\download_dbms.py ${DBMS} ${ARCH}" -wait -nonewwindow
- start-process "${PYTHON}" ".\download_dbms.py ${DBMS} ${ARCH} windows" -wait -nonewwindow
- powershell -ExecutionPolicy ByPass -file install_dbms.ps1
script:
- cd $TEST_DIR\RedExpert-$env:VERSION\ci
Expand All @@ -270,7 +264,7 @@ test:windows-robot:
DIST: ${CI_PROJECT_DIR}\dist\windows-${ARCH}
PYTHON: c:\Python38\python.exe
WORKSPACE: ${CI_PROJECT_DIR}
DISTRO: red-expert-robot-tests
DISTRO: windows-robot
parallel:
matrix:
- TEST_TYPE: core
Expand All @@ -281,8 +275,7 @@ test:windows-robot:
- cd $TEST_DIR
- unzip -q ${CI_PROJECT_DIR}\dist-src\RedExpert-$env:VERSION-src.zip
- cd $TEST_DIR\RedExpert-$env:VERSION\ci
- start-process "${PYTHON}" "-m pip install beautifulsoup4" -wait -nonewwindow
- start-process "${PYTHON}" ".\download_dbms.py ${DBMS} ${ARCH}" -wait -nonewwindow
- start-process "${PYTHON}" ".\download_dbms.py ${DBMS} ${ARCH} windows" -wait -nonewwindow
- powershell -ExecutionPolicy ByPass -file install_dbms.ps1
script:
- cd $TEST_DIR\RedExpert-$env:VERSION\ci
Expand All @@ -296,6 +289,44 @@ test:windows-robot:
- $CONTEXT == "commit" && $ARCH == "x86_64" && $DBMS == "rdb50"
- $CONTEXT == "commit" && $ARCH == "x86_64" && $DBMS == "rdb30"

test:linux-robot:
extends: .test_template
tags:
- gui
- linux
- red_expert
- tester
variables:
PROXMOX_TEMPLATE: template-testing-re-ubuntu-20
ErrorActionPreference: STOP
DIST: ${CI_PROJECT_DIR}/dist/linux-${ARCH}
PYTHON: /usr/bin/python3
WORKSPACE: ${CI_PROJECT_DIR}
DISTRO: linux-robot
parallel:
matrix:
- TEST_TYPE: core
ARCH: ["x86_64"]
DBMS: ["rdb30", "rdb50"]
before_script:
- cd ${CI_PROJECT_DIR}
- tar xf ${CI_PROJECT_DIR}/dist-src/RedExpert-$VERSION-src.tar.gz
- cd RedExpert-$VERSION
- $PYTHON ./ci/download_dbms.py ${DBMS} ${ARCH} linux
- chmod +x ./ci/install_dbms.sh
- ./ci/install_dbms.sh
script:
- chmod +x ./ci/test_robot.sh
- ./ci/test_robot.sh
dependencies: ["prepare", "sources", "build:linux"]
needs: ["prepare", "sources", "build:linux"]
timeout: 2 hours
only:
variables:
- ($CONTEXT == "weekly" || $CI_COMMIT_TAG) && $TEST_TYPE == "core"
- $CONTEXT == "commit" && $ARCH == "x86_64" && $DBMS == "rdb50"
- $CONTEXT == "commit" && $ARCH == "x86_64" && $DBMS == "rdb30"

repackage:
tags:
- docker
Expand All @@ -306,7 +337,7 @@ repackage:
before_script:
- apk --update add bash tar zip
script:
- ./ci/repackage.sh linux-x86_64 linux-x86 windows-x86_64 windows-x86
- ./ci/repackage.sh linux-x86_64 windows-x86_64 windows-x86
artifacts:
expire_in: 1 day
paths:
Expand Down
1 change: 0 additions & 1 deletion ci/artifacts.m4
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ artifact installer VERSION
file dist/unified/RedExpert-VERSION-installer-windows-x86_64.exe windows-x64.exe
file dist/unified/RedExpert-VERSION-installer-windows-x86.exe windows-x86.exe
file dist/unified/RedExpert-VERSION-installer-linux-x86_64.bin linux-x64.bin
file dist/unified/RedExpert-VERSION-installer-linux-x86.bin linux-x86.bin
end

artifact src VERSION
Expand Down
13 changes: 8 additions & 5 deletions ci/download_dbms.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import re
import bs4
import requests
import sys
import urllib.request
Expand All @@ -8,18 +7,22 @@

DBMS = args[1]
ARCH = args[2]
OS = args[3]


print("Download DBMS")

if "rdb" in DBMS:
os = OS
bin = "bin" if os == "linux" else "exe"

if DBMS == "rdb30":
last_stable_version = "3.0.15-rc.1"
last_stable_version = "3.0.15"

if DBMS == "rdb50":
last_stable_version = "5.0.0-Beta7"
last_stable_version = "5.0.0-rc.2"

url = f"http://builds.red-soft.biz/release_hub/{DBMS}/{last_stable_version}/download/red-database:windows-x86_64-enterprise:{last_stable_version}:exe"
url = f"http://builds.red-soft.biz/release_hub/{DBMS}/{last_stable_version}/download/red-database:{os}-x86_64-enterprise:{last_stable_version}:{bin}"

else:
if ARCH == "x86_64":
Expand All @@ -41,4 +44,4 @@
if url != "":
break

urllib.request.urlretrieve(url, 'installer.exe')
urllib.request.urlretrieve(url, f'installer.{bin}')
22 changes: 22 additions & 0 deletions ci/install_dbms.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/bash
set -e
set -x

echo "Install and run DBMS"

function die()
{
echo "$1"
exit 1
}

echo "Installing"
chmod +x ./installer.bin
./installer.bin --mode unattended --sysdba_password masterkey --architecture Super || die "Unable to install server"


echo "Starting guardian"
PIDDIR=/var/run/reddatabase/
PIDFILE=$PIDDIR/default.pid
mkdir -p "$PIDDIR"
/opt/RedDatabase/bin/rdbguard -daemon -guardpidfile $PIDFILE
2 changes: 1 addition & 1 deletion ci/test.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ if (-Not (Test-Path env:\DBMS)) { die("DBMS not defined") }
$DBMS=$env:DBMS

echo "Downloading tests"
git clone -q http://git.red-soft.biz/red-database/re-tests.git
git clone -q http://git.red-soft.biz/red-database/re-tests.git -b new_ui
git clone -q http://git.red-soft.biz/red-database/python/lackey.git

echo "Installing components"
Expand Down
2 changes: 1 addition & 1 deletion ci/test_robot.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ start-process "${PYTHON}" "-m robot -x results.xml .\tests" -wait -nonewwindow
echo "Copy test results"
if (Test-Path "results.xml") {
mkdir "${WORKSPACE}\test-results\"
copy "results.xml" "${WORKSPACE}\test-results\robot-${DISTRO}-${DBMS}-${ARCH}.xml"
copy "results.xml" "${WORKSPACE}\test-results\${DISTRO}-${DBMS}-${ARCH}.xml"
}
else
{
Expand Down
43 changes: 43 additions & 0 deletions ci/test_robot.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
#!/bin/bash
set -e
set -x


function die()
{
echo "$1"
exit 1
}

function check_variable()
{
eval val='$'$1
[ "$val" != "" ] || die "$1 not defined"
}

check_variable ARCH
check_variable WORKSPACE
check_variable DISTRO
check_variable PYTHON
check_variable DBMS

echo "Downloading tests"
git clone -q http://git.red-soft.biz/red-database/re-tests-robot

echo "Installing components"
$PYTHON -m pip install git+http://git.red-soft.biz/red-database/python/red-database-python-driver.git
$PYTHON -m pip install robotframework

export PYTHONPATH=$PYTHONPATH:/root/remoteswinglibrary-2.3.3.jar
export DISPLAY=:0
su reduser -c 'xhost +'

echo "Start testing"
cd re-tests-robot
$PYTHON -m robot -x results.xml --nostatusrc ./tests

echo "Copy test results"
mkdir "${WORKSPACE}/test-results/"
cp results.xml "${WORKSPACE}/test-results/${DISTRO}-${DBMS}-${ARCH}.xml"
cp log.html "${WORKSPACE}/test-results/${DISTRO}-${DBMS}-${ARCH}-log.html"
cp report.html "${WORKSPACE}/test-results/${DISTRO}-${DBMS}-${ARCH}-report.html"
Loading

0 comments on commit f449a64

Please sign in to comment.