fetch-javascript-content-tarball: add create_tarball variable

This change enable publish job to also create the tarball before fetch.

Change-Id: If4b5a1be8d3ce61ff45b04be23cf80a802760ec8
This commit is contained in:
Tristan Cacqueray 2018-09-30 00:01:25 +00:00 committed by James E. Blair
parent a01a13e49b
commit a327047c14
2 changed files with 14 additions and 0 deletions

View File

@ -9,3 +9,8 @@ such as but not limited to those produced by the webpack ArchivePlugin.
:default: {{ zuul.project.src_dir }}
Directory to work in.
.. zuul:rolevar:: create_tarball_directory
Create a tarball with the contents of create_tarball_directory
(relative to zuul_work_dir).

View File

@ -1,3 +1,12 @@
- name: Create tarball
shell: "tar czf {{ zuul_work_dir }}/build.tgz *"
args:
chdir: "{{ zuul_work_dir }}/{{ create_tarball_directory }}"
when: create_tarball_directory is defined
tags:
# Ignore ANSIBLE0006: tar used in place of unarchive module
- skip_ansible_lint
- name: Rename tarball for uploading
shell: |
mkdir -p dist