Merge "collect-logs: broader txt.gz rename conditions"

This commit is contained in:
Jenkins 2017-01-24 16:24:17 +00:00 committed by Gerrit Code Review
commit 9190248138
1 changed files with 4 additions and 2 deletions

View File

@ -28,8 +28,10 @@
- name: Rename text based files to end with txt.gz extension
shell: >
find {{ artcl_collect_dir }} -type f |
awk '/\.(conf|ini|json|sh|log|yaml|yml)\.gz$/ {
renamed=$0; sub(/\.gz$/, ".txt.gz", renamed); system("mv " $0 " " renamed) }';
awk 'function rename(orig)
{ new=orig; sub(/\.gz$/, ".txt.gz", new); system("mv " orig " " new) }
/\.(conf|ini|json|sh|log|yaml|yml)\.gz$/ { rename($0) }
/(\/var\/log\/|\/etc\/)[^ \/\.]+\.gz$/ { rename($0) }';
when: artcl_txt_rename|bool
- name: upload to the artifact server using pubkey auth