Switch from zip to tar archive generation
zip module from salt is unable to properly handle
broken links in archive, so using tar now.
Change-Id: I26d36c9570b25e8fb64e9dad069596e60fa2e058
Related-Prod: https://mirantis.jira.com/browse/PROD-23346
https://mirantis.jira.com/browse/PROD-28560
diff --git a/runtest/artifact_collector.sls b/runtest/artifact_collector.sls
index e66ae54..9c7f46e 100644
--- a/runtest/artifact_collector.sls
+++ b/runtest/artifact_collector.sls
@@ -31,19 +31,21 @@
{%- for artifact_name, artifact_params in artifact_collector.artifacts.iteritems() %}
-{%- set zip_file = "/tmp/"+artifact_name+".zip" %}
+{%- if salt['file.file_exists'](artifact_params.path) or salt['file.directory_exists'](artifact_params.path) %}
+{%- set tar_file = "/tmp/"+artifact_name+".tar.gz" %}
-zip_{{artifact_name}}:
+tar_{{artifact_name}}:
module.run:
- - name: archive.zip
- - zip_file: {{ zip_file }}
+ - name: archive.tar
+ - options: czvf
+ - tarfile: {{ tar_file }}
- sources: {{ artifact_params.path }}
{%- if artifact_collector.get('artifactory', {}).get('enabled', False) %}
deploy_{{artifact_name}}:
module.run:
- name: artifactory.deploy_artifact
- - source_file: {{ zip_file }}
+ - source_file: {{ tar_file }}
- endpoint: {{ artifact_collector.artifactory.endpoint }}
- require:
- pkg: required_artifact_pkgs
@@ -55,6 +57,8 @@
port: {{ artifact_collector.artifactory.get('port', 443) }}
{%- endif %}
+{%- endif %}
+
{%- endfor %}
{%- endif -%}