blob: 8f3db551f73597daa34b650224a0b515add2f0e9 (
plain)
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
|
---
{% set attack_host = attack_host or '' %}
{% set attack_process = attack_process or '' %}
{% set validate_testcase = validate_testcase or '' %}
{% set testcase = testcase or '' %}
{% set os_insecure = os_insecure or 'False' %}
{% set os_verify = '' %}
{% if os_insecure == 'True' %}
{% set os_verify = ' -e OS_VERIFY= ' %}
{% endif %}
{% set dovetail_home = dovetail_home or '' %}
{% set debug = debug or 'false' %}
{% set build_tag = build_tag or '' %}
{% set cacert_volume = '' %}
{% if cacert %}
{% set cacert_volume = ' -v ' + cacert + ':' + cacert %}
{% endif %}
{% set openrc_file = '/etc/yardstick/openstack.creds' %}
{% set pod_file = '/etc/yardstick/pod.yaml' %}
{% set result_dir = '/tmp/yardstick' %}
yardstick:
image_name: opnfv/yardstick
docker_tag: latest
opts: '-id --privileged=true'
envs: "{{os_verify}} -e YARDSTICK_BRANCH=fraser -e CI_DEBUG={{debug}}
-e BUILD_TAG={{build_tag}}-{{testcase}}"
volumes:
- '-v {{dovetail_home}}/pre_config/env_config.sh:{{openrc_file}}'
- {{cacert_volume}}
- '-v {{dovetail_home}}/pre_config/pod.yaml:{{pod_file}}'
- '-v {{dovetail_home}}/images:/home/opnfv/images'
- '-v {{dovetail_home}}/results:{{result_dir}}'
pre_condition:
- 'echo this is pre_condition'
cmds:
- "cd /home/opnfv/repos/yardstick && source {{openrc_file}} &&
yardstick task start tests/opnfv/test_cases/{{validate_testcase}}.yaml
--output-file {{result_dir}}/{{testcase}}.out
--task-args '{'file': '{{pod_file}}',
'attack_host': {{attack_host}},
'attack_process': {{attack_process}}}'"
post_condition:
- 'echo this is post_condition'
openrc: {{openrc_file}}
|