Skip to content

Commit

Permalink
Fix ssh-buildx test and change assert to if-then-raise block
Browse files Browse the repository at this point in the history
  • Loading branch information
shanejbrown committed Aug 22, 2024
1 parent fc981b7 commit 9ac4373
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion buildrunner/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,10 @@ def get_source_image(self):
pull=False,
)
)
assert len(built_images_info.built_images) == 1
if len(built_images_info.built_images) != 1:
raise BuildRunnerProcessingError(
"Failed to build ssh-agent image. Retrying the build may resolve the issue."
)
self._source_image = built_images_info.built_images[0].trunc_digest

return self._source_image
Expand Down
2 changes: 1 addition & 1 deletion tests/test-files/test-ssh-buildx.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use-legacy-builder: True
use-legacy-builder: False
steps:
clone:
build:
Expand Down

0 comments on commit 9ac4373

Please sign in to comment.