File tree 1 file changed +26
-1
lines changed
1 file changed +26
-1
lines changed Original file line number Diff line number Diff line change @@ -128,6 +128,29 @@ set_status() {
128
128
/usr/bin/curl -s -d " ${status} " -H " Content-Type: application/json" -H " Authorization: ${CI_JOB_TOKEN} " -X PUT ${MURDOCK_API_URL} /job/${CI_JOB_UID} /status > /dev/null
129
129
}
130
130
131
+ check_label () {
132
+ local label=" ${1} "
133
+ [ -z " ${CI_PULL_LABELS} " ] && return 1
134
+ echo " ${CI_PULL_LABELS} " | grep -q " ${label} "
135
+ return $?
136
+ }
137
+
138
+ if [ -z " ${CI_FAST_FAIL} " ]; then
139
+ if [ " ${NIGHTLY} " = " 1" ]; then
140
+ export CI_FAST_FAIL=0
141
+ elif check_label " CI: no fast fail" ; then
142
+ export CI_FAST_FAIL=0
143
+ else
144
+ export CI_FAST_FAIL=1
145
+ fi
146
+ fi
147
+
148
+ if [ " ${CI_FAST_FAIL} " = " 1" ]; then
149
+ export DWQ_MAXFAIL=0
150
+ else
151
+ export DWQ_MAXFAIL=500
152
+ fi
153
+
131
154
main () {
132
155
set_status " fetching code"
133
156
@@ -198,12 +221,14 @@ main() {
198
221
exit 2
199
222
fi
200
223
224
+ echo " --- Will abort after more than ${DWQ_MAXFAIL} failed job(s)."
225
+
201
226
local report_queue=" status::${CI_JOB_UID} :$( random) "
202
227
${BASEDIR} /reporter.py " ${report_queue} " ${CI_JOB_UID} ${CI_JOB_TOKEN} &
203
228
local reporter_pid=$!
204
229
205
230
get_jobs | dwqc ${DWQ_ENV} \
206
- --maxfail 500 \
231
+ --maxfail ${DWQ_MAXFAIL} \
207
232
--quiet --report ${report_queue} --outfile result.json
208
233
209
234
local build_test_res=$?
You can’t perform that action at this time.
0 commit comments