Skip to content

Commit

Permalink
also this
Browse files Browse the repository at this point in the history
  • Loading branch information
maxime-desroches committed Oct 17, 2024
1 parent 4ad1d7a commit fde1ff2
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ node {
])
}

if (env.BRANCH_NAME == 'jenkins_stress') {
if (env.BRANCH_NAME == 'jenkins_stress_NOT_NOW') {
sh '''#!/bin/bash
# get crumb for CSRF
Expand All @@ -179,13 +179,12 @@ node {
N=5
FIRST_RUN=$(curl --cookie $COOKIE_JAR -H "$CRUMB" https://jenkins.comma.life/job/openpilot/job/__jenkins_stress/api/json | jq .nextBuildNumber)
echo "FIRST RUN IS : $FIRST_RUN"
LAST_RUN=$((FIRST_RUN+N))
for i in $(seq $FIRST_RUN $LAST_RUN);
do
# start build i
curl --cookie $COOKIE_JAR -H "$CRUMB" -X POST https://jenkins.comma.life/job/openpilot/job/__jenkins_stress/build?delay=0sec
curl --output /dev/null --cookie $COOKIE_JAR -H "$CRUMB" -X POST https://jenkins.comma.life/job/openpilot/job/__jenkins_stress/build?delay=0sec
done
while true; do
Expand All @@ -210,23 +209,20 @@ node {
RESULT=$(echo $JSON | jq .result)
((count++))
echo "build $i $RESULT"
if [[ $RESULT == '"SUCCESS"' ]]; then
echo "build $i success"
PASS+=($i)
elif [[ $RESULT == '"FAILURE"' ]]; then
echo "build $i fail"
FAIL+=($i)
elif [[ $RESULT == '"ABORTED"' ]]; then
echo "build $i abort"
FAIL+=($i)
else
echo "build $i $RESULT"
FAIL+=($i)
fi
else
echo "Error getting build $i"
echo "Error getting status of build $i"
fi
done
Expand Down

0 comments on commit fde1ff2

Please sign in to comment.