File: main.yaml

package info (click to toggle)
python-tempestconf 3.5.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 964 kB
  • sloc: python: 4,530; makefile: 18; sh: 9
file content (80 lines) | stat: -rw-r--r-- 2,540 bytes parent folder | download
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
- block:
  - debug:
      var: source_credentials_commands

  - name: Ensure python-virtualenv is present
    include_role:
      name: ensure-virtualenv

  - name: Create python-tempestconf venv with latest pip, setuptools and pbr
    pip:
        virtualenv: "{{ virtualenvs.tempestconf }}"
        name: "{{ item }}"
        state: latest
        virtualenv_python: "{{ tempestconf_pip_virtualenv_python|default(omit) }}"
    with_items:
        - pip
        - setuptools
        - pbr

  - name: Debug, list tempestconf dir
    shell: |
        set -ex
        ls -all .
        pwd
    args:
        chdir: "{{ tempestconf_src_relative_path }}"

  - name: Install python-tempestconf (with constraints)
    shell: |
        set -ex
        export PATH=$PATH:/usr/local/sbin:/usr/sbin
        source {{ virtualenvs.tempestconf }}/bin/activate
        pip install -c {{ ansible_user_dir }}/{{ zuul.projects['opendev.org/openstack/requirements'].src_dir }}/upper-constraints.txt .
    args:
       chdir: "{{ tempestconf_src_relative_path }}"
       executable: /bin/bash
    when: branch is defined

  - name: Install python-tempestconf
    pip:
        name: "."
        virtualenv: "{{ virtualenvs.tempestconf }}"
        chdir: "{{ tempestconf_src_relative_path }}"
        virtualenv_python: "{{ tempestconf_pip_virtualenv_python|default(omit) }}"
    when: branch is not defined

  - name: Generate tempest configuration script
    template:
        src: generate-tempestconf.sh.j2
        dest: "{{ tempestconf_src_relative_path }}/generate-tempestconf.sh"
        mode: 0744

  - include_tasks: test-demo-user.yaml
    when: test_demo_user

  - name: Generate tempest configuration file
    shell: |
        ./generate-tempestconf.sh
    args:
      chdir: "{{ tempestconf_src_relative_path }}"
      executable: /bin/bash

  # tempest role which will run tests has tempest in {{ devstack_base_dir }}
  # location, therefore the file is copied there
  - name: Copy tempest.conf to the tempest directory
    become: yes
    shell: |
        set -x
        cp {{ tempestconf_src_relative_path }}/etc/tempest.conf {{ devstack_base_dir }}/tempest/etc/tempest.conf
    when: output_path is not defined

  - name: Copy tempest.conf to the specified location
    become: yes
    shell: |
        set -x
        cp  {{ tempestconf_src_relative_path }}/etc/tempest.conf {{ output_path }}
    when: output_path is defined

  vars:
    tempestconf_src_relative_path: "{{ zuul.projects['opendev.org/openinfra/python-tempestconf'].src_dir }}"