blob: a9abf6dcec85878b02cf701809fa7aa9d885aea4 [file] [log] [blame]
Alexander Afanasyeva87e0a82014-10-21 14:09:19 -04001#!/usr/bin/env bash
Alexander Afanasyev33ce4c32014-10-24 11:19:45 -07002set -e
Davide Pesavento2349e282020-03-24 14:28:03 -04003source .jenkins.d/util.sh
4
Davide Pesavento09d56622021-08-23 17:44:25 -04005if has Linux $NODE_LABELS; then
Davide Pesavento83f8d162021-09-26 21:58:36 -04006 export PATH="${HOME}/.local/bin${PATH:+:}${PATH}"
Davide Pesaventof6625002022-07-31 17:15:02 -04007elif [[ -x /opt/homebrew/bin/brew ]]; then
8 eval "$(/opt/homebrew/bin/brew shellenv)"
Davide Pesavento09d56622021-08-23 17:44:25 -04009fi
Davide Pesaventoab7300b2020-04-09 00:51:41 -040010export CACHE_DIR=${CACHE_DIR:-/tmp}
Davide Pesavento2349e282020-03-24 14:28:03 -040011export WAF_JOBS=${WAF_JOBS:-1}
Davide Pesaventoab7300b2020-04-09 00:51:41 -040012[[ $JOB_NAME == *"code-coverage" ]] && export DISABLE_ASAN=yes
Alexander Afanasyeva87e0a82014-10-21 14:09:19 -040013
Davide Pesaventoe6e125e2019-10-08 18:08:36 -040014for file in .jenkins.d/*; do
Alexander Afanasyeve7490032014-12-11 12:40:53 -080015 [[ -f $file && -x $file ]] || continue
Davide Pesaventoe6e125e2019-10-08 18:08:36 -040016
Davide Pesavento30ed6282021-07-25 20:05:06 -040017 if [[ -n $GITHUB_ACTIONS ]]; then
Davide Pesavento83f8d162021-09-26 21:58:36 -040018 label=$(basename "$file" | sed -E 's/[[:digit:]]+-(.*)\..*/\1/')
Davide Pesavento30ed6282021-07-25 20:05:06 -040019 echo "::group::${label}"
Davide Pesaventoe6e125e2019-10-08 18:08:36 -040020 fi
21
22 echo "\$ $file"
Alexander Afanasyeve7490032014-12-11 12:40:53 -080023 "$file"
Davide Pesaventoe6e125e2019-10-08 18:08:36 -040024
Davide Pesavento30ed6282021-07-25 20:05:06 -040025 if [[ -n $GITHUB_ACTIONS ]]; then
26 echo "::endgroup::"
Davide Pesaventoe6e125e2019-10-08 18:08:36 -040027 fi
Alexander Afanasyeva87e0a82014-10-21 14:09:19 -040028done