)]}'
{"tasks/tempest_run.yml":[{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"531e5f6833292b1fcbab29f9a90357eb0f1b1ef0","unresolved":false,"context_lines":[{"line_number":44,"context_line":"    - name: Copy raw subunit to log folder"},{"line_number":45,"context_line":"      shell: |"},{"line_number":46,"context_line":"        # Copy results to the log folder"},{"line_number":47,"context_line":"        # if file exists, append results"},{"line_number":48,"context_line":"        if [[ -f {{ tempest_log_dir }}testrepository.subunit ]] ; then"},{"line_number":49,"context_line":"            cat tempest_results.subunit \\"},{"line_number":50,"context_line":"                | tee -a {{ tempest_log_dir }}testrepository.subunit \u003e /dev/null"}],"source_content_type":"text/x-yaml","patch_set":8,"id":"bff0334d_79c5368e","line":47,"updated":"2017-04-05 22:10:08.000000000","message":"Can you not just unconditionally append to the destination?\n\n  cat tempest_results.subunit | tee -a {{ tempest_log_dir }}testrepository.subunit \u003e /dev/null\n\nor\n\n  cat tempest_results.subunit \u003e\u003e {{ tempest_log_dir }}testrepository.subunit\n\nI\u0027m also sort of wondering if ansible has a trick to do this without shell, perhaps with blockinfile or something? https://docs.ansible.com/ansible/blockinfile_module.html","commit_id":"0e9070ef85994348160284955c49f030ace91126"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"531e5f6833292b1fcbab29f9a90357eb0f1b1ef0","unresolved":false,"context_lines":[{"line_number":55,"context_line":"      args:"},{"line_number":56,"context_line":"        chdir: \"{{ tempest_venv_bin | dirname }}/workspace\""},{"line_number":57,"context_line":"        executable: /bin/bash"},{"line_number":58,"context_line":"      changed_when: false"},{"line_number":59,"context_line":"      tags:"},{"line_number":60,"context_line":"        # don\u0027t trigger ANSIBLE0013"},{"line_number":61,"context_line":"        - skip_ansible_lint"}],"source_content_type":"text/x-yaml","patch_set":8,"id":"bff0334d_597a7224","line":58,"updated":"2017-04-05 22:10:08.000000000","message":"when tempest_results.subunit exists?","commit_id":"0e9070ef85994348160284955c49f030ace91126"},{"author":{"_account_id":6816,"name":"Jesse Pretorius","email":"jesse@odyssey4.me","username":"jesse-pretorius"},"change_message_id":"d0efdaf56ac10f956a8d4ccc9b375d9f49afdff4","unresolved":false,"context_lines":[{"line_number":72,"context_line":"      # don\u0027t trigger ANSIBLE0013"},{"line_number":73,"context_line":"      - skip_ansible_lint"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"  - name: Copy html results to log folder"},{"line_number":76,"context_line":"    copy:"},{"line_number":77,"context_line":"      src: tempest_results.html"},{"line_number":78,"context_line":"      dest: \"{{ tempest_log_dir }}testr_results.html\""},{"line_number":79,"context_line":"      remote_src: True"},{"line_number":80,"context_line":"    args:"},{"line_number":81,"context_line":"      chdir: \"{{ tempest_venv_bin | dirname }}/workspace\""},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"- name: Fail if tempest tests did not succeed"},{"line_number":84,"context_line":"  assert:"}],"source_content_type":"text/x-yaml","patch_set":14,"id":"7f231b9d_cfab171b","line":81,"range":{"start_line":75,"start_character":0,"end_line":81,"end_character":57},"updated":"2017-06-13 10:09:52.000000000","message":"You can change this all to use a single task here:\n\n  - name: Copy test results to log folder\n    copy:\n      src: \"{{ tempest_venv_bin | dirname }}/workspace/{{ item }}\"\n      dest: \"{{ tempest_log_dir }}/\"\n      remote_src: True\n  with_items:\n    - \"tempest_results.subunit\"\n    - \"tempest_results.xml\"\n    - \"tempest_results.html\"\n\nDo you really want the names to change too?","commit_id":"5b78854c540c89b2d7f70c7028968cf2fe7d2eb1"},{"author":{"_account_id":17716,"name":"Luz Cazares","email":"luz.cazares@intel.com","username":"luzcazares"},"change_message_id":"d1a5dcd1d83426395477162942ff50bfd4670ea8","unresolved":false,"context_lines":[{"line_number":72,"context_line":"      # don\u0027t trigger ANSIBLE0013"},{"line_number":73,"context_line":"      - skip_ansible_lint"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"  - name: Copy html results to log folder"},{"line_number":76,"context_line":"    copy:"},{"line_number":77,"context_line":"      src: tempest_results.html"},{"line_number":78,"context_line":"      dest: \"{{ tempest_log_dir }}testr_results.html\""},{"line_number":79,"context_line":"      remote_src: True"},{"line_number":80,"context_line":"    args:"},{"line_number":81,"context_line":"      chdir: \"{{ tempest_venv_bin | dirname }}/workspace\""},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"- name: Fail if tempest tests did not succeed"},{"line_number":84,"context_line":"  assert:"}],"source_content_type":"text/x-yaml","patch_set":14,"id":"7f231b9d_0b457117","line":81,"range":{"start_line":75,"start_character":0,"end_line":81,"end_character":57},"in_reply_to":"7f231b9d_cfab171b","updated":"2017-06-13 18:33:54.000000000","message":"Hi Jesse\n\nSubunit result file needs to be named testrepository.subunit so that it is picked up by the dashboard jobs.\n\nI divided collecting the result files in 2 tasks because I\u0027ve seen playbook failing when generating XML file (LN51 - name: Generate xml subunit results) - hence subunit file is never copied to the right place even if it is available.","commit_id":"5b78854c540c89b2d7f70c7028968cf2fe7d2eb1"},{"author":{"_account_id":6816,"name":"Jesse Pretorius","email":"jesse@odyssey4.me","username":"jesse-pretorius"},"change_message_id":"84a379f95732784f24d8720ac04fef6ff3d9ad71","unresolved":false,"context_lines":[{"line_number":43,"context_line":"  - name: Copy raw subunit to log folder"},{"line_number":44,"context_line":"    copy:"},{"line_number":45,"context_line":"      src: \"{{ tempest_venv_bin | dirname }}/workspace/tempest_results.subunit\""},{"line_number":46,"context_line":"      dest: \"{{ tempest_log_dir }}testrepository.subunit\""},{"line_number":47,"context_line":"      remote_src: True"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"  - name: Generate xml subunit results"}],"source_content_type":"text/x-yaml","patch_set":15,"id":"7f231b9d_3f44d9b6","line":46,"updated":"2017-06-14 07:37:23.000000000","message":"missing the slash:\n\n\"{{ tempest_log_dir }}/testrepository.subunit\"","commit_id":"bf0eb527d7616d3cae8d9f3f3987b7cd7b5701da"}]}
