Is there any APIs for the build service?

I would like to trigger snap rebuild from a cron job on my machine(for automatic rebuild, etc.), is it possible?

This exists.

1 Like

Iā€™ve used lp-build-snap before, but itā€™s only for snaps that have been configured directly in launchpad, as opposed to via the /build page on snapcraft.io. It is super useful if you have configured them that way though, and gives you the flexibility you may need.

@toto may know if thereā€™s any plans to expose the /build page over some kind of API. I donā€™t know.

1 Like

I donā€™t think entire /build page API is needed, just an easy way to ā€œTrigger new buildā€. That could be implemented trough snapcraft command that should already have users credentials and list of snaps.

if [[ new-release ]]; then
    snapcraft trigger <snap-name>
fi
1 Like

Re-ping @toto as Iā€™d really craving something that can improve the situation.

1 Like

hey @Lin-Buo-Ren ,

Sorry I must have missed the ping here.
So snapcraft.io doesnā€™t provides API for this. We actually use launchpad APIā€™s to trigger new builds. I think for now this might be your best approach.

2 Likes