canonical / snapcraft

Package, distribute, and update any app for Linux and IoT.
https://snapcraft.io
GNU General Public License v3.0
1.18k stars 446 forks source link

remote build: filter build plan with `--platform` or `--build-for` #4992

Open mr-cal opened 2 months ago

mr-cal commented 2 months ago

What needs to get done

Work with the launchpad team to design a solution (craft-platforms may help here) as this will require changes in both Snapcraft and Launchpad.

--platform and --build-for need to support both of the following disparate behaviors:

Behavior 1: Lifecycle command

If there is a platform or architectures definition in the project metadata, --platform or --build-for should filter down the build plan.

Behavior 2: Legacy remote builder

If there is not a platforms or architectures definition in the project metadata, --platform or --build-for should define the build-for architectures for Launchpad to build.

Why it needs to get done

To improve the usability of the remote-builder.

A reoccurring complaint is that the project metadata must be edited to remote-build for a single architecture.

syncronize-issues-to-jira[bot] commented 2 months ago

Thank you for reporting us your feedback!

The internal ticket has been created: https://warthogs.atlassian.net/browse/CRAFT-3277.

This message was autogenerated

lengau commented 1 month ago

I believe that we can do this using the setProcessors method of launchpad's snap object.

To do so, we need to be able to map the list of platforms or build-fors to Launchpad processors.