Support snap builders using a recipe

Asked by Angelos Kolaitis

When defining a build pipeline for a package in Launchpad, the following four options are available:

- Build deb packages using a recipe (pull source, cherry-pick branches and then build). Uses the recipe syntax explained in https://help.launchpad.net/Packaging/SourceBuilds/Recipes
- Build snap packages (only pull source and build)
- Build charms (only pull source and build)

In the MicroK8s team, we are frequently building our snap for a number of different tracks, see https://launchpad.net/~microk8s-dev/+snaps

It would greatly help if we could somehow use the same recipe syntax when building some of our snap tracks. Is this something that would be easy to implement on LaunchPad?

For example, to understand the end goal of this ask, we would like to define recipes for building our 1.27-strict snap like this:

```
# git-build-recipe format 0.4 deb-version {debupstream}-0~{revtime}
lp:microk8s 1.27

merge strict lp:microk8s/strict
```

Which would translate to: use the 1.27 branch, and merge the strict branch before building.

Thanks!

Question information

Language:
English Edit question
Status:
Solved
For:
Launchpad itself Edit question
Assignee:
No assignee Edit question
Solved by:
Simone Pelosi
Solved:
Last query:
Last reply:
Revision history for this message
Simone Pelosi (pelpsi) said :
#1

Hi Angelos,

Thank you for the suggestion, let me investigate on that.

Revision history for this message
Simone Pelosi (pelpsi) said :
#2

Hi Angelos,
you should already be able to write that as

```
merge strict lp:microk8s strict
```

Revision history for this message
Angelos Kolaitis (aggkolaitis) said (last edit ):
#3

Hi Simone,

Yes, it is possible to configure this as a recipe, what is not possible is have launchpad "execute" the recipe and then build a snap package. This is only currently supported for debs.

Revision history for this message
Best Simone Pelosi (pelpsi) said :
#4

Sorry but we aren't going to implement this for snaps at this time,
Perhaps you can do what you need using an external merge robot to manage a 1.27-strict branch?

Revision history for this message
Angelos Kolaitis (aggkolaitis) said :
#5

OK, thanks for confirmation.

Revision history for this message
Angelos Kolaitis (aggkolaitis) said :
#6

Thanks Simone Pelosi, that solved my question.