Add ability to publish test artifacts

This patch adds ability to publish tests artifacts using ssh protocol.

Change-Id: Ieb29f647a0d05309be54b525966cf41a2718a953
This commit is contained in:
Sergey Reshetnyak 2017-01-27 16:32:41 +03:00
parent d45e82fc83
commit 1795ea6890
3 changed files with 31 additions and 0 deletions

View File

@ -14,6 +14,14 @@ configs:
ipv6_subnet_attributes: false
object_storage_feature:
discoverability: false
static:
host: localhost
path: static/
port: 22
private_key: ""
publish: false
site: http://localhost
username: jenkins
volume:
storage_protocol: ceph

View File

@ -2,6 +2,22 @@
set -ex
function publish_artifacts {
local path="{{ rally.tempest.static.path }}"
mkdir -p "${path}"
cp /var/lib/rally/tempest.log "${path}/tempest.log"
rally verify results --output-file "${path}/result.json"
rally verify results --html --output-file "${path}/result.html"
# TODO: add junit report
local private_key_path="private.key"
echo "{{ rally.tempest.static.private_key }}" > "${private_key_path}"
chmod 600 "${private_key_path}"
scp -i "${private_key_path}" "${path}" {{ rally.tempest.static.username }}@{{ rally.tempest.static.host }}:{{ rally.tempest.static.port }}:
echo "Artifacts are located to {{ rally.tempest.static.site }}/${path}"
}
# OS credentials
export OS_AUTH_URL={{ address("keystone", keystone.admin_port, with_scheme=True) }}
export OS_IDENTITY_API_VERSION=3
@ -34,4 +50,8 @@ os_release="{{ rally.tempest.openstack_release }}"
rally verify start --skip-list "/var/lib/rally/${os_release}-skip-list.list"
{% if rally.tempest.static.publish %}
publish_artifacts
{% endif %}
rally verify results | /var/lib/rally/check_status.py

View File

@ -1,3 +1,6 @@
[DEFAULT]
log_file = /var/lib/rally/tempest.log
[compute]
min_microversion = 2.1
{% if rally.tempest.openstack_release == "mitaka" %}