Skip to content

Commit

Permalink
[Buildkite] Skip install package command in serverless builds for som…
Browse files Browse the repository at this point in the history
…e packages (elastic#9686)
  • Loading branch information
mrodm committed Apr 25, 2024
1 parent 0c2198b commit d13e474
Showing 1 changed file with 19 additions and 5 deletions.
24 changes: 19 additions & 5 deletions .buildkite/scripts/common.sh
Expand Up @@ -309,7 +309,6 @@ create_kind_cluster() {
kind create cluster --config "${WORKSPACE}/kind-config.yaml" --image "kindest/node:${K8S_VERSION}"
}


delete_kind_cluster() {
echo "--- Delete kind cluster"
kind delete cluster || true
Expand Down Expand Up @@ -410,7 +409,6 @@ is_package_excluded() {
return 1
}


is_supported_capability() {
if [ "${SERVERLESS_PROJECT}" == "" ]; then
return 0
Expand Down Expand Up @@ -755,6 +753,19 @@ build_zip_package() {
return 0
}

skip_installation_step() {
local package=$1
if ! is_serverless ; then
return 1
fi

if [[ "$package" == "security_detection_engine" ]]; then
return 0
fi

return 1
}

install_package() {
local package=$1
echo "Install package: ${package}"
Expand Down Expand Up @@ -814,10 +825,13 @@ run_tests_package() {
fi
fi

echo "--- [${package}] test installation"
if ! install_package "${package}" ; then
return 1
if ! skip_installation_step "${package}" ; then
echo "--- [${package}] test installation"
if ! install_package "${package}" ; then
return 1
fi
fi

echo "--- [${package}] run test suites"
if is_serverless; then
if ! test_package_in_serverless "${package}" ; then
Expand Down

0 comments on commit d13e474

Please sign in to comment.