CI: keep latest build artifacts for manifest repo
This is a solution for [YT-54] CI: Make sure the latest manifest pipeline with artifacts is not deleted.
After initial investigation of the problem we failed to find a straightforward solution, but proposed two workarounds:
- always trigger full build from default branch;
- to develop a script to manage build artifacts.
(See comments to discussion on JIRA for more details).
Due to lack of feedback, we decided we proceed with option #2 - we developed a python script and wrapped it with corresponding GitLab CI job to launch it.
The script searches for the latest pipelines for default branch in manifest repository and decides either to keep or delete artifacts for particular build. Herewith the build artifacts are kept for:
- the latest commit;
- the last successful build;
- the tagged commits (e.g.
fngsystem/47.0
,kirkstone/20.0
).
Example run: https://git.seco.com/seco-ne/yocto/layers/meta-seconorth-distro/-/jobs/904024
Note: for testing purpose the job was defined in manifest-integration-jobs.yml
but the real place for the job is in manifest-pipeline.yml
(next to the retrigger job).
Merge request reports
Activity
assigned to @dmitry.petrov
added 1 commit
- b23079df - ci: add a job to handle artifacts after merge
requested review from @jonas.hoeppner
added 4 commits
-
b23079df...1299a9d6 - 3 commits from branch
master
- de9851be - ci: add a job to handle artifacts after merge
-
b23079df...1299a9d6 - 3 commits from branch
Integration merge request: https://git.seco.com/seco-ne/yocto/infrastructure/ci-test/minimal-srcrev/-/merge_requests/152
Integration merge request: https://git.seco.com/seco-ne/yocto/infrastructure/ci-test/minimal-foo/-/merge_requests/425
Integration merge request: https://git.seco.com/seco-ne/yocto/infrastructure/ci-test/minimal-bar/-/merge_requests/310
Integration merge request: https://git.seco.com/seco-ne/yocto/infrastructure/ci-test/minimal-foo/-/merge_requests/426
Integration merge request: https://git.seco.com/seco-ne/yocto/infrastructure/ci-test/minimal-manifest/-/merge_requests/692
Integration merge request: https://git.seco.com/seco-ne/yocto/infrastructure/ci-test/minimal-manifest/-/merge_requests/693
Integration merge request: seco-ne/kernel/modules/gfplatdetect!116 (merged)