[Freeipa-devel] [freeipa PR#370][synchronized] [EXPERIMENT] ci: send build log to paste.fedoraproject.org

2017-01-05 Thread frasertweedale
   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 7601eceefccd5ab844bf94b670de242cb7040d50 Mon Sep 17 00:00:00 2001
From: Fraser Tweedale 
Date: Thu, 5 Jan 2017 12:24:59 +1000
Subject: [PATCH] ci: send build log to paste.fedoraproject.org

When the build fails, send the whole logfile to paste.fedora.org.
(because due to size constraints we currently have to tail the log
for the travis-ci transcript).

We send a gzipped file, because the raw log file exceeds the size
limit on paste.fedoraproject.org.

Due to percent-encoding of the data, the compressed file inflates by
~2.5x for transport.  If this ever becomes a problem,
base64url-encoding before transport will limit inflation to 1.33x.
---
 .travis.yml | 15 +++
 1 file changed, 15 insertions(+)

diff --git a/.travis.yml b/.travis.yml
index 6301974..1660be9 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -33,5 +33,20 @@ install:
 script:
 - travis_wait 50 ./.travis_run_task.sh
 after_failure:
+- >
+  echo "Sending test runner output to paste.fedoraproject.org"
+  && sudo apt-get -qq update && sudo apt-get install -y jq
+  && gzip < ci_results_${TRAVIS_BRANCH}.log > ci_results.log.gz
+  && ls -l ci_results.log.gz
+- >
+  PASTE_ID=$(curl https://paste.fedoraproject.org/~freeipa.ci/ -H Expect:
+  --data api_submit=true
+  --data mode=json
+  --data paste_lang=text
+  --data paste_expire=$(expr 86400 '*' 28)
+  --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!"
 - echo "Test runner output:"; tail -n $CI_BACKLOG_SIZE $CI_RESULTS_LOG
 - echo "PEP-8 errors:"; cat $PEP8_ERROR_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

[Freeipa-devel] [freeipa PR#370][synchronized] [EXPERIMENT] ci: send build log to paste.fedoraproject.org

2017-01-04 Thread frasertweedale
   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 
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

[Freeipa-devel] [freeipa PR#370][synchronized] [EXPERIMENT] ci: send build log to paste.fedoraproject.org

2017-01-04 Thread frasertweedale
   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 699907bb0fa31464369399788f81d0fa66ce2480 Mon Sep 17 00:00:00 2001
From: Fraser Tweedale 
Date: Thu, 5 Jan 2017 12:24:59 +1000
Subject: [PATCH] ci: send build log to paste.fedoraproject.org

---
 .travis.yml | 13 ++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index e870213..9666468 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -5,15 +5,13 @@ env:
 global:
 - TEST_RUNNER_IMAGE="martbab/freeipa-fedora-test-runner:master-latest"
 matrix:
-- TESTS_TO_RUN="test_xmlrpc/test_[a-k]*.py"
 - >
 TESTS_TO_RUN="test_cmdline
 test_install
 test_ipalib
 test_ipapython
 test_ipaserver
-test_pkcs10
-test_xmlrpc/test_[l-z]*.py"
+test_pkcs10"
 before_install:
 - pip install pep8
 - >
@@ -37,6 +35,15 @@ script:
 --container-image ${TEST_RUNNER_IMAGE}
 --git-repo ${TRAVIS_BUILD_DIR}
 run-tests $test_set
+- echo "Sending build log to paste.fedoraproject.org"
+- >
+  curl -v 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_${TRAVIS_BRANCH}.log
+  || 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

[Freeipa-devel] [freeipa PR#370][synchronized] [EXPERIMENT] ci: send build log to paste.fedoraproject.org

2017-01-04 Thread frasertweedale
   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 ee45e138504254588a831ee3146727fa05fc24e3 Mon Sep 17 00:00:00 2001
From: Fraser Tweedale 
Date: Thu, 5 Jan 2017 12:24:59 +1000
Subject: [PATCH] ci: send build log to paste.fedoraproject.org

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

diff --git a/.travis.yml b/.travis.yml
index e870213..03dc840 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -15,6 +15,15 @@ env:
 test_pkcs10
 test_xmlrpc/test_[l-z]*.py"
 before_install:
+- curl -V
+- >
+  curl -v https://paste.fedoraproject.org/ -H Expect:
+  --data api_submit=true
+  --data mode=json
+  --data paste_lang=text
+  --data paste_data=hello+world
+  || echo "failed to submit paste"
+- /bin/false
 - pip install pep8
 - >
   pip3 install
@@ -37,6 +46,14 @@ script:
 --container-image ${TEST_RUNNER_IMAGE}
 --git-repo ${TRAVIS_BUILD_DIR}
 run-tests $test_set
+- echo "Sending build log to paste.fedoraproject.org"
+- >
+  curl https://paste.fedoraproject.org/ -H Expect:
+  --data api_submit=true
+  --data mode=json
+  --data paste_lang=text
+  --data-urlencode paste_data@ci_results_${TRAVIS_BRANCH}.log
+  || 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

[Freeipa-devel] [freeipa PR#370][synchronized] [EXPERIMENT] ci: send build log to paste.fedoraproject.org

2017-01-04 Thread frasertweedale
   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 2135ba13c4ad9653e22d817caea82d754a8034b6 Mon Sep 17 00:00:00 2001
From: Fraser Tweedale 
Date: Thu, 5 Jan 2017 12:24:59 +1000
Subject: [PATCH] ci: send build log to paste.fedoraproject.org

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

diff --git a/.travis.yml b/.travis.yml
index e870213..0324f8d 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -37,6 +37,14 @@ script:
 --container-image ${TEST_RUNNER_IMAGE}
 --git-repo ${TRAVIS_BUILD_DIR}
 run-tests $test_set
+- echo "Sending build log to paste.fedoraproject.org"
+- >
+  curl https://paste.fedoraproject.org/ -H Expect:
+  --data api_submit=true
+  --data mode=json
+  --data paste_lang=text
+  --data-urlencode paste_data@ci_results_${TRAVIS_BRANCH}.log
+  || 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