diff options
author | Loïc Hoguin <[email protected]> | 2018-04-18 00:27:06 +0200 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2018-04-18 11:06:34 +0200 |
commit | e5311de35216cc541978c10a8f2cf8204acc7b94 (patch) | |
tree | 2346f74a488585a77fd1680cc1c827ee549bb9e0 /priv | |
download | ci-e5311de35216cc541978c10a8f2cf8204acc7b94.tar.gz ci-e5311de35216cc541978c10a8f2cf8204acc7b94.tar.bz2 ci-e5311de35216cc541978c10a8f2cf8204acc7b94.zip |
Initial commit
Sets up LXC containers for CI for Alpine, Arch Linux,
CentOS, Debian and Ubuntu. Currently only tested against
Cowlib, it's likely that more packages need to be installed
for the other projects.
Diffstat (limited to 'priv')
-rw-r--r-- | priv/buildkite-pre-artifact-hook | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/priv/buildkite-pre-artifact-hook b/priv/buildkite-pre-artifact-hook new file mode 100644 index 0000000..ff76fdd --- /dev/null +++ b/priv/buildkite-pre-artifact-hook @@ -0,0 +1,21 @@ +#!/bin/bash + +source /etc/buildkite-env + +LOGS_PATH=logs/$BUILDKITE_PIPELINE_SLUG/$BUILDKITE_BUILD_NUMBER/$BUILDKITE_AGENT_META_DATA_OS/ +ssh buildkite@$BUILDKITE_LOGS_SERVER mkdir -p $LOGS_PATH + +# Terminal output. +curl -H "Authorization: Bearer $BUILDKITE_API_TOKEN" "https://api.buildkite.com/v2/organizations/$BUILDKITE_ORGANIZATION_SLUG/pipelines/$BUILDKITE_PIPELINE_SLUG/builds/$BUILDKITE_BUILD_NUMBER/jobs/$BUILDKITE_JOB_ID/log" -H "Accept: text/plain" -o output.txt +scp -p output.txt buildkite@$BUILDKITE_LOGS_SERVER:$LOGS_PATH +rm -f output.txt + +# Common Test logs. +test -d logs/ && \ + scp -rp logs/* buildkite@$BUILDKITE_LOGS_SERVER:$LOGS_PATH + +# Erlang.mk packages. +test -f test/packages/errors.log && \ + scp -p test/packages/errors.log buildkite@$BUILDKITE_LOGS_SERVER:$LOGS_PATH + +echo "<html><head><meta http-equiv='refresh' content='0;URL=https://builds.ninenines.eu/$LOGS_PATH'/></head></html>" > logs.html |