Skip to content

Commit

Permalink
Add tobiko to adoption job
Browse files Browse the repository at this point in the history
  • Loading branch information
fyanac committed Jan 29, 2025
1 parent ca9e02f commit 3b7d682
Showing 1 changed file with 70 additions and 0 deletions.
70 changes: 70 additions & 0 deletions tests/roles/development_environment/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,76 @@
{{ openstack_command }} token issue -f value -c id
register: before_adoption_token

- name: Tobiko
when: neutron_qe_test | default('false') | bool
environment:
OS_CLOUD_IP: "{{ standalone_ip | default(edpm_node_ip) }}"
block:
# Temporal - tobiko installation task
- name: tobiko installation
ansible.builtin.shell: |
ssh ${OS_CLOUD_IP} "set -o pipefail && mkdir -p ~/src/x && cd ~/src/x && git clone https://github.com/redhat-openstack/tobiko.git"
- name: virtcustomize installation
ansible.builtin.shell: |
ssh ${OS_CLOUD_IP} "set -o pipefail && sudo dnf install -y libguestfs-tools-c"
- name: oc undercloud installation
ansible.builtin.shell: >
ssh ${OS_CLOUD_IP} "curl -s -L https://mirror.openshift.com/pub/openshift-v4/x86_64/clients/ocp/stable/openshift-client-linux.tar.gz
| sudo tar -zxvf - -C /usr/local/bin/"
- name: copy kube conf to undercloud
ansible.builtin.shell: |
scp -r .kube/ ${OS_CLOUD_IP}:~
- name: upload tobiko-playbook.yaml to the undercloud
delegate_to: "{{ standalone_ip | default(edpm_node_ip) }}"
vars:
tobiko_playbook: |
- name: Playbook to run tobiko from the undercloud pre-adoption
hosts: localhost
tasks:
- name: "download images"
ansible.builtin.include_role:
name: tobiko-download-images
- name: "run tests"
ansible.builtin.include_role:
name: tobiko-run
ansible.builtin.copy:
mode: a+r
content: "{{ tobiko_playbook }}"
dest: ~/src/x/tobiko/tobiko-playbook.yaml
- name: Add tobiko.conf to the undercloud
delegate_to: "{{ standalone_ip | default(edpm_node_ip) }}"
vars:
tobiko_conf_file: |
[DEFAULT]
log_dir = /home/zuul/src/x/tobiko/report
log_file = tobiko.log
debug = true
[testcase]
test_runner_timeout = 14400.0
timeout = 1800.0
[ubuntu]
image_url = file:///home/zuul/.downloaded-images/ubuntu-customized
[tripleo]
undercloud_ssh_hostname = undercloud
undercloud_ssh_username = zuul
run_background_ping_in_pod = true
[keystone]
interface = public
[manila]
share_protocol = cephfs
[neutron]
custom_mtu_size = 1292
ansible.builtin.copy:
mode: a+r
content: "{{ tobiko_conf_file }}"
dest: ~/src/x/tobiko/tobiko.conf
- name: Run Tobiko from the undercloud
delegate_to: "{{ standalone_ip | default(edpm_node_ip) }}"
ansible.builtin.shell:
chdir: ~/src/x/tobiko/
cmd: ansible-playbook tobiko-playbook.yaml -e test_workflow=create-resources -e ubuntu_nic_name=enp3s0 -e pytest_addopts_global="--skipregex='TestFloatingIPLogging|ExtraDhcpOptsPortLoggingTest|NoFipPortTest|StatelessSecurityGroupInstanceTest|StatelessSecurityGroupTest|test_5_live_migrate_server'"

- name: Create credential for sanity checking its value after adoption
no_log: "{{ use_no_log }}"
ansible.builtin.shell:
Expand Down

0 comments on commit 3b7d682

Please sign in to comment.