From 8a2c81aa0c8d40a41da7e0225965bd7ec5e43b95 Mon Sep 17 00:00:00 2001 From: Arne Welzel Date: Tue, 26 Sep 2023 18:08:07 +0200 Subject: [PATCH] cirrus/ci: Add pre_build_script mechanism Allow tasks to run a bit of code just before ci/build.sh. --- .cirrus.yml | 1 + ci/pre-build.sh | 8 ++++++++ 2 files changed, 9 insertions(+) create mode 100755 ci/pre-build.sh diff --git a/.cirrus.yml b/.cirrus.yml index 8f81344ff8..5419d0afbf 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -97,6 +97,7 @@ ci_template: &CI_TEMPLATE init_external_repos_script: ./ci/init-external-repos.sh + pre_build_script: ./ci/pre-build.sh build_script: ./ci/build.sh test_script: ./ci/test.sh diff --git a/ci/pre-build.sh b/ci/pre-build.sh new file mode 100755 index 0000000000..4dfedae2aa --- /dev/null +++ b/ci/pre-build.sh @@ -0,0 +1,8 @@ +#/usr/bin/env bash +# +# If ZEEK_CI_PREBUILD_COMMAND is not empty, execute it via bash -c. That's it. +set -ex + +if [ -n "$ZEEK_CI_PREBUILD_COMMAND" ]; then + bash -c "$ZEEK_CI_PREBUILD_COMMAND" +fi