qemu-build.sh: Allow WORKSPACE to be anywhere while building

When getting latest-qemu-aarch64 working, I encountered an error
saying the script which should have been mounted wasn't there [1].
Upon investigating, I realized that this works only if WORKSPACE
is a child of HOME which does get bind mounted. When building on
the meta machines, the main writable mount is not a users home
directory.

This change makes it so that we just bind WORKSPACE
directly and it simplifies things by remapping the docker root
user to the caller's UID/GID so permissions line up.

I was able to manually run this on the meta graviton host and
verified that it made the build artifacts with the correct
username and group.

[1] https://jenkins.openbmc.org/job/latest-qemu-aarch64/1/console

Change-Id: Ief4fb34c3f160767122c0129c447114a9e86692a
Signed-off-by: James Athappilly <jamesatha@gmail.com>
1 file changed
tree: 1fa6c9f4dddafe0c3a6f4dcd1fbde3f67bfd9ede
  1. config/
  2. jenkins/
  3. scripts/
  4. tools/
  5. .gitignore
  6. .shellcheck
  7. build-rootfs-size-docker.sh
  8. build-setup.sh
  9. LICENSE
  10. OWNERS
  11. qemu-build.sh
  12. README.md
  13. run-qemu-robot-test.sh
  14. run-rootfs-size-docker.sh
  15. run-unit-test-docker.sh
README.md

openbmc-build-scripts

Build script for CI jobs in Jenkins.

Linter policy and related build failures

Formatting linters sometimes change stylistic output across releases. Separately, some linters are not version-pinned in the CI container, as pinning would drive either frequent maintenance with upgrades or stagnation of the code-base against older versions.

The combination may result in inconsistent formatting opinions across CI worker nodes[^1].

If you see such behaviour consider changing the thing to force a container refresh.

[^1]: The collection of container builds across all worker nodes may not hold a consistent set of tool versions despite being built from the same specification: The inconsistencies emerge from the cadence of upstream tool package updates beating against the cadence of container rebuilds on the worker nodes.