From efad0181528a284b3d36f98b9879f0952e67a9d4 Mon Sep 17 00:00:00 2001 From: Bogdan Dobrelya Date: Fri, 4 Nov 2016 17:53:34 +0100 Subject: [PATCH] Fix upload logs Signed-off-by: Bogdan Dobrelya --- .travis.yml | 3 ++- tests/cloud_playbooks/upload-logs-gcs.yml | 15 +++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 42c32ae5b..ac922fd80 100644 --- a/.travis.yml +++ b/.travis.yml @@ -154,7 +154,8 @@ after_failure: $HOME/.local/bin/ansible-playbook tests/cloud_playbooks/upload-logs-gcs.yml -i "localhost," -c local -e test_id=${TEST_ID} -e kube_network_plugin=${KUBE_NETWORK_PLUGIN} - >/dev/null + -e gs_key=${GS_ACCESS_KEY_ID} + -e gs_skey=${GS_SECRET_ACCESS_KEY} after_script: - > diff --git a/tests/cloud_playbooks/upload-logs-gcs.yml b/tests/cloud_playbooks/upload-logs-gcs.yml index 7a7a022c9..ba31ab56f 100644 --- a/tests/cloud_playbooks/upload-logs-gcs.yml +++ b/tests/cloud_playbooks/upload-logs-gcs.yml @@ -17,6 +17,8 @@ mode: create expiration: "{{ expire }}" permission: private + gs_access_key: gs_key + gs_secret_key: gs_skey - name: Upload collected diagnostic info gc_storage: @@ -26,3 +28,16 @@ expiration: "{{ expire }}" object: "build-{{ test_name }}-{{ kube_network_plugin }}-logs.tar.gz" src: logs.tar.gz + gs_access_key: gs_key + gs_secret_key: gs_skey + + - name: Get a link + gc_storage: + bucket: "{{ test_name }}" + object: "build-{{ test_name }}-{{ kube_network_plugin }}-logs.tar.gz" + mode: get_url + register: url + gs_access_key: gs_key + gs_secret_key: gs_skey + + - debug: msg="Download URL {{get_url}}"