Skip to content

Commit 37805a2

Browse files
committed
Do not test docker-library when push, fix global status
1 parent 2e0c5d3 commit 37805a2

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

tests/ci/docker_server.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,6 @@ def main():
433433
docker_login()
434434

435435
logging.info("Following tags will be created: %s", ", ".join(tags))
436-
status = SUCCESS
437436
test_results = [] # type: TestResults
438437
for os in args.os:
439438
for tag in tags:
@@ -442,10 +441,13 @@ def main():
442441
image, push, repo_urls, os, tag, args.version, direct_urls
443442
)
444443
)
445-
if test_results[-1].status != OK:
446-
status = FAILURE
447444

448-
test_docker_library(test_results)
445+
if not push:
446+
# The image is built locally only when we don't push it
447+
# See `--output=type=docker`
448+
test_docker_library(test_results)
449+
450+
status = SUCCESS if all(tr.status == OK for tr in test_results) else FAILURE
449451

450452
description = f"Processed tags: {', '.join(tags)}"
451453
JobReport(

0 commit comments

Comments
 (0)