mirror of
https://github.com/elastic/logstash.git
synced 2025-04-19 04:15:23 -04:00
This commit enables running the exhaustive tests Buildkite pipeline (i.e. the equivalent to the `main` Jenkins tests) ; the trigger is code events, i.e. direct pushes, merge commits and creation of new branches. CI is skipped if changes are only related to files under `docs/`.
39 lines
1.3 KiB
YAML
39 lines
1.3 KiB
YAML
steps:
|
|
- label: "Exhaustive tests pipeline"
|
|
command: |
|
|
#!/usr/bin/env bash
|
|
echo "--- Check for docs changes"
|
|
set +e
|
|
.buildkite/scripts/common/check-files-changed.sh '^docs/.*'
|
|
if [[ $$? -eq 0 ]]; then
|
|
echo "^^^ +++"
|
|
echo "Skipping running pipeline as all changes are related to docs."
|
|
exit 0
|
|
else
|
|
echo "Changes are not exclusively related to docs, continuing."
|
|
fi
|
|
|
|
set -eo pipefail
|
|
|
|
echo "--- Downloading prerequisites"
|
|
python3 -m pip install ruamel.yaml
|
|
curl -fsSL --retry-max-time 60 --retry 3 --retry-delay 5 -o /usr/bin/yq https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64
|
|
chmod a+x /usr/bin/yq
|
|
|
|
echo "--- Printing generated dynamic steps"
|
|
set +e
|
|
python3 .buildkite/scripts/exhaustive-tests/generate-steps.py >pipeline_steps.yml
|
|
if [[ $$? -ne 0 ]]; then
|
|
echo "^^^ +++"
|
|
echo "There was a problem rendering the pipeline steps."
|
|
cat pipeline_steps.yml
|
|
echo "Exiting now."
|
|
exit 1
|
|
else
|
|
set -eo pipefail
|
|
cat pipeline_steps.yml | yq .
|
|
fi
|
|
|
|
set -eo pipefail
|
|
echo "--- Uploading steps to buildkite"
|
|
cat pipeline_steps.yml | buildkite-agent pipeline upload
|