From d0f016cf8f3130c769a1de8be8d89790c0d8e511 Mon Sep 17 00:00:00 2001
From: Varac <varac@leap.se>
Date: Fri, 23 Jun 2017 20:25:06 +0200
Subject: [PATCH] Use stdbuf instead of unbuffer for CI timestamping

There are different reasons for this:

- Using `stdbuf` will correctly return and non-zero
  exit code so when something breaks during CI `gitlab-runner`
  will mark the build as failed (Resolves: #8821).
- `stdbuf` is already installed by the `coreutils` package and
  thus saves diskspace
---
 .gitlab-ci.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index f515337f..3d622d1c 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -60,7 +60,7 @@ deploy_test:
   except:
     - master
   script:
-    - su -c '/usr/bin/unbuffer /bin/bash -o pipefail ./ci-build.sh | /usr/bin/ts' cirunner
+    - su -c 'set -o pipefail; stdbuf -oL -eL ./ci-build.sh | ts' cirunner
 
 # Latest job will only run on the master branch, which means all merge requests
 # that are created from branches don't get to deploy to the latest-ci server.
-- 
GitLab