Skip to content

Commit 74c407c

Browse files
authored
Merge pull request #5 from stackhpc/feature/plugins
Add commonly used tempest plugins into image
2 parents c0a279e + b76003b commit 74c407c

File tree

3 files changed

+26
-28
lines changed

3 files changed

+26
-28
lines changed

Dockerfile

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,18 @@ FROM ubuntu:20.04
22

33
RUN sed -i s/^deb-src.*// /etc/apt/sources.list
44

5+
ARG TEMPEST_SOURCE=https://github.com/openstack/tempest
6+
ARG TEMPEST_VERSION=master
7+
8+
ARG TEMPEST_PLUGIN_OCTAVIA_SOURCE=https://github.com/openstack/octavia-tempest-plugin
9+
ARG TEMPEST_PLUGIN_OCTAVIA_VERSION=master
10+
11+
ARG TEMPEST_PLUGIN_DESIGNATE_SOURCE=https://github.com/openstack/designate-tempest-plugin
12+
ARG TEMPEST_PLUGIN_DESIGNATE_VERSION=master
13+
14+
ARG TEMPEST_PLUGIN_IRONIC_SOURCE=https://github.com/openstack/ironic-tempest-plugin
15+
ARG TEMPEST_PLUGIN_IRONIC_VERSION=master
16+
517
RUN apt-get update && apt-get install --yes sudo python3-dev python3-pip vim git-core crudini jq iputils-ping && \
618
apt clean && \
719
pip3 --no-cache-dir install --upgrade pip setuptools && \
@@ -25,10 +37,12 @@ RUN crudini --set ~/.rally/rally.conf database connection sqlite:////home/rally/
2537

2638
RUN rally db recreate
2739

28-
# Docker volumes have specific behavior that allows this construction to work.
29-
# Data generated during the image creation is copied to volume only when it's
30-
# attached for the first time (volume initialization)
31-
RUN rally verify create-verifier --name default --type tempest
40+
RUN rally verify create-verifier --name default --type tempest --source $TEMPEST_SOURCE --version $TEMPEST_VERSION
41+
42+
# For simplicitiy, always install common extensions
43+
RUN rally verify add-verifier-ext --source $TEMPEST_PLUGIN_OCTAVIA_SOURCE --version $TEMPEST_PLUGIN_OCTAVIA_VERSION
44+
RUN rally verify add-verifier-ext --source $TEMPEST_PLUGIN_DESIGNATE_SOURCE --version $TEMPEST_PLUGIN_DESIGNATE_VERSION
45+
RUN rally verify add-verifier-ext --source $TEMPEST_PLUGIN_IRONIC_SOURCE --version $TEMPEST_PLUGIN_IRONIC_VERSION
3246

3347
COPY bin/rally-verify-wrapper.sh /usr/bin/rally-verify-wrapper.sh
3448
COPY bin/rally-extract-tests.sh /usr/bin/rally-extract-tests.sh

bin/rally-normalize.py

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -74,15 +74,14 @@ def _form_test_id_mappings(self, test_list):
7474
"""
7575
test_mappings = {}
7676
for testcase in test_list:
77-
if testcase.startswith("tempest"):
78-
# Search for any strings like '[smoke, gate]' in the test ID.
79-
match = re.search('(\[.*\])', testcase)
80-
81-
if match:
82-
testcase = re.sub('\[.*\]', '', testcase)
83-
test_mappings[testcase] = match.group(1)
84-
else:
85-
test_mappings[testcase] = ""
77+
# Search for any strings like '[smoke, gate]' in the test ID.
78+
match = re.search('(\[.*\])', testcase)
79+
80+
if match:
81+
testcase = re.sub('\[.*\]', '', testcase)
82+
test_mappings[testcase] = match.group(1)
83+
else:
84+
test_mappings[testcase] = ""
8685
return test_mappings
8786

8887
def _get_base_test_ids_from_list_file(self, list_location):

bin/rally-verify-wrapper.sh

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,6 @@
1010
set -eux
1111

1212
artifacts_dir=/home/rally/artifacts
13-
tempest_source_default="--source /opt/tempest"
14-
15-
tempest_source="$tempest_source_default"
16-
if [ ! -z ${TEMPEST_SOURCE:+x} ]; then
17-
tempest_source="--source $TEMPEST_SOURCE"
18-
fi
19-
20-
tempest_version=""
21-
if [ ! -z ${TEMPEST_VERSION:+x} ]; then
22-
tempest_version="--version $TEMPEST_VERSION"
23-
fi
2413

2514
if [ ! -z ${TEMPEST_LOAD_LIST:+x} ]; then
2615
echo "$TEMPEST_LOAD_LIST" > ~/tempest-load-list
@@ -86,10 +75,6 @@ crudini --set ~/.rally/rally.conf openstack flavor_ref_alt_disk 1
8675

8776
rally deployment create --fromenv --name openstack
8877

89-
if [ "$tempest_source" != "$tempest_source_default" ] || [ "$tempest_version" != "" ]; then
90-
rally verify create-verifier --name tempest --type tempest $tempest_source $tempest_version
91-
fi
92-
9378
if [ -f ~/tempest-overrides.conf ]; then
9479
rally verify configure-verifier --reconfigure --extend ~/tempest-overrides.conf
9580
fi

0 commit comments

Comments
 (0)