Skip to content

Commit

Permalink
chore(ci): use spot instance for all jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
pepoviola committed Nov 9, 2023
1 parent af9b8da commit 50a7ea1
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions scripts/ci/run-test-local-env-manager.sh
Original file line number Diff line number Diff line change
Expand Up @@ -133,11 +133,12 @@ function set_instance_env {
if [ $STATUS == "200" ]; then
JOBS_CANCELED_BY_US=$(cat response.txt |jq -c ".[] | select((.name | contains(\"${CI_JOB_NAME}\")) and .status == \"canceled\" and (.duration >= 0))" | wc -l)
if [[ $JOBS_CANCELED_BY_US -eq 0 ]]; then
# only mod 2 for PoC
R=$(( $CI_PIPELINE_ID % 2));
if [[ $R -eq 0 ]];then
export X_INFRA_INSTANCE=spot
fi;
export X_INFRA_INSTANCE=spot
# only mod 2 for PoC (uncomment for rollback)
# R=$(( $CI_PIPELINE_ID % 2));
# if [[ $R -eq 0 ]];then
# export X_INFRA_INSTANCE=spot
# fi;
fi;
fi;
fi;
Expand Down

0 comments on commit 50a7ea1

Please sign in to comment.