Tempative fix for canary build false errors
Bug: twpowertools:120
Change-Id: I54f1da89730f1fe27d786c8dcf31eb4d6ccc006b
diff --git a/roles/cws-publish/tasks/main.yaml b/roles/cws-publish/tasks/main.yaml
index c31dd85..7968ad4 100644
--- a/roles/cws-publish/tasks/main.yaml
+++ b/roles/cws-publish/tasks/main.yaml
@@ -43,7 +43,15 @@
register: uploadcmd
failed_when: false
+- name: Read upload log
+ when: not (dry_run|bool)
+ ansible.builtin.shell:
+ cmd: cat cws-log.txt
+ chdir: "{{ zuul.project.src_dir }}/out"
+ executable: /bin/bash
+ register: uploadlog
+
- name: Check whether the upload was successful
- when: "not (dry_run|bool) and not (uploadcmd.rc == 0 or ('ITEM_NOT_UPDATABLE' in uploadcmd.stdout) or ('PKG_INVALID_VERSION_NUMBER') in uploadcmd.stdout)"
+ when: "not (dry_run|bool) and not (uploadcmd.rc == 0 or ('ITEM_NOT_UPDATABLE' in uploadlog.stdout) or ('PKG_INVALID_VERSION_NUMBER') in uploadlog.stdout)"
fail:
- msg: "{{ uploadcmd.stdout }}"
+ msg: "{{ uploadlog.stdout }}"