Browse Source

Fix upload logs

Signed-off-by: Bogdan Dobrelya <bdobrelia@mirantis.com>
pull/586/head
Bogdan Dobrelya 8 years ago
parent
commit
39b8336f3f
2 changed files with 17 additions and 1 deletions
  1. 3
      .travis.yml
  2. 15
      tests/cloud_playbooks/upload-logs-gcs.yml

3
.travis.yml

@ -154,7 +154,8 @@ after_failure:
$HOME/.local/bin/ansible-playbook tests/cloud_playbooks/upload-logs-gcs.yml -i "localhost," -c local $HOME/.local/bin/ansible-playbook tests/cloud_playbooks/upload-logs-gcs.yml -i "localhost," -c local
-e test_id=${TEST_ID} -e test_id=${TEST_ID}
-e kube_network_plugin=${KUBE_NETWORK_PLUGIN} -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: after_script:
- > - >

15
tests/cloud_playbooks/upload-logs-gcs.yml

@ -17,6 +17,8 @@
mode: create mode: create
expiration: "{{ expire }}" expiration: "{{ expire }}"
permission: private permission: private
gs_access_key: gs_key
gs_secret_key: gs_skey
- name: Upload collected diagnostic info - name: Upload collected diagnostic info
gc_storage: gc_storage:
@ -26,3 +28,16 @@
expiration: "{{ expire }}" expiration: "{{ expire }}"
object: "build-{{ test_name }}-{{ kube_network_plugin }}-logs.tar.gz" object: "build-{{ test_name }}-{{ kube_network_plugin }}-logs.tar.gz"
src: 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}}"
Loading…
Cancel
Save