Skip to content

Commit 0067a65

Browse files
committed
Merge branch 'release-29' into python-3
2 parents 601a471 + 275411e commit 0067a65

31 files changed

+3910
-202
lines changed

.github/workflows/review-checks.yml

Lines changed: 83 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
- uses: actions/checkout@v1
2828
- name: Install utils
2929
run: |
30-
yum install -y git wget
30+
yum install -y git wget ca-certificates
3131
- name: Fetch Beaker repository
3232
run: |
3333
wget https://beaker-project.org/yum/beaker-server-RedHatEnterpriseLinux.repo -P /etc/yum.repos.d/
@@ -43,3 +43,85 @@ jobs:
4343
name: beaker-docs
4444
path: /home/runner/work/html
4545

46+
integration-tests:
47+
runs-on: ubuntu-latest
48+
env:
49+
MYSQL_USER: beaker
50+
MYSQL_PASSWORD: beaker
51+
MYSQL_ROOT_PASSWORD: toor
52+
strategy:
53+
fail-fast: false
54+
matrix:
55+
test-target: ["bkr.inttest.client", "bkr.inttest.labcontroller", "bkr.inttest.server"]
56+
container:
57+
image: centos:7
58+
services:
59+
database:
60+
image: mariadb:latest
61+
env:
62+
MYSQL_USER: ${{ env.MYSQL_USER }}
63+
MYSQL_PASSWORD: ${{ env.MYSQL_PASSWORD }}
64+
MYSQL_ROOT_PASSWORD: ${{ env.MYSQL_ROOT_PASSWORD }}
65+
ports:
66+
- 3306
67+
steps:
68+
# We have to install git 2.18+ to perform checkout via git
69+
# This is possible only via IUS repositories
70+
- name: Install git to allow checkout
71+
run: |
72+
yum install https://repo.ius.io/ius-release-el7.rpm epel-release -y
73+
yum install git236-core -y
74+
75+
# Do not upgrade to @v4 as node 20 is incompatible with CentOS 7
76+
- name: Checkout
77+
uses: actions/checkout@v3
78+
79+
# Remove custom git from the IUS repository - git will be reinstalled later as it is needed by beaker itself.
80+
- name: Remove git236 and YUM repositories
81+
run: yum remove git236-core ius-release epel-release -y
82+
83+
- name: Add Beaker Server YUM repository
84+
run: |
85+
curl -o /etc/yum.repos.d/beaker-server.repo https://beaker-project.org/yum/beaker-server-RedHatEnterpriseLinux.repo
86+
87+
- name: Install Beaker dependencies
88+
run: |
89+
yum install epel-release mariadb beaker-integration-tests -y
90+
yum-builddep beaker.spec -y
91+
yum remove beaker-common \
92+
beaker-client \
93+
beaker-lab-controller \
94+
beaker-server \
95+
beaker-integration-tests -y
96+
97+
- name: Checkout submodules
98+
run: |
99+
git submodule update --init --recursive
100+
101+
- name: Configure database for testing
102+
run: |
103+
cat <<EOT > init.sql
104+
CREATE DATABASE beaker_test;
105+
CREATE DATABASE beaker_migration_test;
106+
GRANT ALL PRIVILEGES ON beaker_test.* TO 'beaker'@'%';
107+
GRANT ALL PRIVILEGES ON beaker_migration_test.* TO 'beaker'@'%';
108+
SET GLOBAL max_allowed_packet=1073741824;
109+
SET GLOBAL character_set_server=utf8;
110+
EOT
111+
112+
mysql -uroot -p${{ env.MYSQL_ROOT_PASSWORD }} -h database < init.sql
113+
sed -i 's/@localhost/@database/g' IntegrationTests/server-test.cfg
114+
115+
- name: Update version
116+
run: |
117+
# Update the version in common/__init__.py, as this file is used in the application and tests to determine the version
118+
current_version=$(grep -oE "__version__ = '[^']+'" Common/bkr/common/__init__.py | cut -d "'" -f 2)
119+
new_version="$current_version.git.$(git rev-parse --short HEAD)"
120+
sed -i "s/__version__ = '$current_version'/__version__ = '$new_version'/" Common/bkr/common/__init__.py
121+
122+
- name: Run integration tests for ${{ matrix.test-target }}
123+
run: |
124+
pushd IntegrationTests
125+
# Disable Selenium tests until we have plan for selenium driver + firefox
126+
rm -rf src/bkr/inttest/server/selenium
127+
./run-tests.sh -v ${{ matrix.test-target }}

