Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chef - Continue instead of breaking on build error #19988

Merged
merged 1 commit into from
Jun 29, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions examples/chef/chef.py
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,8 @@ def main(argv: Sequence[str]) -> None:
dest="use_zzz", action="store_true")
parser.add_option("", "--build_all", help="For use in CD only. Builds and bundles all chef examples for the specified platform. Uses --use_zzz. Chef exits after completion.",
dest="build_all", action="store_true")
parser.add_option("-k", "--keep_going", help="For use in CD only. Continues building all sample apps in the event of an error.",
dest="keep_going", action="store_true")
parser.add_option(
"", "--ci", help="Builds Chef examples defined in cicd_config. Uses --use_zzz. Uses specified target from -t. Chef exits after completion.", dest="ci", action="store_true")

Expand Down Expand Up @@ -387,13 +389,17 @@ def main(argv: Sequence[str]) -> None:
except RuntimeError as build_fail_error:
failed_builds.append((device_name, platform, "build"))
flush_print(str(build_fail_error))
break
if not options.keep_going:
exit(1)
continue
andy31415 marked this conversation as resolved.
Show resolved Hide resolved
cpagravel marked this conversation as resolved.
Show resolved Hide resolved
try:
bundle(platform, device_name)
except FileNotFoundError as bundle_fail_error:
failed_builds.append((device_name, platform, "bundle"))
flush_print(str(bundle_fail_error))
break
if not options.keep_going:
exit(1)
continue
archive_name = f"{label}-{device_name}"
archive_full_name = archive_prefix + archive_name + archive_suffix
flush_print(f"Adding build output to archive {archive_full_name}")
Expand Down
2 changes: 1 addition & 1 deletion integrations/cloudbuild/chef.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ steps:
- PW_ENVIRONMENT_ROOT=/pwenv
args:
- >-
./examples/chef/chef.py --build_all
./examples/chef/chef.py --build_all --keep_going
id: CompileAll
waitFor:
- Bootstrap
Expand Down