-
Notifications
You must be signed in to change notification settings - Fork 7
/
jenkins-config.yml
106 lines (98 loc) · 3.55 KB
/
jenkins-config.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
# This file is used by the jenkins job
# read: 'How it works' section at the bottom
### config template ###
# test_env: # top-level namespace used by khaleesi
# env_name: # test config
# Distro-Version: # test configuration for the distro-version
# | setup: # how the testbed VM needs to be setup
# | ' repos: # add the following repos
# | ' - filename: repo-name.repo
# | ' contents: |
# | ' [section]
# | ' contents
# | ' of
# | ' Repo
#
# | ' install: # install the following rpm and
# | ' - rpm-abc # ensure latest is installed
# | ' - rpm-foo
# | ' - rpm-bar
#
# | ' remove: # delete the following rpms
# | ' - rpm-foo
# | ' - rpm-bar
# | ' - rpm-baz
# | ' pip: # use virtualenv --system-site-packages to
# | ' overrides: # override system packages
# | ' - pip-pkg-foo
# | ' - pip-pkg-foo
#
# | run: > # how tests should be run
# | run_command; another_command;
# | ./run_tests.sh -N -P # all but last statement should terminated by ;
#
# | archive: # what files to archive
# | - nosetest.xml
#
# NOTE: there must be a env_name: called virt: which will be used to run tests
# in virtualenv when running tests in env_name fails
product:
name: rhos
repo_type: poodle
version: 7
full_version: 7.0
config:
enable_epel: y
rpmrepo:
RedHat: http://rhos-release.virt.bos.redhat.com/repos/rhos-release/
python_rdomanager_oscplugin_rpm_deps: [
gcc, git, python-sphinx, python-tox, python-pip,
libxml2-devel, libxslt-devel, libffi-devel, openssl-devel,
]
rdomanager_oscplugin_virt_config:
setup:
install: "{{python_rdomanager_oscplugin_rpm_deps}}"
run: >
sudo rm -Rf .tox || true;
sudo pip install -U unittest2;
export NOSE_WITH_XUNIT=1;
export NOSE_WITH_HTML_OUTPUT=1;
export NOSE_HTML_OUT_FILE=../logs/nose_results.html;
export NSS_HASH_ALG_SUPPORT=+MD5;
export OPENSSL_ENABLE_MD5_VERIFY=1;
rpm -qa > all-rpms.txt;
set -o pipefail;
tox --sitepackages -v -epy27 2>&1 | tee ../logs/venv-testrun.log;
archive:
- ../logs/venv-testrun.log
- tox.ini
- requirements.txt
- all-rpms.txt
### actual test_config: starts here: used by khaleesi ###
### NOTE: test_config.virt must be defined ###
test_config:
virt:
Fedora-20: "{{rdomanager_oscplugin_virt_config}}"
RedHat-7.0: "{{rdomanager_oscplugin_virt_config}}"
RedHat-7.1: "{{rdomanager_oscplugin_virt_config}}"
# How this works!
# ==============
# This file is used by khaleesi[1] playbook unit_test.yml[2].
# - The jenkins job checks out khaleesi, settings and this repo and
# runs unit_test.yml playbook.
# - The playbook reads this config file and
# - adds repos in test_dependencies.rpm.repos
# - installs all packages in test_dependencies.rpm.install
# - removes all packages in test_dependencies.rpm.remove
# - it then runs the test by executing the command specfied in
# test_env.run NOTE all commands should terminate with a ';'
# - if tests fail, the same is run in venv with pip packages.
#
# PIP overrides
# -------------
# When there is no corresponding rpm for a pip package, you can override that
# particular package using the pip.override section. When you do so, make sure
# the packaging team is notified about the new requirement.
#
# [1] https://github.com/redhat-openstack/khaleesi
# [2] https://github.com/redhat-openstack/khaleesi/blob/master/playbooks/unit_test.yml