zuul-jobs/roles/fetch-javascript-content-tarball/tasks/main.yaml
Monty Taylor 35da394f53
Add role for fetching javascript built content
Built content and source tarballs are different. Have a role that
handles uploading built content.

Append -content to the tarball so that a project can publish both a
source tarball and a built content tarball without stepping on each
other.

Change-Id: I33dff8080018bda281a00e648468de80d3ecd679
2018-03-06 13:33:10 -06:00

30 lines
800 B
YAML

- name: Rename tarball for uploading
shell: |
mkdir -p dist
cp *.tgz dist/{{ zuul.project.short_name }}-content-latest.tar.gz
args:
chdir: "{{ zuul_work_dir }}"
tags:
# Ignore ANSIBLE0007: No need to use file module instead of mkdir
- skip_ansible_lint
- name: Rename tagged tarball for uploading
when: zuul.tag is defined
shell: |
cp *.tgz dist/{{ zuul.project.short_name }}-content-{{ zuul.tag }}.tar.gz
args:
chdir: "{{ zuul_work_dir }}"
- 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