From 4dd04790a2455a867567d77926ca6740d9b0f12c Mon Sep 17 00:00:00 2001 From: Felix Gerking <felix.gerking@garz-fricke.com> Date: Fri, 25 Feb 2022 17:44:19 +0100 Subject: [PATCH] Readme: Description to add a repo for reproducible builds BCS 746-000016 --- README.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/README.md b/README.md index a6bd704f..0ae045bb 100644 --- a/README.md +++ b/README.md @@ -22,6 +22,31 @@ via the CI environment variable `GITBOT_TOKEN` (set under project's settings -> defined. +### Workflow to add a repository to SRCREV.conv for reproducible bitbake builds +Some bitbake recipes are set to `SRCREV = "${AUTOREV}"`. To enable reproducible +builds, the current revision is written to the SRCREV.conf file. This file is +part of the manifest repo, which is used for release tags. This workflow adds +the a gitlab pipeline to the project that automatically sets the current +version in the SRCREV.conf file. +1. Add the gitlab-ci repo as submodule to the project by using the correct relative path\ +`git submodule add ../../yocto/infrastructure/gitlab-ci .gitlab-ci` +1. Add an approriate .gitlab-ci.yml file. For example, copy it from the repository +[egalxi2c][4]. Modify the following variables in the file: + * MASTER\_BRANCH\_PROJECT: Set the project master branch + * BB\_RECIPE\_NAME: Set the name of the bitbake recipe +1. Create a corresponding entry in the SRCREV.conf file of the manifest repo\ +`SRCREV_pn-<bitbake-recipe> = "<current-commit-hash>"` + +**Repository settings** +1. Verify that the merge strategy is set to *Fast-forward merge* +(General -> Merge requests -> Merge method) +1. Enable the CI/CD functionality for the repository +(General -> Visibility, project features, permissions -> CI/CD) +1. Check that the default branch is protected and that *Maintainers + Developers* +are allowed to merge (Repository -> Protected branches) + + [1]: https://git-scm.com/book/en/v2/Git-Tools-Submodules [2]: https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html [3]: https://gitlab.com/garz-fricke +[4]: https://gitlab.com/SECO-Northern-Europe/kernel/modules/egalaxi2c -- GitLab