zuul-jobs/roles/fetch-javascript-tarball/tasks/main.yaml
Tristan Cacqueray 9204e7d1d8 fetch-javascript-tarball: introduce zuul_use_fetch_output
This change enables using fetch-javascript role along with
the fetch-output role. By default the role still synchronizes
artifacts back to the executor.

Change-Id: I8450ecf91b3387445ebe2436754d1b88f2a77844
2020-01-24 21:11:07 +00:00

26 lines
837 B
YAML

- name: Rename tarball for uploading
shell: |
mkdir -p {{ zuul_output_dir }}/artifacts
cp *.tgz {{ zuul_output_dir }}/artifacts/{{ zuul.project.short_name }}-{{ project_ver }}.tar.gz
cp *.tgz {{ zuul_output_dir }}/artifacts/{{ zuul.project.short_name }}-latest.tar.gz
args:
chdir: "{{ zuul_work_dir }}"
tags:
# Ignore ANSIBLE0007: No need to use file module instead of mkdir
- skip_ansible_lint
- block:
- 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_output_dir }}/artifacts/"
verify_host: true
when: not zuul_use_fetch_output