Skip to content

Issue #349: Make all git setup on the instance user

This patch groups all git-related actions in a single section, and runs them inside the koha-shell. This means all git setup will exist in the instance user, avoiding the usual confusion of devs/testers running things as root and messing up with permissions.

For this test plan, I assume you have KOHA_IMAGE=master-bullseye, tweak accordingly if required (e.g. if you have KOHA_IMAGE=master, etc).

To test:

  1. Start ktd: $ ktd up -d
  2. Jump into ktd as instance user: $ ktd --shell
  3. Look at the /kohadevbox/koha/.git/config/hooks => SUCCESS: All good
  4. Look at the instance's .gitconfig at /var/lib/koha/kohadev/.gitconfig => SUCCESS: All looks good
  5. Build ktd with this changes [1] $ docker build . -f dists/bullseye/Dockerfile -t koha/koha-testing:master-bullseye
  6. Restart ktd: $ ktd down $ ktd up
  7. Repeat 2~4 => SUCCESS: No changes
  8. Jump into root $ ktd --shell --root or $ sudo -s # if you are already in the kshell => SUCCESS: There's no /root/.gitconfig

Signed-off-by: Tomas Cohen Arazi tomascohen@theke.io

Merge request reports