summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMicah Anderson <micah@riseup.net>2017-04-25 13:42:14 -0400
committerMicah Anderson <micah@riseup.net>2017-04-25 13:42:14 -0400
commitf5d1850e7b3831b1ee6374627bb403aa3858a320 (patch)
tree586704daefadface9d6380ff9596ecb64f00c8bf
parent64d0b3f97c02dc502a4d6e44b62379170792de8e (diff)
Fix the pipefail by putting ts inside of ci-build.sh
-rw-r--r--.gitlab-ci.yml4
-rwxr-xr-xtests/platform-ci/ci-build.sh6
2 files changed, 8 insertions, 2 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 2df6eb5c..5654238e 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -60,7 +60,7 @@ deploy_test:
except:
- master
script:
- - su -c '/usr/bin/unbuffer ./ci-build.sh | /usr/bin/ts -s' cirunner
+ - su -c '/usr/bin/unbuffer ./ci-build.sh' 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.
@@ -74,4 +74,4 @@ latest:
only:
- master
script:
- - su -c '/usr/bin/unbuffer ./ci-build.sh | /usr/bin/ts -s' cirunner
+ - su -c '/usr/bin/unbuffer ./ci-build.sh' cirunner
diff --git a/tests/platform-ci/ci-build.sh b/tests/platform-ci/ci-build.sh
index a9731fca..b39f6874 100755
--- a/tests/platform-ci/ci-build.sh
+++ b/tests/platform-ci/ci-build.sh
@@ -22,6 +22,11 @@ set -e
# so exit codes will be caught correctly.
set -o pipefail
+# we wrap the whole script in curly braces so we can pipe it all through ts to
+# get timestamps. If we put it outside of the script, then we can't get proper
+# pipefail results.
+
+{
# leap_platform/tests/platform-ci
# shellcheck disable=SC2086
ROOTDIR=$(readlink -f "$(dirname $0)")
@@ -117,3 +122,4 @@ case "$CI_ENVIRONMENT_NAME" in
[ -f "nodes/${NAME}.json" ] && /bin/rm "nodes/${NAME}.json"
;;
esac
+} | /usr/bin/ts -s