Rework post-stackviz to fix uploading
The fetch-javascript-output does not work with the artifact uploading,
it does not create an artifact directory on the server.
Remove use of the role and instead copy the needed bits of
fetch-javascript-content-tarball into the playbook.
- hosts: all
- pre_tasks:
+ tasks:
+
- name: Rename tarball and move it to a subdir named dist as well
# TODO(AJaeger): "-new" is for testing
shell: |
tags:
- skip_ansible_lint
- roles:
- - fetch-javascript-output
+ - name: Ensure artifacts directory exists
+ file:
+ path: "{{ zuul.executor.work_root }}/artifacts"
+ state: directory
+ delegate_to: localhost
+
+ - name: Collect artifacts
+ synchronize:
+ dest: "{{ zuul.executor.work_root }}/artifacts/"
+ mode: pull
+ src: "{{ zuul_work_dir }}/dist/"
+ verify_host: true
+
+ - name: Find tarball tarball
+ find:
+ file_type: file
+ paths: "{{ zuul_work_dir }}/dist/"
+ patterns: "*.tar.gz"
+ register: result
+
+ - name: Return artifacts to Zuul
+ loop: "{{ result.files }}"
+ zuul_return:
+ data:
+ zuul:
+ artifacts:
+ - name: Javascript content archive
+ url: "artifacts/{{ item.path | basename }}"
+ metadata:
+ type: javascript_content