.packit.yaml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,14 @@ jobs:
3131
post-upstream-clone:
3232
# disable broken unit tests
3333
- sed -i '/make check/d' beaker.spec
34-
# disable broken documentation
35-
- sed -i '/^make$/i sed -i s/documentation//g Makefile' beaker.spec
36-
- sed -i '/_mandir/d' beaker.spec
34+
35+
- job: copr_build
36+
trigger: pull_request
37+
metadata:
38+
targets:
39+
- epel-7-x86_64
40+
actions:
41+
post-upstream-clone:
42+
# Use gevent from base repositories during packit builds
43+
# gevent112 is our custom build with some backports to improve socket management
44+
- sed -i 's/python2-gevent112/python-gevent/g' beaker.spec

Client/run-tests.sh

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
1-
#/bin/bash
1+
#!/bin/bash
22

33
set -x
44

5-
# Use Python 2 version if BKR_PY3 is not defined
6-
if [[ -z ${BKR_PY3} ]]; then
7-
pytest_command="py.test-2";
8-
elif [[ ${BKR_PY3} == 1 ]]; then
9-
pytest_command="pytest-3";
5+
# Use nosetests with python2 interpreter
6+
if [[ -z ${BKR_PY3} ]] || [[ ${BKR_PY3} != 1 ]]; then
7+
command="nosetests ${*:--v --traverse-namespace bkr.client.tests}";
108
else
11-
pytest_command="py.test-2";
9+
command="pytest-3";
1210
fi
1311

14-
env PYTHONPATH=../Client/src:../Common${PYTHONPATH:+:$PYTHONPATH} \
15-
$pytest_command
12+
env PYTHONPATH=../Client/src:../Common${PYTHONPATH:+:$PYTHONPATH} $command

Client/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def bash_completion_dir():
2222

2323
setup(
2424
name='beaker-client',
25-
version='28.3',
25+
version='29.0rc1',
2626
description='Command-line client for interacting with Beaker',
2727
author='Red Hat, Inc.',
2828
author_email='[email protected]',

Common/bkr/common/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
# code in bkr.__init__), the version details are retrieved from here in
33
# order to correctly handle module shadowing on sys.path
44

5-
__version__ = '28.3'
5+
__version__ = '29.0rc1'

Common/bkr/common/schema/beaker-job.rng

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -589,6 +589,15 @@ the Free Software Foundation; either version 2 of the License, or
589589
</a:documentation>
590590
<attribute name="url"/>
591591
</element>
592+
<optional>
593+
<element name="image">
594+
<a:documentation xml:lang="en">
595+
Location of the installer netboot image. May be specified as
596+
an absolute URL or as a path relative to the installation tree URL.
597+
</a:documentation>
598+
<attribute name="url"/>
599+
</element>
600+
</optional>
592601
<element name="arch">
593602
<a:documentation xml:lang="en">
594603
CPU architecture that the distro is built for.

Common/run-tests.sh

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,11 @@
22

33
set -x
44

5-
# Use Python 2 version if BKR_PY3 is not defined
6-
if [[ -z ${BKR_PY3} ]]; then
7-
pytest_command="py.test-2";
8-
elif [[ ${BKR_PY3} == 1 ]]; then
9-
pytest_command="pytest-3";
5+
# Use nosetests with python2 interpreter
6+
if [[ -z ${BKR_PY3} ]] || [[ ${BKR_PY3} != 1 ]]; then
7+
command="nosetests ${*:--v bkr}";
108
else
11-
pytest_command="py.test-2";
9+
command="pytest-3";
1210
fi
1311

14-
env PYTHONPATH=../Client/src:../Common${PYTHONPATH:+:$PYTHONPATH} \
15-
$pytest_command
12+
env PYTHONPATH=../Client/src:../Common${PYTHONPATH:+:$PYTHONPATH} $command

Common/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
setup(
1414
name='beaker-common',
15-
version='28.3',
15+
version='29.0rc1',
1616
description='Common components for Beaker packages',
1717
author='Red Hat, Inc.',
1818
author_email='[email protected]',

IntegrationTests/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ def get_compose_layout():
1212

1313
setup(
1414
name='beaker-integration-tests',
15-
version='28.3',
15+
version='29.0rc1',
1616
description='Integration tests for Beaker',
1717
author='Red Hat, Inc.',
1818
author_email='[email protected]',

0 commit comments

Comments
 (0)