Skip to content
Open
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
31 changes: 7 additions & 24 deletions .github/workflows/Nightly_Perf_Env_CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -301,37 +301,20 @@ jobs:
RUN_TYPE: 'perf_ci'
run: |
# get repository last id
declare -a repositories=('redhat-performance/benchmark-runner' 'cloud-bulldozer/benchmark-operator' 'cloud-bulldozer/benchmark-wrapper')
for repository in "${repositories[@]}"
do
git clone "https://github.com/$repository" "$RUNNER_PATH/$repository"
pushd "$RUNNER_PATH/$repository"
case $repository in
'redhat-performance/benchmark-runner')
echo "BENCHMARK_RUNNER_ID=$(git rev-parse @)" >> "$GITHUB_ENV"
BENCHMARK_RUNNER_ID=$(git rev-parse @)
echo $BENCHMARK_RUNNER_ID
;;
'cloud-bulldozer/benchmark-operator')
echo "BENCHMARK_OPERATOR_ID=$(git rev-parse @)" >> "$GITHUB_ENV"
BENCHMARK_OPERATOR_ID=$(git rev-parse @)
echo $BENCHMARK_OPERATOR_ID
;;
'cloud-bulldozer/benchmark-wrapper')
echo "BENCHMARK_WRAPPER_ID=$(git rev-parse @)" >> "$GITHUB_ENV"
BENCHMARK_WRAPPER_ID=$(git rev-parse @)
echo $BENCHMARK_WRAPPER_ID
;;
esac
done
git clone "https://github.com/redhat-performance/benchmark-runner" "$RUNNER_PATH/redhat-performance/benchmark-runner"
pushd "$RUNNER_PATH/redhat-performance/benchmark-runner"
echo "BENCHMARK_RUNNER_ID=$(git rev-parse @)" >> "$GITHUB_ENV"
BENCHMARK_RUNNER_ID=$(git rev-parse @)
echo $BENCHMARK_RUNNER_ID
popd
build=$(pip freeze | grep benchmark-runner | sed 's/==/=/g')
build_version="$(cut -d'=' -f2 <<<"$build")"
end=$(printf '%(%s)T' -1)
ci_minutes_time=$(( (end - START_CI) / 60))
# Check for workload failure or success => return pass/failed
if [[ "${{needs.workload.outputs.job_status}}" == "failure" || "${{needs.workload.outputs.job_status}}" == "cancelled" ]]; then status="failed"; else status="pass"; fi
echo '>>>>>>>>>>>>>>>>>>>>>>>>>> Update CI status $status >>>>>>>>>>>>>>>>>>>>>>>>>>'
ssh -t provision "podman run --rm -e KUBEADMIN_PASSWORD='$KUBEADMIN_PASSWORD' -e PIN_NODE_BENCHMARK_OPERATOR='$PIN_NODE_BENCHMARK_OPERATOR' -e PIN_NODE1='$PIN_NODE1' -e PIN_NODE2='$PIN_NODE2' -e ELASTICSEARCH='$ELASTICSEARCH' -e ELASTICSEARCH_PORT='$ELASTICSEARCH_PORT' -e ELASTICSEARCH_USER='$ELASTICSEARCH_USER' -e ELASTICSEARCH_PASSWORD='$ELASTICSEARCH_PASSWORD' -e BUILD_VERSION='$build_version' -e CI_STATUS='$status' -e CI_MINUTES_TIME='$ci_minutes_time' -e BENCHMARK_RUNNER_ID='$BENCHMARK_RUNNER_ID' -e BENCHMARK_OPERATOR_ID='$BENCHMARK_OPERATOR_ID' -e BENCHMARK_WRAPPER_ID='$BENCHMARK_WRAPPER_ID' -e RUN_TYPE='$RUN_TYPE' -e TIMEOUT='3600' -e log_level='INFO' -v '$CONTAINER_KUBECONFIG_PATH':'$CONTAINER_KUBECONFIG_PATH' --privileged '${{ secrets.QUAY_BENCHMARK_RUNNER_REPOSITORY }}'"
ssh -t provision "podman run --rm -e KUBEADMIN_PASSWORD='$KUBEADMIN_PASSWORD' -e PIN_NODE_BENCHMARK_OPERATOR='$PIN_NODE_BENCHMARK_OPERATOR' -e PIN_NODE1='$PIN_NODE1' -e PIN_NODE2='$PIN_NODE2' -e ELASTICSEARCH='$ELASTICSEARCH' -e ELASTICSEARCH_PORT='$ELASTICSEARCH_PORT' -e ELASTICSEARCH_USER='$ELASTICSEARCH_USER' -e ELASTICSEARCH_PASSWORD='$ELASTICSEARCH_PASSWORD' -e BUILD_VERSION='$build_version' -e CI_STATUS='$status' -e CI_MINUTES_TIME='$ci_minutes_time' -e BENCHMARK_RUNNER_ID='$BENCHMARK_RUNNER_ID' -e RUN_TYPE='$RUN_TYPE' -e TIMEOUT='3600' -e log_level='INFO' -v '$CONTAINER_KUBECONFIG_PATH':'$CONTAINER_KUBECONFIG_PATH' --privileged '${{ secrets.QUAY_BENCHMARK_RUNNER_REPOSITORY }}'"
echo '>>>>>>>>>>>>>>>>>>>>>>>>>> Remove image on provision >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>'
echo "if [[ \"\$(sudo podman images -q ${{ secrets.QUAY_BENCHMARK_RUNNER_REPOSITORY }} 2> /dev/null)\" != \"\" ]]; then sudo podman rmi -f \$(sudo podman images -q ${{ secrets.QUAY_BENCHMARK_RUNNER_REPOSITORY }} 2> /dev/null); fi" > "$RUNNER_PATH/remove_image.sh"
scp -r "$RUNNER_PATH/remove_image.sh" provision:"/tmp/remove_image.sh"
Expand Down
23 changes: 7 additions & 16 deletions .github/workflows/Release_ClusterBuster_Perf_Env_CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -215,29 +215,20 @@ jobs:
CONTAINER_KUBECONFIG_PATH: ${{ secrets.CONTAINER_KUBECONFIG_PATH }}
run: |
# get repository last id
declare -a repositories=('benchmark-operator' 'benchmark-wrapper')
for repository in "${repositories[@]}"
do
git clone "https://github.com/cloud-bulldozer/$repository" "$RUNNER_PATH/$repository"
pushd "$RUNNER_PATH/$repository"
if [[ $repository == 'benchmark-operator' ]]
then
echo "BENCHMARK_OPERATOR_ID=$(git rev-parse @)" >> "$GITHUB_ENV"
BENCHMARK_OPERATOR_ID=$(git rev-parse @)
else
echo "BENCHMARK_WRAPPER_ID=$(git rev-parse @)" >> "$GITHUB_ENV"
BENCHMARK_WRAPPER_ID=$(git rev-parse @)
fi
popd
done
# get benchmark-runner last id
git clone "https://github.com/redhat-performance/benchmark-runner" "$RUNNER_PATH/benchmark-runner"
pushd "$RUNNER_PATH/benchmark-runner"
echo "BENCHMARK_RUNNER_ID=$(git rev-parse @)" >> "$GITHUB_ENV"
BENCHMARK_RUNNER_ID=$(git rev-parse @)
popd
build=$(pip freeze | grep benchmark-runner | sed 's/==/=/g')
build_version="$(cut -d'=' -f2 <<<"$build")"
end=$(printf '%(%s)T' -1)
ci_minutes_time=$(( (end - START_CI) / 60))
# Check for workload failure or success => return pass/failed
if [[ "${{needs.workload.outputs.job_status}}" == "failure" || "${{needs.workload.outputs.job_status}}" == "cancelled" ]]; then status="failed"; else status="pass"; fi
echo '>>>>>>>>>>>>>>>>>>>>>>>>>> Update CI status $status >>>>>>>>>>>>>>>>>>>>>>>>>>'
podman run --rm -e KUBEADMIN_PASSWORD="$KUBEADMIN_PASSWORD" -e PIN_NODE_BENCHMARK_OPERATOR="$PIN_NODE_BENCHMARK_OPERATOR" -e PIN_NODE1="$PIN_NODE1" -e PIN_NODE2="$PIN_NODE2" -e ELASTICSEARCH="$ELASTICSEARCH" -e ELASTICSEARCH_PORT="$ELASTICSEARCH_PORT" -e ELASTICSEARCH_USER="$ELASTICSEARCH_USER" -e ELASTICSEARCH_PASSWORD="$ELASTICSEARCH_PASSWORD" -e BUILD_VERSION="$build_version" -e CI_STATUS="$status" -e CI_MINUTES_TIME="$ci_minutes_time" -e BENCHMARK_OPERATOR_ID="$BENCHMARK_OPERATOR_ID" -e BENCHMARK_WRAPPER_ID="$BENCHMARK_WRAPPER_ID" -e RUN_TYPE="perf_ci" -e TIMEOUT="3600" -e log_level="INFO" -v "$KUBECONFIG_PATH":"$CONTAINER_KUBECONFIG_PATH" --privileged "${{ secrets.QUAY_BENCHMARK_RUNNER_REPOSITORY }}"
podman run --rm -e KUBEADMIN_PASSWORD="$KUBEADMIN_PASSWORD" -e PIN_NODE_BENCHMARK_OPERATOR="$PIN_NODE_BENCHMARK_OPERATOR" -e PIN_NODE1="$PIN_NODE1" -e PIN_NODE2="$PIN_NODE2" -e ELASTICSEARCH="$ELASTICSEARCH" -e ELASTICSEARCH_PORT="$ELASTICSEARCH_PORT" -e ELASTICSEARCH_USER="$ELASTICSEARCH_USER" -e ELASTICSEARCH_PASSWORD="$ELASTICSEARCH_PASSWORD" -e BUILD_VERSION="$build_version" -e CI_STATUS="$status" -e CI_MINUTES_TIME="$ci_minutes_time" -e BENCHMARK_RUNNER_ID="$BENCHMARK_RUNNER_ID" -e RUN_TYPE="perf_ci" -e TIMEOUT="3600" -e log_level="INFO" -v "$KUBECONFIG_PATH":"$CONTAINER_KUBECONFIG_PATH" --privileged "${{ secrets.QUAY_BENCHMARK_RUNNER_REPOSITORY }}"
echo '>>>>>>>>>>>>>>>>>>>>>>>>>> Remove image on provision >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>'
echo "if [[ \"\$(sudo podman images -q ${{ secrets.QUAY_BENCHMARK_RUNNER_REPOSITORY }} 2> /dev/null)\" != \"\" ]]; then sudo podman rmi -f \$(sudo podman images -q ${{ secrets.QUAY_BENCHMARK_RUNNER_REPOSITORY }} 2> /dev/null); fi" > "$RUNNER_PATH/remove_image.sh"
scp -r "$RUNNER_PATH/remove_image.sh" provision:"/tmp/remove_image.sh"
Expand Down
6 changes: 1 addition & 5 deletions benchmark_runner/main/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,13 +213,9 @@ def update_ci_status():
"""
ci_minutes_time = environment_variables_dict.get('ci_minutes_time', '')
benchmark_runner_id = environment_variables_dict.get('benchmark_runner_id', '')
benchmark_operator_id = environment_variables_dict.get('benchmark_operator_id', '')
benchmark_wrapper_id = environment_variables_dict.get('benchmark_wrapper_id', '')
benchmark_runner = Workloads()
benchmark_runner.update_ci_status(status=ci_status, ci_minutes_time=int(ci_minutes_time),
benchmark_runner_id=benchmark_runner_id,
benchmark_operator_id=benchmark_operator_id,
benchmark_wrapper_id=benchmark_wrapper_id)
benchmark_runner_id=benchmark_runner_id)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it the only place we use benchmark_operator_id and benchmark_wrapper_id ?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes it was the only file being directly affected at runtime. However, there were stale references as well set in the yaml files, usually harmless but I removed that from there as well just to be consistent.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can u remove it from jenkinsfiles also ?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see any more references for this in Jenkinsfiles. Am I missing something?



@logger_time_stamp
Expand Down