URL: https://github.com/freeipa/freeipa/pull/370
Author: frasertweedale
 Title: #370: [EXPERIMENT] ci: send build log to paste.fedoraproject.org
Action: synchronized

To pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/370/head:pr370
git checkout pr370
From c2c0ac5739c46399edc3b0d74bec132832600eca Mon Sep 17 00:00:00 2001
From: Fraser Tweedale <ftwee...@redhat.com>
Date: Thu, 5 Jan 2017 12:24:59 +1000
Subject: [PATCH] ci: send build log to paste.fedoraproject.org

---
 .travis.yml | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/.travis.yml b/.travis.yml
index e870213..159cbd6 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -15,6 +15,7 @@ env:
             test_pkcs10
             test_xmlrpc/test_[l-z]*.py"
 before_install:
+    - sudo apt-get -qq update && sudo apt-get install -y jq
     - pip install pep8
     - >
       pip3 install
@@ -37,6 +38,19 @@ script:
         --container-image ${TEST_RUNNER_IMAGE}
         --git-repo ${TRAVIS_BUILD_DIR}
         run-tests $test_set
+    - echo "Sending build log to paste.fedoraproject.org"
+    - gzip < ci_results_${TRAVIS_BRANCH}.log > ci_results.log.gz
+    - ls -l ci_results.log.gz
+    - >
+      PASTE_ID=$(curl https://paste.fedoraproject.org/ -H Expect:
+      --data api_submit=true
+      --data mode=json
+      --data paste_lang=text
+      --data paste_expire=86400
+      --data-urlencode paste_data@ci_results.log.gz
+      | jq --raw-output .result.id)
+      && echo "Download gzipped logfile from: https://paste.fedoraproject.org/$PASTE_ID/raw/";
+      || echo "Failed to submit paste!"
 after_failure:
   - echo "Test runner output:"
   - tail -n 5000 ci_results_${TRAVIS_BRANCH}.log
-- 
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

Reply via email to