ci: build package for Turris
Thanks for all the help, @jpavlinec !
I placed the packaging files into distro/turris
. If there are any updates to them, please don't hesitate to open a merge request :)
The only concern I have is we can only do builds from this public repo with the current setup. Would it be possible to convince the openwrt Makefile to use a specific directory, or a tarball instead of providing COMMIT_SHA
, which is then downloaded from upstream?
Merge request reports
Activity
I think that both variants are possible (building from the local directory and/or from a tarball.
Local version requires changes similar to https://github.com/mwarning/openwrt-examples/blob/master/example3/Makefile#L30
And tarball version is used in our repo https://gitlab.labs.nic.cz/turris/turris-os-packages/blob/test/net/knot-resolver/Makefile#L16
I can see the only downside of that solution that you can list what version of the package you have installed right now. And It can be useful to know commit hash.
Full name of the package is built from variables PKG_NAME-PKG_VERSION-PKG_RELEASE (which are defined inside Makefile).
On router:
root@turris:/# opkg list|grep knot-resolver knot-resolver - 3.1.0-1.2
marked as a Work In Progress from 0f28bf41
I wonder – do you have any plans on how we'll "synchronize" the
distro/turris/
here with the same in https://gitlab.labs.nic.cz/turris/turris-os-packages ?added 2 commits
@jpavlinec Thanks for the examples, I've updated the build scripts to use our tarballs. The development versions also contain the git commit, so version numbers should be fine.
The manual sync of packaging files isn't optimal, but we have to do it for other distros as well anyway.
I considered my expectation that it will delay the startup of the test stage in all our CI runs by roughly a minute, but that doesn't seem a big deal and we can easily move the job later anyway. EDIT: now a new run was quick, so perhaps it was just bad luck before.
Edited by Vladimír Čunátadded 39 commits
-
e1100205...1aabd4a9 - 36 commits from branch
master
- 766a9e65 - ci/turris: add Docker container for Turris builds
- 761a1069 - distro/turris: import packaging files
- 6013c8be - gitlabci: run Turris build in CI
Toggle commit list-
e1100205...1aabd4a9 - 36 commits from branch
enabled an automatic merge when the pipeline for 6013c8be succeeds