aboutsummaryrefslogtreecommitdiffstats
path: root/ci.d/buildkite
diff options
context:
space:
mode:
Diffstat (limited to 'ci.d/buildkite')
-rw-r--r--ci.d/buildkite8
1 files changed, 7 insertions, 1 deletions
diff --git a/ci.d/buildkite b/ci.d/buildkite
index 670fa0c..bade986 100644
--- a/ci.d/buildkite
+++ b/ci.d/buildkite
@@ -9,11 +9,17 @@ _buildkite_config() {
# Update the configuration.
lxc_do bash -c "echo name=\"$1-%n\" >> $BUILDKITE_PATH/buildkite-agent.cfg"
lxc_do bash -c "echo tags=\"os=$1\" >> $BUILDKITE_PATH/buildkite-agent.cfg"
- # Install hooks.
+ # Generate buildkite-env file.
lxc_do bash -c " \
echo \"export BUILDKITE_API_TOKEN=$BUILDKITE_API_TOKEN\" >> /etc/buildkite-env"
lxc_do bash -c " \
echo \"export BUILDKITE_LOGS_SERVER=$BUILDKITE_LOGS_SERVER\" >> /etc/buildkite-env"
+ # Install post-checkout hook.
+ <$( cd "$( dirname "$0" )" && pwd )/priv/buildkite-post-checkout-hook \
+ lxc_do bash -c "cat > $BUILDKITE_PATH/hooks/post-checkout"
+ lxc_do chmod +x $BUILDKITE_PATH/hooks/post-checkout
+ lxc_do chown buildkite-agent:buildkite-agent $BUILDKITE_PATH/hooks/post-checkout
+ # Install pre-artifact hook.
<$( cd "$( dirname "$0" )" && pwd )/priv/buildkite-pre-artifact-hook \
lxc_do bash -c "cat > $BUILDKITE_PATH/hooks/pre-artifact"
lxc_do chmod +x $BUILDKITE_PATH/hooks/pre-artifact