diff options
author | Loïc Hoguin <[email protected]> | 2020-02-21 12:46:55 +0100 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2020-02-21 12:46:55 +0100 |
commit | b70babdf6e9c7f50cf7b9351abd01c556d20a665 (patch) | |
tree | 8d1fd7f1befc1f090667a9fe7701f82639f9d290 /ci.d | |
parent | 164cc2f672ed3d3adb95db0fe062a78b5713c4fe (diff) | |
download | ci-b70babdf6e9c7f50cf7b9351abd01c556d20a665.tar.gz ci-b70babdf6e9c7f50cf7b9351abd01c556d20a665.tar.bz2 ci-b70babdf6e9c7f50cf7b9351abd01c556d20a665.zip |
Add a post-checkout hook to fetch branches/tags
Diffstat (limited to 'ci.d')
-rw-r--r-- | ci.d/buildkite | 8 |
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 |