From 3b7d6828546f9befef2a9721f8c8ac8946ae66d1 Mon Sep 17 00:00:00 2001 From: Fiorella Yanac Date: Mon, 27 Jan 2025 17:08:35 +0000 Subject: [PATCH] Add tobiko to adoption job --- .../development_environment/tasks/main.yaml | 70 +++++++++++++++++++ 1 file changed, 70 insertions(+) diff --git a/tests/roles/development_environment/tasks/main.yaml b/tests/roles/development_environment/tasks/main.yaml index 34e57bb50..8663a92c5 100644 --- a/tests/roles/development_environment/tasks/main.yaml +++ b/tests/roles/development_environment/tasks/main.yaml @@ -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: