Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -42,18 +42,19 @@ esac
export ES_SERVER

pip install .
EXTRA_FLAGS=" --lookback ${LOOKBACK}d --hunter-analyze"

EXTRA_FLAGS=(--lookback "${LOOKBACK}d" --hunter-analyze)

if [[ ! -z "$UUID" ]]; then
EXTRA_FLAGS+=" --uuid ${UUID}"
EXTRA_FLAGS+=(--uuid "${UUID}")
fi

if [ ${OUTPUT_FORMAT} == "JUNIT" ]; then
EXTRA_FLAGS+=" --output-format junit --save-output-path=junit.xml"
EXTRA_FLAGS+=(--output-format junit --save-output-path junit.xml)
elif [ "${OUTPUT_FORMAT}" == "JSON" ]; then
EXTRA_FLAGS+=" --output-format json"
EXTRA_FLAGS+=(--output-format json)
elif [ "${OUTPUT_FORMAT}" == "TEXT" ]; then
EXTRA_FLAGS+=" --output-format text"
EXTRA_FLAGS+=(--output-format text)
else
echo "Unsupported format: ${OUTPUT_FORMAT}"
exit 1
Expand Down Expand Up @@ -86,11 +87,11 @@ if [[ -n "$ACK_FILE" ]]; then
ackFilePath="$ARTIFACT_DIR/$ACK_FILE"
curl -sL https://raw.githubusercontent.com/cloud-bulldozer/orion/refs/heads/main/ack/${VERSION}_${ACK_FILE} -o "$ackFilePath"
fi
EXTRA_FLAGS+=" --ack $ackFilePath"
EXTRA_FLAGS+=(--ack "$ackFilePath")
fi

if [ ${COLLAPSE} == "true" ]; then
EXTRA_FLAGS+=" --collapse"
EXTRA_FLAGS+=(--collapse)
fi

if [[ -n "${ORION_ENVS}" ]]; then
Expand All @@ -105,16 +106,25 @@ if [[ -n "${ORION_ENVS}" ]]; then
fi

if [[ -n "${LOOKBACK_SIZE}" ]]; then
EXTRA_FLAGS+=" --lookback-size ${LOOKBACK_SIZE}"
EXTRA_FLAGS+=(--lookback-size "${LOOKBACK_SIZE}")
fi

if [[ -n "${PULL_NUMBER}" ]]; then
JOBTYPE="pull"
EXTRA_FLAGS+=(--input-vars "{\"jobtype\": \"${JOBTYPE}\", \"pull_number\": \"${PULL_NUMBER}\", \"organization\": \"openshift\", \"repository\": \"${REPO_NAME}\"}")
else
JOBTYPE="periodic"
fi

set +e
set -o pipefail
FILENAME=$(echo $CONFIG | awk -F/ '{print $2}' | awk -F. '{print $1}')
es_metadata_index=${ES_METADATA_INDEX} es_benchmark_index=${ES_BENCHMARK_INDEX} VERSION=${VERSION} jobtype="periodic" orion --node-count ${IGNORE_JOB_ITERATIONS} --config ${CONFIG} ${EXTRA_FLAGS} | tee ${ARTIFACT_DIR}/$FILENAME.txt
es_metadata_index=${ES_METADATA_INDEX} es_benchmark_index=${ES_BENCHMARK_INDEX} VERSION=${VERSION} jobtype="${JOBTYPE}" \
orion --node-count ${IGNORE_JOB_ITERATIONS} --config ${CONFIG} "${EXTRA_FLAGS[@]}" | tee ${ARTIFACT_DIR}/$FILENAME.txt
orion_exit_status=$?
set -e

cp *.csv *.xml *.json *.txt "${ARTIFACT_DIR}/" 2>/dev/null || true

exit $orion_exit_status

Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,14 @@ ref:
default: ""
documentation:
Comma separated list of envs that needs to exported in runtime for templated configurations.
- name: PULL_NUMBER
default: ""
documentation: |
Pull request number associated with the current job run.
- name: REPO_NAME
default: ""
documentation: |
Name of the GitHub repository under test.
commands: openshift-qe-orion-commands.sh
timeout: 6h
credentials:
Expand Down