cirrus/ci: Add pre_build_script mechanism

Allow tasks to run a bit of code just before ci/build.sh.
This commit is contained in:
Arne Welzel 2023-09-26 18:08:07 +02:00
parent c6486e70ef
commit 8a2c81aa0c
2 changed files with 9 additions and 0 deletions

View file

@ -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

8
ci/pre-build.sh Executable file
View file

@ -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