Hi everyone, I need to set up CI/CD for our Yocto environment. But, I’m not sure where to start. Could you help me out? What tools do you use? What would you recommend?
Thanks in advance.
Note: I have server so I be able to use self-host runner.
Hi everyone, I need to set up CI/CD for our Yocto environment. But, I’m not sure where to start. Could you help me out? What tools do you use? What would you recommend?
Thanks in advance.
Note: I have server so I be able to use self-host runner.
Hi @stzn,
Thanks for the thread, as discussed on IRC I’ll focus on the self-hosted, single runner GitHub Actions scenario.
In fact I’ve been using something very similar for the meta-mender-community builds. It is defunct now as I have moved to a fully self-hosted ForgeJo instance for this now, but the files are still visible.
I think the closest blueprint for you can be meta-mender-community/.github/workflows/build_boards.yml at f42b2a0f3bab0b23c3368eaae9b3cafa10a3cc63 · mendersoftware/meta-mender-community · GitHub
The concept is essentially these steps:
(one time)
0.1. prepare a container which holds a known good build tooling set, including the setup automation you want. I use kas currently, but pick whatever suits you. common starting points might be crops and pyrex, but also creating a new one is kinda trivial.
0.2. prepare the directories on the build server where you want to persist sstate, downloads, and artefact collection.
the build workflow:
the test workflow:
make sure you have an automated way of testing on an actual hardware in the loop setup, maybe using lab grid.
this is usually quite straightforward - invoke the test with a known artifact set.
The magic here is more in passing the information on which artifact is the one to test. Combining it into one workflow would solve that problem, but it means you can’t trigger the hardware test without all the build before, which makes turnaround time usually super bad, so I definitely recommend splitting that.
What are the problems I’ve run into:
That’s what comes to my mind immediately, if you have additional specific question, please let me know and I’ll try to help.
Greetz,
Josef